diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java index d6603b20..9b406d36 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java @@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.erp.domain.ErpDevelopModifyorderDetail; import com.ruoyi.erp.domain.ErpMaterial; import com.ruoyi.erp.domain.ErpMaterialVo; +import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderRemindVo; import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderVo; import com.ruoyi.erp.service.IErpMaterialService; import com.ruoyi.process.general.service.IProcessService; @@ -42,14 +43,13 @@ import javax.servlet.http.HttpSession; /** * 开发修改单Controller - * + * * @author 刘晓旭 * @date 2024-04-18 */ @Controller @RequestMapping("/erp/developModifyOrder") -public class ErpDevelopModifyorderController extends BaseController -{ +public class ErpDevelopModifyorderController extends BaseController { private String prefix = "erp/developModifyOrder"; @Autowired @@ -82,8 +82,7 @@ public class ErpDevelopModifyorderController extends BaseController @RequiresPermissions("erp:developModifyOrder:view") @GetMapping() - public String developModifyOrder() - { + public String developModifyOrder() { return prefix + "/developModifyOrder"; } @@ -93,8 +92,7 @@ public class ErpDevelopModifyorderController extends BaseController @RequiresPermissions("erp:developModifyOrder:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(ErpDevelopModifyorderVo erpDevelopModifyorderVo) - { + public TableDataInfo list(ErpDevelopModifyorderVo erpDevelopModifyorderVo) { startPage(); List list = erpDevelopModifyorderService.selectErpDevelopModifyorderList(erpDevelopModifyorderVo); return getDataTable(list); @@ -103,10 +101,10 @@ public class ErpDevelopModifyorderController extends BaseController /** * 查找所有的工程员 - * */ - @GetMapping ("/getEngineerList") + */ + @GetMapping("/getEngineerList") @ResponseBody - public TableDataInfo getEngineerList(){ + public TableDataInfo getEngineerList() { startPage(); List list = sysUserService.selectRoleToUserList("gcwyRole,gcjlRole,gczgRole,yfzjRole,"); return getDataTable(list); @@ -119,15 +117,13 @@ public class ErpDevelopModifyorderController extends BaseController @Log(title = "开发修改单", businessType = BusinessType.EXPORT) @PostMapping("/exportAll") @ResponseBody - public AjaxResult exportAll(ErpDevelopModifyorderVo erpDevelopModifyorderVo) - { + public AjaxResult exportAll(ErpDevelopModifyorderVo erpDevelopModifyorderVo) { List list = erpDevelopModifyorderService.selectErpDevelopModifyorderList(erpDevelopModifyorderVo); ExcelUtil util = new ExcelUtil(ErpDevelopModifyorderVo.class); return util.exportExcel(list, "开发修改单数据"); } - /** * 导出选择的开发修改单列表 */ @@ -135,8 +131,7 @@ public class ErpDevelopModifyorderController extends BaseController @Log(title = "开发修改单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(@RequestBody String[] developOrderCodes) - { + public AjaxResult export(@RequestBody String[] developOrderCodes) { List list = erpDevelopModifyorderService.selectErpDevelopModifyorderListByCodes(developOrderCodes); ExcelUtil util = new ExcelUtil(ErpDevelopModifyorderVo.class); return util.exportExcel(list, "开发修改单数据"); @@ -147,8 +142,7 @@ public class ErpDevelopModifyorderController extends BaseController * 新增开发修改单 */ @GetMapping("/add") - public String add() - { + public String add() { return prefix + "/add"; } @@ -159,8 +153,7 @@ public class ErpDevelopModifyorderController extends BaseController @Log(title = "开发修改单", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(@RequestBody ErpDevelopModifyorder erpDevelopModifyorder) - { + public AjaxResult addSave(@RequestBody ErpDevelopModifyorder erpDevelopModifyorder) { erpDevelopModifyorderService.submitApply(erpDevelopModifyorder); return AjaxResult.success(); @@ -171,9 +164,8 @@ public class ErpDevelopModifyorderController extends BaseController * 加载开发修改物料信息选择弹窗 */ @GetMapping("/developModifyMaterialSelect") - public String materialSelect(@RequestParam String makeNo, ModelMap modelMap) - { - modelMap.put("makeNo",makeNo); + public String materialSelect(@RequestParam String makeNo, ModelMap modelMap) { + modelMap.put("makeNo", makeNo); return prefix + "/developModifyOrderMaterialSelect"; } @@ -182,8 +174,7 @@ public class ErpDevelopModifyorderController extends BaseController */ @PostMapping("/getMaterialListByMakeNo") @ResponseBody - public TableDataInfo getMaterialListByMakeNo(@RequestParam("makeNo") String makeNo) - { + public TableDataInfo getMaterialListByMakeNo(@RequestParam("makeNo") String makeNo) { startPage(); SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectSaleNoByMakeNo(makeNo); List list = sysSalesOrderChildService.selectSysSalesOrderChildByQuoteId(sysMakeOrder.getSaleNo()); @@ -195,8 +186,7 @@ public class ErpDevelopModifyorderController extends BaseController * 加载采购修改物料信息选择弹窗 */ @GetMapping("/purchaseMaterialSelect") - public String purchaseMaterialSelect() - { + public String purchaseMaterialSelect() { return prefix + "/purchaseOrderMaterialSelect"; } @@ -206,17 +196,16 @@ public class ErpDevelopModifyorderController extends BaseController */ @PostMapping("/getPurchaseMaterialList") @ResponseBody - public TableDataInfo getPurchaseMaterialList(ErpMaterial erpMaterial) - { + public TableDataInfo getPurchaseMaterialList(ErpMaterial erpMaterial) { startPage(); List erpMaterialVos = erpMaterialService.selectAllErpMaterialListWithBom(erpMaterial); return getDataTable(erpMaterialVos); } - /** * 加载审批弹窗 + * * @param taskId * @param mmap * @return @@ -248,8 +237,6 @@ public class ErpDevelopModifyorderController extends BaseController } - - /** * 完成任务 * @@ -265,7 +252,7 @@ public class ErpDevelopModifyorderController extends BaseController //获取实例类型 String instanceType = erpDevelopModifyorderVo.getInstanceType(); boolean approvedFlag = processService.complete(taskId, instanceId, erpDevelopModifyorderVo.getApplyTitle(), erpDevelopModifyorderVo.getDevelopOrderCode(), "developModifyOrder", new HashMap(), request); - if(!approvedFlag){ + if (!approvedFlag) { // 审核状态-审核拒绝 erpDevelopModifyorderVo.setAuditStatus("2"); } @@ -286,17 +273,17 @@ public class ErpDevelopModifyorderController extends BaseController // aftersalesOrderService.generateAftersalesOrderBySalesAftersalesNotice(tempSalesAftersalesNoticeVO); // 提交 - if("submit".equals(instanceType)){ + if ("submit".equals(instanceType)) { // 使用状态-是 // erpBomVo.setUseStatus("1"); } // 作废 - else if("cancel".equals(instanceType)){ + else if ("cancel".equals(instanceType)) { // 使用状态-已作废 // erpBomVo.setUseStatus("2"); } // 恢复 - else if("restore".equals(instanceType)){ + else if ("restore".equals(instanceType)) { // 使用状态-是 // erpBomVo.setUseStatus("1"); } @@ -310,14 +297,11 @@ public class ErpDevelopModifyorderController extends BaseController } - - /** * 修改开发修改单 */ @GetMapping("/edit/{developOrderId}") - public String edit(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) - { + public String edit(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) { ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId); mmap.put("beforeUpdateRemark", erpDevelopModifyorder.getBeforeUpdateRemark()); mmap.put("afterUpdateRemark", erpDevelopModifyorder.getAfterUpdateRemark()); @@ -332,8 +316,7 @@ public class ErpDevelopModifyorderController extends BaseController @Log(title = "开发修改单", businessType = BusinessType.UPDATE) @PostMapping("/edit") @ResponseBody - public AjaxResult editSave(@RequestBody ErpDevelopModifyorder erpDevelopModifyorder) - { + public AjaxResult editSave(@RequestBody ErpDevelopModifyorder erpDevelopModifyorder) { return toAjax(erpDevelopModifyorderService.updateErpDevelopModifyorder(erpDevelopModifyorder)); } @@ -342,8 +325,7 @@ public class ErpDevelopModifyorderController extends BaseController */ @PostMapping("/getDevelopModifyMaterialById") @ResponseBody - public TableDataInfo getDevelopModifyMaterialById(@RequestParam("developOrderId") Long developOrderId) - { + public TableDataInfo getDevelopModifyMaterialById(@RequestParam("developOrderId") Long developOrderId) { startPage(); List erpDevelopModifyorderList = erpDevelopModifyorderService.selectDevelopModifyMaterialById(developOrderId); return getDataTable(erpDevelopModifyorderList); @@ -354,60 +336,54 @@ public class ErpDevelopModifyorderController extends BaseController */ @PostMapping("/getDevelopModifyDetailMaterialByCode") @ResponseBody - public TableDataInfo getDevelopModifyDetailMaterialByCode(@RequestParam("developOrderCode") String developOrderCode) - { + public TableDataInfo getDevelopModifyDetailMaterialByCode(@RequestParam("developOrderCode") String developOrderCode) { startPage(); List erpDevelopModifyorderDetailList = erpDevelopModifyorderService.selectDevelopModifyDetailMaterialByCode(developOrderCode); return getDataTable(erpDevelopModifyorderDetailList); } - /** - * 查看开发修改单详情 - * */ + * 查看开发修改单详情 + */ @Log(title = "开发修改单", businessType = BusinessType.OTHER) @GetMapping("/detail/{developOrderId}") - public String detail(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap){ + public String detail(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) { ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId); - mmap.put("erpDevelopModifyorder",erpDevelopModifyorder); + mmap.put("erpDevelopModifyorder", erpDevelopModifyorder); mmap.put("beforeUpdateRemark", erpDevelopModifyorder.getBeforeUpdateRemark()); mmap.put("afterUpdateRemark", erpDevelopModifyorder.getAfterUpdateRemark()); - return prefix+ "/detail"; + return prefix + "/detail"; } - /** * 修改保存开发修改单详情 */ @Log(title = "开发修改单", businessType = BusinessType.UPDATE) @PostMapping("/detail") @ResponseBody - public AjaxResult detailSave(@RequestBody ErpDevelopModifyorder erpDevelopModifyorder) - { + public AjaxResult detailSave(@RequestBody ErpDevelopModifyorder erpDevelopModifyorder) { return toAjax(erpDevelopModifyorderService.detailErpDevelopModifyorder(erpDevelopModifyorder)); } - - /**相关人员确认*/ + /** + * 相关人员确认 + */ @GetMapping("/confirm/{developOrderId}") - public String confrimDetail(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) - { + public String confrimDetail(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) { ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId); mmap.put("erpDevelopModifyorder", erpDevelopModifyorder); return prefix + "/confirm"; } - /** * 加载添加领料弹窗 - * */ + */ @GetMapping("/pickAdd/{developOrderId}") - public String pickAdd(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) - { + public String pickAdd(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap) { ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId); mmap.put("erpDevelopModifyorder", erpDevelopModifyorder); return prefix + "/pickAdd"; @@ -416,27 +392,24 @@ public class ErpDevelopModifyorderController extends BaseController /** * 添加领料页面开发修改单物料详情 - * */ + */ @PostMapping("/showPickingDevelopModifyorderDetailList") @ResponseBody - public TableDataInfo showPickingDevelopModifyorderDetailList(@RequestParam("developOrderCode") String developOrderCode) - { + public TableDataInfo showPickingDevelopModifyorderDetailList(@RequestParam("developOrderCode") String developOrderCode) { startPage(); List erpDevelopModifyorderDetailList = erpDevelopModifyorderService.selectDevelopModifyDetailMaterialByCode(developOrderCode); return getDataTable(erpDevelopModifyorderDetailList); } - /** * 删除开发修改单 */ @RequiresPermissions("erp:developModifyOrder:remove") @Log(title = "开发修改单", businessType = BusinessType.DELETE) - @PostMapping( "/remove") + @PostMapping("/remove") @ResponseBody - public AjaxResult remove(String ids) - { + public AjaxResult remove(String ids) { return toAjax(erpDevelopModifyorderService.deleteErpDevelopModifyorderByIds(ids)); } @@ -445,9 +418,9 @@ public class ErpDevelopModifyorderController extends BaseController */ @RequiresPermissions("erp:developModifyOrder:cancel") @Log(title = "开发修改单", businessType = BusinessType.CANCEL) - @GetMapping( "/cancel/{id}") + @GetMapping("/cancel/{id}") @ResponseBody - public AjaxResult cancel(@PathVariable("id") Long id){ + public AjaxResult cancel(@PathVariable("id") Long id) { return toAjax(erpDevelopModifyorderService.cancelErpDevelopModifyorderById(id)); } @@ -456,15 +429,23 @@ public class ErpDevelopModifyorderController extends BaseController */ @RequiresPermissions("erp:developModifyOrder:restore") @Log(title = "开发修改单", businessType = BusinessType.RESTORE) - @GetMapping( "/restore/{id}") + @GetMapping("/restore/{id}") @ResponseBody - public AjaxResult restore(@PathVariable("id")Long id) - { + public AjaxResult restore(@PathVariable("id") Long id) { return toAjax(erpDevelopModifyorderService.restoreErpDevelopModifyorderById(id)); } - + /** + * 开发修改单查询通知人和确认时间 + * */ + @PostMapping("/getErpDevelopRemindPeopleList") + @ResponseBody + public TableDataInfo getErpDevelopRemindPeopleList(@RequestParam("developOrderCode") String developOrderCode) { + startPage(); + List erpDevelopModifyorderDetailList = erpDevelopModifyorderService.getErpDevelopRemindPeopleList(developOrderCode); + return getDataTable(erpDevelopModifyorderDetailList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java index 7830d125..60da6be2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpDevelopModifyorder.java @@ -2,6 +2,7 @@ package com.ruoyi.erp.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderMaterialVo; +import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderRemindVo; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; @@ -149,6 +150,9 @@ public class ErpDevelopModifyorder extends BaseEntity /** 开发修改单领料详情*/ private List developModifyorderPickingDetails; + /** 通知人*/ + private List modifyorderRemindVos; + public String getMakeNo() { return makeNo; } @@ -450,6 +454,14 @@ public class ErpDevelopModifyorder extends BaseEntity this.developModifyorderPickingDetails = developModifyorderPickingDetails; } + public List getModifyorderRemindVos() { + return modifyorderRemindVos; + } + + public void setModifyorderRemindVos(List modifyorderRemindVos) { + this.modifyorderRemindVos = modifyorderRemindVos; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -493,6 +505,7 @@ public class ErpDevelopModifyorder extends BaseEntity .append("developModifyorderDetailList",getDevelopModifyorderDetailList()) .append("developModifyorderMaterialVoList",getDevelopModifyorderMaterialVoList()) .append("developModifyorderPickingDetails",getDevelopModifyorderPickingDetails()) + .append("modifyorderRemindVos",getModifyorderRemindVos()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/vo/ErpDevelopModifyorderRemindVo.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/vo/ErpDevelopModifyorderRemindVo.java new file mode 100644 index 00000000..d7883ed0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/domain/vo/ErpDevelopModifyorderRemindVo.java @@ -0,0 +1,16 @@ +package com.ruoyi.erp.domain.vo; + +import lombok.Data; + +import java.util.Date; + +/** +* 开发修改单通知人实体类 +* */ +@Data +public class ErpDevelopModifyorderRemindVo { + + private String receiverUser; + + private Date handleTime; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpDevelopModifyorderService.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpDevelopModifyorderService.java index 3148c093..5349ab3d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpDevelopModifyorderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/IErpDevelopModifyorderService.java @@ -3,6 +3,7 @@ package com.ruoyi.erp.service; import java.util.List; import com.ruoyi.erp.domain.ErpDevelopModifyorder; import com.ruoyi.erp.domain.ErpDevelopModifyorderDetail; +import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderRemindVo; import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderVo; import com.ruoyi.system.domain.SysSalesOrder; import org.activiti.engine.runtime.ProcessInstance; @@ -104,4 +105,9 @@ public interface IErpDevelopModifyorderService * 根据开发修改单号数组查询开发修改单列表集合 * */ List selectErpDevelopModifyorderListByCodes(String[] developOrderCodes); + + /** + * 根据开发修改单号查询提醒人员列表 + * */ + List getErpDevelopRemindPeopleList(String developOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java index eeb6f452..8041e927 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java @@ -12,6 +12,7 @@ import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.erp.domain.ErpDevelopModifyorderDetail; import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderMaterialVo; +import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderRemindVo; import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderVo; import com.ruoyi.erp.mapper.ErpDevelopModifyorderDetailMapper; import com.ruoyi.process.general.service.IProcessService; @@ -19,10 +20,12 @@ import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.sales.domain.SalesAftersalesNotice; import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO; import com.ruoyi.system.domain.SysMakeOrder; +import com.ruoyi.system.domain.SysRemind; import com.ruoyi.system.domain.SysSalesOrderVo; import com.ruoyi.system.mapper.SysMakeOrderMapper; import com.ruoyi.system.mapper.SysSalesOrderMapper; import com.ruoyi.system.mapper.SysUserMapper; +import com.ruoyi.system.service.ISysRemindService; import com.ruoyi.system.service.ISysRoleService; import lombok.extern.slf4j.Slf4j; import org.activiti.engine.TaskService; @@ -79,6 +82,9 @@ public class ErpDevelopModifyorderServiceImpl implements IErpDevelopModifyorderS @Autowired private BizTodoItemMapper todoItemMapper; + @Autowired + private ISysRemindService remindService; + /** * 查询开发修改单 * @@ -100,6 +106,23 @@ public class ErpDevelopModifyorderServiceImpl implements IErpDevelopModifyorderS return erpDevelopModifyorderMapper.selectErpDevelopModifyorderListByCodes(developOrderCodes); } + /** + * 根据开发修改单号查询开发修改单详情列表 + * */ + @Override + public List getErpDevelopRemindPeopleList(String developOrderCode) { + List remindList = remindService.selectSysRemindListByBusinessKey(developOrderCode); + + List erpDevelopModifyorderRemindVos = new ArrayList<>(); + for (SysRemind sysRemind : remindList) { + ErpDevelopModifyorderRemindVo modifyorderRemindVo = new ErpDevelopModifyorderRemindVo(); + modifyorderRemindVo.setReceiverUser(sysRemind.getReceiverUser()); + modifyorderRemindVo.setHandleTime(sysRemind.getHandleTime()); + erpDevelopModifyorderRemindVos.add(modifyorderRemindVo); + } + return erpDevelopModifyorderRemindVos; + } + /** * 查询开发修改单列表 * @@ -216,7 +239,7 @@ public class ErpDevelopModifyorderServiceImpl implements IErpDevelopModifyorderS developModifyorderDetailMapper.insertErpDevelopModifyorderDetail(erpDevelopModifyorderDetail); } - + remindService.erpDevelopModifyorderRemind(erpDevelopModifyorder); return erpDevelopModifyorderMapper.insertErpDevelopModifyorder(erpDevelopModifyorder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java index 7189ded2..bd196d7c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java @@ -13,6 +13,7 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.purchase.domain.PurchaseQuoteChild; import com.ruoyi.purchase.domain.PurchaseQuoteHistory; +import com.ruoyi.purchase.domain.Vo.ExportPurchaseQuoteChildVo; import com.ruoyi.purchase.domain.Vo.PurchaseQuoteVo; import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; import com.ruoyi.system.domain.SysCustomerQuoteHistory; @@ -126,6 +127,23 @@ public class PurchaseQuoteController extends BaseController } + /** + * 导出采购报价单列表 + */ + @RequiresPermissions("purchase:purchaseQuote:export") + + @PostMapping("/exportAll") + @ResponseBody + public AjaxResult exportAll(PurchaseQuote purchaseQuote) + { + List purchaseQuoteList = purchaseQuoteService.selectPurchaseQuoteList2(purchaseQuote); + + List list = purchaseQuoteService.getExportPurchaseQuoteChildVoList(purchaseQuoteList); + ExcelUtil util = new ExcelUtil(ExportPurchaseQuoteChildVo.class); + return util.exportExcel(list, "采购报价单数据"); + } + + /** @@ -135,10 +153,11 @@ public class PurchaseQuoteController extends BaseController @PostMapping("/export") @ResponseBody - public AjaxResult export(PurchaseQuote purchaseQuote) + public AjaxResult export(@RequestBody String[] purchaseQuoteCodes) { - List list = purchaseQuoteService.selectPurchaseQuoteList2(purchaseQuote); - ExcelUtil util = new ExcelUtil(PurchaseQuote.class); + List purchaseQuoteList = purchaseQuoteService.selectPurchaseQuoteListByCodes(purchaseQuoteCodes); + List list = purchaseQuoteService.getExportPurchaseQuoteChildVoList(purchaseQuoteList); + ExcelUtil util = new ExcelUtil(ExportPurchaseQuoteChildVo.class); return util.exportExcel(list, "采购报价单数据"); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java index 6ca8b56c..1d82d997 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuote.java @@ -72,6 +72,9 @@ public class PurchaseQuote extends BaseEntity @Excel(name = "使用状态") private String useStatus; + /** 创建时间*/ + private Date createTime; + //图片索引id private Long photoAttachId; @@ -361,6 +364,16 @@ public class PurchaseQuote extends BaseEntity this.applyTime = applyTime; } + @Override + public Date getCreateTime() { + return createTime; + } + + @Override + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseOrderVo.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseOrderVo.java index fb1a86a5..7666e23a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseOrderVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseOrderVo.java @@ -17,6 +17,14 @@ public class ExportPurchaseOrderVo{ @Excel(name = "采购订购单号") private String purchaseOrderCode; + @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd") + private Date createTime; + + + /** 采购计划单号*/ + @Excel(name = "采购计划单号") + private String purchasePlanCode; + /** 供应商ID */ @Excel(name = "供应商ID") private String supplierCode; @@ -25,6 +33,28 @@ public class ExportPurchaseOrderVo{ @Excel(name = "供应商名称") private String supplierName; + + /** 仓库ID */ + @Excel(name = "仓库ID") + private String stockNo; + + /** 仓库名称 */ + @Excel(name = "仓库名称") + private String stockName; + + /** 收货人 */ + @Excel(name = "收货人") + private String receivePerson; + + /** 收货电话 */ + @Excel(name = "收货电话") + private String receivePersonPhone; + + /** 收货地址 */ + @Excel(name = "收货地址") + private String receiveAddress; + + /** 不含税总价(RMB) */ @Excel(name = "不含税总价(RMB)") private BigDecimal noRmbSum; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseQuoteChildVo.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseQuoteChildVo.java new file mode 100644 index 00000000..1854af1d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/ExportPurchaseQuoteChildVo.java @@ -0,0 +1,78 @@ +package com.ruoyi.purchase.domain.Vo; + +import com.ruoyi.common.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + + +/** +* 导出采购报价单详情模板 +* */ +@Data +public class ExportPurchaseQuoteChildVo { + + + /** 采购报价单号 */ + @Excel(name = "采购报价单号") + private String purchaseQuoteCode; + + /** 创建时间*/ + @Excel(name = "创建时间", dateFormat = "yyyy-MM-dd") + private Date createTime; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private String supplierQuoteCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String supplierName; + + /** 税率 */ + @Excel(name = "税率") + private Double taxRate; + + /** 定价日期 */ + @Excel(name = "定价日期") + private String pricingDate; + + + /** 物料表中的编号 */ + @Excel(name = "料号") + private String materialCode; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料加工方式 */ + @Excel(name = "物料加工方式",dictType = "processMethod") + private String processMethod; + + /** 物料品牌 */ + @Excel(name = "物料品牌") + private String brand; + + /** 物料描述 */ + @Excel(name = "物料描述") + private String describe; + + /** 物料数量 */ + @Excel(name = "物料数量") + private Long materialNum; + + /** 物料对外报价 */ + @Excel(name = "物料对外报价") + private BigDecimal materialSole; + + /** 物料不含税单价(RMB) */ + @Excel(name = "物料不含税单价(RMB)") + private BigDecimal materialRmb; + + /** 物料含税单价(RMB) */ + @Excel(name = "物料含税单价(RMB)") + private BigDecimal materialNoRmb; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteMapper.java index 17ef3560..3355970f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteMapper.java @@ -116,4 +116,8 @@ public interface PurchaseQuoteMapper * */ List selectPurchaseQuoteAllList(); + /** + * 根据采购报价单编号批量查询采购报价单 + * */ + List selectPurchaseQuoteListByCodes(String[] purchaseQuoteCodes); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java index 51f5a5bf..bca475bd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteChildService.java @@ -82,4 +82,9 @@ public interface IPurchaseQuoteChildService int restorePurchaseQuoteChildById(Long purchaseQuoteChildId); List selectQuoteChildByMaterialCode(String materialCode); + + /** + * 根据报价单号查询报价单子表物料信息 + * */ + List selectQuoteChildListByQuoteCode(List purchaseQuoteCodeList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java index 6f2bd4af..d62777e6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java @@ -1,6 +1,7 @@ package com.ruoyi.purchase.service; import com.github.pagehelper.Page; +import com.ruoyi.purchase.domain.Vo.ExportPurchaseQuoteChildVo; import com.ruoyi.purchase.domain.Vo.PurchaseQuoteVo; import com.ruoyi.purchase.domain.PurchaseQuote; import org.activiti.engine.runtime.ProcessInstance; @@ -99,4 +100,14 @@ public interface IPurchaseQuoteService * 导入采购报价单 * */ String importPurchaseQuote(List purchaseQuoteList, boolean updateSupport, String operName); + + /** + * 导出采购报价单导出详情页面的数据+单号+单据创建时间 + * */ + List getExportPurchaseQuoteChildVoList(List purchaseQuotes); + + /** + * 根据采购报价单号批量查询采购报价单 + * */ + List selectPurchaseQuoteListByCodes(String[] purchaseQuoteCodes); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java index 6a2164af..25c9a6b9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java @@ -40,10 +40,7 @@ import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.domain.SysSupplier; import com.ruoyi.system.mapper.SysCompanyInformationMapper; import com.ruoyi.system.mapper.SysUserMapper; -import com.ruoyi.system.service.ISysAttachFileService; -import com.ruoyi.system.service.ISysAttachService; -import com.ruoyi.system.service.ISysRoleService; -import com.ruoyi.system.service.ISysSupplierService; +import com.ruoyi.system.service.*; import com.ruoyi.warehouse.domain.WarehouseInventoryInquiry; import com.ruoyi.warehouse.domain.WarehouseStorageOrder; import com.ruoyi.warehouse.domain.WarehouseStorageOrderDetail; @@ -164,6 +161,9 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService @Autowired private IFinancialAccountsPayableService payableService; + @Autowired + private ISysRemindService remindService; + /** * 查询采购订单 @@ -309,6 +309,13 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService for (PurchaseOrderChild child : children) { ExportPurchaseOrderVo exportPurchaseOrderVo = new ExportPurchaseOrderVo(); exportPurchaseOrderVo.setPurchaseOrderCode(purchaseOrder.getPurchaseOrderCode()); + exportPurchaseOrderVo.setCreateTime(purchaseOrder.getCreateTime()); + exportPurchaseOrderVo.setPurchasePlanCode(purchaseOrder.getPurchasePlanCode()); + exportPurchaseOrderVo.setStockNo(purchaseOrder.getStockNo()); + exportPurchaseOrderVo.setStockName(purchaseOrder.getStockName()); + exportPurchaseOrderVo.setReceivePerson(purchaseOrder.getReceivePerson()); + exportPurchaseOrderVo.setReceivePersonPhone(purchaseOrder.getReceivePersonPhone()); + exportPurchaseOrderVo.setReceiveAddress(purchaseOrder.getReceiveAddress()); exportPurchaseOrderVo.setSupplierName(purchaseOrder.getSupplierName()); exportPurchaseOrderVo.setSupplierCode(purchaseOrder.getSupplierCode()); exportPurchaseOrderVo.setNoRmbSum(purchaseOrder.getNoRmbSum()); @@ -486,6 +493,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService if (updateInventoryInquiry <= 0){ throw new BusinessException("更新库存查询记录失败"); } + remindService.warehouseSafetyStockRemind(warehouseInventoryInquiry); } @@ -778,6 +786,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService if (result <= 0){ throw new BusinessException("更新库存查询记录失败"); } + remindService.warehouseSafetyStockRemind(warehouseInventoryInquiry); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java index 7f9f3bec..056dde56 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteChildServiceImpl.java @@ -133,4 +133,12 @@ public class PurchaseQuoteChildServiceImpl implements IPurchaseQuoteChildService public List selectQuoteChildByMaterialCode(String materialCode) { return purchaseQuoteChildMapper.selectQuoteChildByMaterialCode(materialCode); } + + /** + * 根据报价单号查询报价单子表物料信息 + * */ + @Override + public List selectQuoteChildListByQuoteCode(List purchaseQuoteCodeList) { + return purchaseQuoteChildMapper.selectPurchaseQuoteChildListByQuoteCodeList(purchaseQuoteCodeList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java index b145b3da..13fcbd0b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.purchase.service.impl; import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; import com.github.pagehelper.Page; import com.ruoyi.common.core.domain.entity.SysUser; @@ -12,13 +14,13 @@ import com.ruoyi.common.service.ICommonService; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.purchase.domain.PurchaseQuoteHistory; +import com.ruoyi.purchase.domain.*; +import com.ruoyi.purchase.domain.Vo.ExportPurchaseQuoteChildVo; import com.ruoyi.purchase.domain.Vo.PurchaseQuoteVo; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; import com.ruoyi.system.domain.SysAttach; -import com.ruoyi.purchase.domain.PurchaseQuoteChild; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.ISysAttachFileService; import com.ruoyi.system.service.ISysAttachService; @@ -32,7 +34,6 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.purchase.mapper.PurchaseQuoteMapper; -import com.ruoyi.purchase.domain.PurchaseQuote; import com.ruoyi.purchase.service.IPurchaseQuoteService; import com.ruoyi.common.core.text.Convert; import org.springframework.transaction.annotation.Transactional; @@ -164,12 +165,18 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService @Override public Page selectPurchaseQuoteList2(PurchaseQuote purchaseQuote){ - PageDomain pageDomain = TableSupport.buildPageRequest(); - Integer pageNum = pageDomain.getPageNum(); - Integer pageSize = pageDomain.getPageSize(); Page list = purchaseQuoteMapper.selectPurchaseQuoteList2(purchaseQuote); return list; } + + /** + * 根据采购报价单编号批量查询采购报价单 + * */ + @Override + public List selectPurchaseQuoteListByCodes(String[] purchaseQuoteCodes) { + return purchaseQuoteMapper.selectPurchaseQuoteListByCodes(purchaseQuoteCodes); + } + /** * 新增采购报价单 * @@ -527,4 +534,51 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService return successMsg.toString(); } + + /** + * 导出采购报价单 + * */ + @Override + public List getExportPurchaseQuoteChildVoList(List purchaseQuotes) { + + if (!CollectionUtils.isEmpty(purchaseQuotes)){ + List exportPurchaseQuoteChildVoList = new ArrayList<>(); + List purchaseQuoteCodeList = purchaseQuotes.stream().map(PurchaseQuote::getPurchaseQuoteCode).collect(Collectors.toList()); + List purchaseQuoteChildList = purchaseQuoteChildService.selectQuoteChildListByQuoteCode(purchaseQuoteCodeList); + // 创建一个 map 用于快速查找主表数据 + Map purchaseQuoteMap = purchaseQuotes.stream() + .collect(Collectors.toMap(PurchaseQuote::getPurchaseQuoteCode, Function.identity())); + + // 创建一个 map 用于快速查找子表数据 + Map> purchaseQuoteChildMap = purchaseQuoteChildList.stream() + .collect(Collectors.groupingBy(PurchaseQuoteChild::getPurchaseQuoteCode)); + + for (PurchaseQuoteChild purchaseQuoteChild : purchaseQuoteChildList) { + ExportPurchaseQuoteChildVo exportPurchaseQuoteChildVo = new ExportPurchaseQuoteChildVo(); + PurchaseQuote purchaseQuote = purchaseQuoteMap.get(purchaseQuoteChild.getPurchaseQuoteCode()); + exportPurchaseQuoteChildVo.setPurchaseQuoteCode(purchaseQuoteChild.getPurchaseQuoteCode()); + exportPurchaseQuoteChildVo.setCreateTime(purchaseQuote.getCreateTime()); + exportPurchaseQuoteChildVo.setSupplierQuoteCode(purchaseQuote.getSupplierQuoteCode()); + exportPurchaseQuoteChildVo.setSupplierName(purchaseQuote.getSupplierName()); + exportPurchaseQuoteChildVo.setTaxRate(purchaseQuote.getTaxRate()); + exportPurchaseQuoteChildVo.setPricingDate(purchaseQuote.getPricingDate()); + exportPurchaseQuoteChildVo.setMaterialCode(purchaseQuoteChild.getMaterialCode()); + exportPurchaseQuoteChildVo.setMaterialName(purchaseQuoteChild.getMaterialName()); + exportPurchaseQuoteChildVo.setProcessMethod(purchaseQuoteChild.getProcessMethod()); + exportPurchaseQuoteChildVo.setBrand(purchaseQuoteChild.getBrand()); + exportPurchaseQuoteChildVo.setDescribe(purchaseQuoteChild.getDescribe()); + exportPurchaseQuoteChildVo.setMaterialNum(purchaseQuoteChild.getMaterialNum()); + exportPurchaseQuoteChildVo.setMaterialSole(purchaseQuoteChild.getMaterialSole()); + exportPurchaseQuoteChildVo.setMaterialRmb(purchaseQuoteChild.getMaterialRmb()); + exportPurchaseQuoteChildVo.setMaterialNoRmb(purchaseQuoteChild.getMaterialNoRmb()); + exportPurchaseQuoteChildVoList.add(exportPurchaseQuoteChildVo); + + } + return exportPurchaseQuoteChildVoList; + + } + + + return Collections.emptyList(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysRemindController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysRemindController.java new file mode 100644 index 00000000..d46bbbfd --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysRemindController.java @@ -0,0 +1,261 @@ +package com.ruoyi.system.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.ruoyi.common.constant.BusinessKeysConstants; +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.process.todoitem.domain.BizTodoItem; +import com.ruoyi.system.service.ISysUserService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.SysRemind; +import com.ruoyi.system.service.ISysRemindService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +import javax.servlet.http.HttpServletRequest; + +/** + * 系统提醒Controller + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +@Controller +@RequestMapping("/system/remind") +public class SysRemindController extends BaseController +{ + private String prefix = "system/remind"; + + @Autowired + private ISysRemindService sysRemindService; + + @Autowired + private ISysUserService sysUserService; + + @GetMapping() + public String remind(Map mmap) + { + mmap.put("currentUser", ShiroUtils.getSysUser()); + return prefix + "/remind"; + } + + /** + * 查询系统提醒列表 + */ + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysRemind sysRemind) + { + startPage(); + List list = sysRemindService.selectSysRemindList(sysRemind); + return getDataTable(list); + } + + /** + * 系统提醒不分页 + * */ + @RequestMapping("/getRemindListNoPaging") + @ResponseBody + public List getRemindListNoPaging(HttpServletRequest request) { + Map paraMap = new HashMap(); + paraMap.put("receiverUser", ShiroUtils.getLoginName()); + // 待办参数 + paraMap.put("isHandle","0"); + List list = sysRemindService.selectUnHandleSysRemindList(paraMap); + + list.forEach(item->{ + if (BusinessKeysConstants.ERP_DEVELOPMENT_MODIFY.equals(item.getModule())){ + item.setModule("开发修改单"); + } + if (BusinessKeysConstants.WAREHOUSE_INQUIRY.equals(item.getModule())){ + item.setModule("仓库库存查询"); + } + }); + return list; + } + + + /** + * 导出系统提醒列表 + */ + @Log(title = "系统提醒", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysRemind sysRemind) + { + List list = sysRemindService.selectSysRemindList(sysRemind); + ExcelUtil util = new ExcelUtil(SysRemind.class); + return util.exportExcel(list, "系统提醒数据"); + } + + /** + * 新增系统提醒 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.insertSysRemind(sysRemind)); + } + + + /** + * 处理系统提醒 + */ + @GetMapping("/handle/{remindId}") + @ResponseBody // 确保返回的是JSON格式的数据 + public Map handle(@PathVariable("remindId") Long remindId) { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + String moduleUrl = sysRemind.getModuleUrl(); + + Map result = new HashMap<>(); + result.put("url", moduleUrl); + + return result; + } + + /** + * 修改系统提醒手动确认处理 + */ + @GetMapping("/manualHandle/{remindId}") + public String manualHandle(@PathVariable("remindId") Long remindId, ModelMap mmap) + { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + + mmap.put("sysRemind", sysRemind); + return prefix + "/manualHandle"; + } + + /** + * 修改保存系统提醒手动确认处理 + */ + @Log(title = "系统提醒", businessType = BusinessType.UPDATE) + @PostMapping("/manualHandle") + @ResponseBody + public AjaxResult manualHandleSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.updateManualHandleSysRemind(sysRemind)); + } + + + + /** + * 修改系统提醒 + */ + @GetMapping("/edit/{remindId}") + public String edit(@PathVariable("remindId") Long remindId, ModelMap mmap) + { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + + mmap.put("sysRemind", sysRemind); + return prefix + "/edit"; + } + + /** + * 修改保存系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.updateSysRemind(sysRemind)); + } + + + + /** + * 修改系统提醒详情 + */ + @GetMapping("/detail/{remindId}") + public String detail(@PathVariable("remindId") Long remindId, ModelMap mmap) + { + SysRemind sysRemind = sysRemindService.selectSysRemindById(remindId); + mmap.put("sysRemind", sysRemind); + return prefix + "/detail"; + } + + /** + * 修改保存系统提醒详情 + */ + @Log(title = "系统提醒", businessType = BusinessType.UPDATE) + @PostMapping("/detail") + @ResponseBody + public AjaxResult detailSave(SysRemind sysRemind) + { + return toAjax(sysRemindService.detailSysRemind(sysRemind)); + } + + + + /** + * 删除系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysRemindService.deleteSysRemindByIds(ids)); + } + + /** + * 作废系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(sysRemindService.cancelSysRemindById(id)); + } + + /** + * 恢复系统提醒 + */ + @Log(title = "系统提醒", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(sysRemindService.restoreSysRemindById(id)); + } + + + /** + * 查询所有接收人 + * */ + @PostMapping("/getAllReceiverUser") + @ResponseBody + public TableDataInfo getAllReceiverUser() { + startPage(); + List sysUsers = sysUserService.selectUserAll(); + return getDataTable(sysUsers); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysRemind.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysRemind.java new file mode 100644 index 00000000..9d1c8c8f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysRemind.java @@ -0,0 +1,279 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 系统提醒对象 sys_remind + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +public class SysRemind extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 提醒表Id */ + private Long remindId; + + /** 提醒人ID */ + private Long remindUserId; + + /** 提醒人 */ + @Excel(name = "提醒人") + private String remindUser; + + /** 提醒人部门ID */ + private Long remindDeptId; + + /** 接受人ID */ + private Long receiverUserId; + + /** 接受人 */ + @Excel(name = "接受人") + private String receiverUser; + + /** 接受人部门ID */ + private Long receiverDeptId; + + + /** 处理人ID */ + private Long handleUserId; + + /** 处理人 */ + @Excel(name = "处理人") + private String handleUser; + + /** 处理人部门ID */ + private Long handleDeptId; + + + + + /** 提醒时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "提醒时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date remindTime; + + /** 处理时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date handleTime; + + /** 提醒内容 */ + @Excel(name = "提醒内容") + private String remindContent; + + /** 与各个业务模块关联的唯一索引*/ + private String businessKey; + + + /** 模块名称 存储的数据来自BusinessKeysConstants常量类 */ + private String module; + + /** 模块url */ + @Excel(name = "模块url") + private String moduleUrl; + + /** 是否查看 default 0 (0 否 1 是) */ + @Excel(name = "是否查看",dictType = "yes_or_no") + private String isView; + + /** 是否处理 default 0 (0 否 1 是) */ + @Excel(name = "是否处理",dictType = "yes_or_no") + private String isHandle; + + public void setRemindId(Long remindId) + { + this.remindId = remindId; + } + + public Long getRemindId() + { + return remindId; + } + public void setRemindUserId(Long remindUserId) + { + this.remindUserId = remindUserId; + } + + public Long getRemindUserId() + { + return remindUserId; + } + public void setRemindUser(String remindUser) + { + this.remindUser = remindUser; + } + + public String getRemindUser() + { + return remindUser; + } + public void setRemindDeptId(Long remindDeptId) + { + this.remindDeptId = remindDeptId; + } + + public Long getRemindDeptId() + { + return remindDeptId; + } + public void setReceiverUserId(Long receiverUserId) + { + this.receiverUserId = receiverUserId; + } + + public Long getReceiverUserId() + { + return receiverUserId; + } + public void setReceiverUser(String receiverUser) + { + this.receiverUser = receiverUser; + } + + public String getReceiverUser() + { + return receiverUser; + } + public void setReceiverDeptId(Long receiverDeptId) + { + this.receiverDeptId = receiverDeptId; + } + + public Long getReceiverDeptId() + { + return receiverDeptId; + } + + public Long getHandleUserId() { + return handleUserId; + } + + public void setHandleUserId(Long handleUserId) { + this.handleUserId = handleUserId; + } + + public String getHandleUser() { + return handleUser; + } + + public void setHandleUser(String handleUser) { + this.handleUser = handleUser; + } + + public Long getHandleDeptId() { + return handleDeptId; + } + + public void setHandleDeptId(Long handleDeptId) { + this.handleDeptId = handleDeptId; + } + + public void setRemindTime(Date remindTime) + { + this.remindTime = remindTime; + } + + public Date getRemindTime() + { + return remindTime; + } + public void setHandleTime(Date handleTime) + { + this.handleTime = handleTime; + } + + public Date getHandleTime() + { + return handleTime; + } + public void setRemindContent(String remindContent) + { + this.remindContent = remindContent; + } + + public String getRemindContent() + { + return remindContent; + } + + public String getBusinessKey() { + return businessKey; + } + + public void setBusinessKey(String businessKey) { + this.businessKey = businessKey; + } + + public void setModule(String module) + { + this.module = module; + } + + public String getModule() + { + return module; + } + public void setModuleUrl(String moduleUrl) + { + this.moduleUrl = moduleUrl; + } + + public String getModuleUrl() + { + return moduleUrl; + } + public void setIsView(String isView) + { + this.isView = isView; + } + + public String getIsView() + { + return isView; + } + public void setIsHandle(String isHandle) + { + this.isHandle = isHandle; + } + + public String getIsHandle() + { + return isHandle; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("remindId", getRemindId()) + .append("remindUserId", getRemindUserId()) + .append("remindUser", getRemindUser()) + .append("remindDeptId", getRemindDeptId()) + .append("receiverUserId", getReceiverUserId()) + .append("receiverUser", getReceiverUser()) + .append("receiverDeptId", getReceiverDeptId()) + .append("handleUserId", getHandleUserId()) + .append("handleUser", getHandleUser()) + .append("handleDeptId", getHandleDeptId()) + .append("remindTime", getRemindTime()) + .append("handleTime", getHandleTime()) + .append("remindContent", getRemindContent()) + .append("businessKey", getBusinessKey()) + .append("module", getModule()) + .append("moduleUrl", getModuleUrl()) + .append("isView", getIsView()) + .append("isHandle", getIsHandle()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysRemindMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysRemindMapper.java new file mode 100644 index 00000000..38c134ab --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysRemindMapper.java @@ -0,0 +1,86 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.system.domain.SysRemind; + +/** + * 系统提醒Mapper接口 + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +public interface SysRemindMapper +{ + /** + * 查询系统提醒 + * + * @param remindId 系统提醒ID + * @return 系统提醒 + */ + public SysRemind selectSysRemindById(Long remindId); + + /** + * 查询系统提醒列表 + * + * @param sysRemind 系统提醒 + * @return 系统提醒集合 + */ + public List selectSysRemindList(SysRemind sysRemind); + + /** + * 新增系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int insertSysRemind(SysRemind sysRemind); + + /** + * 修改系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int updateSysRemind(SysRemind sysRemind); + + /** + * 删除系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int deleteSysRemindById(Long remindId); + + /** + * 批量删除系统提醒 + * + * @param remindIds 需要删除的数据ID + * @return 结果 + */ + public int deleteSysRemindByIds(String[] remindIds); + + /** + * 作废系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int cancelSysRemindById(Long remindId); + + /** + * 恢复系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int restoreSysRemindById(Long remindId); + + List selectUnHandleSysRemindList(Map paraMap); + + /** + * 根据业务主键查询系统提醒列表 + * */ + List selectSysRemindListByBusinessKey(String businessKey); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysRemindService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysRemindService.java new file mode 100644 index 00000000..9f1d2f99 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysRemindService.java @@ -0,0 +1,110 @@ +package com.ruoyi.system.service; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.erp.domain.ErpDevelopModifyorder; +import com.ruoyi.system.domain.SysRemind; +import com.ruoyi.warehouse.domain.WarehouseInventoryInquiry; + +/** + * 系统提醒Service接口 + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +public interface ISysRemindService { + /** + * 查询系统提醒 + * + * @param remindId 系统提醒ID + * @return 系统提醒 + */ + public SysRemind selectSysRemindById(Long remindId); + + /** + * 查询系统提醒列表 + * + * @param sysRemind 系统提醒 + * @return 系统提醒集合 + */ + public List selectSysRemindList(SysRemind sysRemind); + + /** + * 新增系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int insertSysRemind(SysRemind sysRemind); + + /** + * 修改系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + public int updateSysRemind(SysRemind sysRemind); + + /** + * 批量删除系统提醒 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysRemindByIds(String ids); + + /** + * 删除系统提醒信息 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + public int deleteSysRemindById(Long remindId); + + /** + * 作废系统提醒 + * + * @param remindId 系统提醒ID + * @return + */ + int cancelSysRemindById(Long remindId); + + /** + * 恢复系统提醒 + * + * @param remindId 系统提醒ID + * @return + */ + int restoreSysRemindById(Long remindId); + + /** + * 查询待处理的提醒项列表 + */ + List selectUnHandleSysRemindList(Map paraMap); + + /** + * 通用保存系统提醒详情 + */ + int detailSysRemind(SysRemind sysRemind); + + /** + * 手动处理系统提醒 + */ + int updateManualHandleSysRemind(SysRemind sysRemind); + + /** + * 仓库安全库存提醒 + * */ + int warehouseSafetyStockRemind(WarehouseInventoryInquiry warehouseInventoryInquiry); + + /** + * 开发修改单通知人提醒 + * */ + int erpDevelopModifyorderRemind(ErpDevelopModifyorder erpDevelopModifyorder); + + /** + * 根据业务主键查询提醒列表 + * */ + List selectSysRemindListByBusinessKey(String businessKey); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickServiceImpl.java index 7213447b..da30edff 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickServiceImpl.java @@ -20,6 +20,7 @@ import com.ruoyi.system.mapper.SysMakeorderPickMapper; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.ISysMakeorderPickDetailService; import com.ruoyi.system.service.ISysMakeorderPickService; +import com.ruoyi.system.service.ISysRemindService; import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.warehouse.domain.WarehouseInventoryInquiry; import com.ruoyi.warehouse.service.IWarehouseInventoryInquiryService; @@ -74,6 +75,9 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService @Autowired private IWarehouseInventoryInquiryService inventoryInquiryService; + @Autowired + private ISysRemindService remindService; + /** * 查询生产领料单 * @@ -281,6 +285,8 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService throw new BusinessException("更新库存信息失败"); } + remindService.warehouseSafetyStockRemind(inventoryInquiry); + int insertMakeorderPickDetailResult = makeorderPickDetailService.insertSysMakeorderPickDetail(pickDetail); if (insertMakeorderPickDetailResult <= 0){ throw new BusinessException("新增生产领料单详情失败"); @@ -501,6 +507,7 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService throw new BusinessException("更新库存信息失败"); } + remindService.warehouseSafetyStockRemind(inventoryInquiry); int updateMakeorderPickDetailResult = makeorderPickDetailService.updateSysMakeorderPickDetail(pickDetail); if (updateMakeorderPickDetailResult <= 0){ throw new BusinessException("更新生产领料单详情失败"); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysRemindServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysRemindServiceImpl.java new file mode 100644 index 00000000..df5ccd3b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysRemindServiceImpl.java @@ -0,0 +1,266 @@ +package com.ruoyi.system.service.impl; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +import com.ruoyi.common.constant.BusinessKeysConstants; +import com.ruoyi.common.core.domain.entity.SysDept; +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.erp.domain.ErpDevelopModifyorder; +import com.ruoyi.erp.domain.vo.ErpDevelopModifyorderRemindVo; +import com.ruoyi.erp.service.IErpDevelopModifyorderService; +import com.ruoyi.system.service.ISysDeptService; +import com.ruoyi.system.service.ISysUserService; +import com.ruoyi.warehouse.domain.WarehouseInventoryInquiry; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.SysRemindMapper; +import com.ruoyi.system.domain.SysRemind; +import com.ruoyi.system.service.ISysRemindService; +import com.ruoyi.common.core.text.Convert; + +/** + * 系统提醒Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-12-20 + */ +@Service +public class SysRemindServiceImpl implements ISysRemindService { + @Autowired + private SysRemindMapper sysRemindMapper; + + @Autowired + private ISysUserService sysUserService; + + @Autowired + private ISysDeptService sysDeptService; + + @Autowired + private IErpDevelopModifyorderService developModifyorderService; + + /** + * 查询系统提醒 + * + * @param remindId 系统提醒ID + * @return 系统提醒 + */ + @Override + public SysRemind selectSysRemindById(Long remindId) { + return sysRemindMapper.selectSysRemindById(remindId); + } + + /** + * 查询系统提醒列表 + * + * @param sysRemind 系统提醒 + * @return 系统提醒 + */ + @Override + public List selectSysRemindList(SysRemind sysRemind) { + return sysRemindMapper.selectSysRemindList(sysRemind); + } + + /** + * 查询未处理系统提醒列表 + * + * @param paraMap 系统提醒 + * @return 系统提醒 + */ + @Override + public List selectUnHandleSysRemindList(Map paraMap) { + List list = sysRemindMapper.selectUnHandleSysRemindList(paraMap); + return list; + } + + /** + * 根据业务主键查询系统提醒列表 + * + * @param businessKey 系统提醒 + * @return 系统提醒 + */ + @Override + public List selectSysRemindListByBusinessKey(String businessKey) { + List list = sysRemindMapper.selectSysRemindListByBusinessKey(businessKey); + return list; + } + + /** + * 新增系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + @Override + public int insertSysRemind(SysRemind sysRemind) { + String loginName = ShiroUtils.getLoginName(); + sysRemind.setCreateBy(loginName); + sysRemind.setCreateTime(DateUtils.getNowDate()); + return sysRemindMapper.insertSysRemind(sysRemind); + } + + /** + * 修改系统提醒 + * + * @param sysRemind 系统提醒 + * @return 结果 + */ + @Override + public int updateSysRemind(SysRemind sysRemind) { + String loginName = ShiroUtils.getLoginName(); + sysRemind.setUpdateBy(loginName); + sysRemind.setUpdateTime(DateUtils.getNowDate()); + return sysRemindMapper.updateSysRemind(sysRemind); + } + + + /** + * 手动处理系统提醒 + */ + @Override + public int updateManualHandleSysRemind(SysRemind sysRemind) { + + String loginName = ShiroUtils.getLoginName(); + sysRemind.setHandleTime(DateUtils.getNowDate()); + sysRemind.setIsHandle("1"); + sysRemind.setIsView("1"); + sysRemind.setHandleUser(loginName); + sysRemind.setUpdateBy(loginName); + sysRemind.setUpdateTime(DateUtils.getNowDate()); + + return sysRemindMapper.updateSysRemind(sysRemind); + } + + + /** + * 通用保存系统详情 + */ + @Override + public int detailSysRemind(SysRemind sysRemind) { + return 1; + } + + /** + * 删除系统提醒对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysRemindByIds(String ids) { + return sysRemindMapper.deleteSysRemindByIds(Convert.toStrArray(ids)); + } + + /** + * 删除系统提醒信息 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + @Override + public int deleteSysRemindById(Long remindId) { + return sysRemindMapper.deleteSysRemindById(remindId); + } + + /** + * 作废系统提醒 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + @Override + public int cancelSysRemindById(Long remindId) { + return sysRemindMapper.cancelSysRemindById(remindId); + } + + /** + * 恢复系统提醒信息 + * + * @param remindId 系统提醒ID + * @return 结果 + */ + @Override + public int restoreSysRemindById(Long remindId) { + return sysRemindMapper.restoreSysRemindById(remindId); + } + + + /** + * 仓库安全库存提醒 + */ + @Override + public int warehouseSafetyStockRemind(WarehouseInventoryInquiry warehouseInventoryInquiry) { + int insertSysRemind = 0; + String deptNumber = "MFG"; + SysDept sysDept = sysDeptService.selectDeptByDeptNumber(deptNumber); + Long deptId = sysDept.getDeptId(); + List sysUsers = sysUserService.selectUserByDeptId(deptId); + Integer availableStockNum = warehouseInventoryInquiry.getAvailableStockNum(); + Integer safetyStockNum = warehouseInventoryInquiry.getSafetyStockNum(); + + String materialNo = warehouseInventoryInquiry.getMaterialNo(); + String materialName = warehouseInventoryInquiry.getMaterialName(); + if (availableStockNum < safetyStockNum) { + + for (SysUser sysUser : sysUsers) { + // 提醒 + SysRemind sysRemind = new SysRemind(); + sysRemind.setBusinessKey(materialNo); + sysRemind.setReceiverUserId(sysUser.getUserId()); + sysRemind.setReceiverUser(sysUser.getLoginName()); + sysRemind.setReceiverDeptId(deptId); + sysRemind.setRemindContent("物料编号:" + materialNo + "物料名称:" + materialName + "库存数量:" + availableStockNum + "安全库存数量:" + safetyStockNum + ",库存数量低于安全库存数量,请及时处理!"); + sysRemind.setRemindTime(new Date()); + sysRemind.setModule(BusinessKeysConstants.WAREHOUSE_INQUIRY); + sysRemind.setModuleUrl("warehouse/inventoryInquiry"); + sysRemind.setIsView("0"); + sysRemind.setIsHandle("0"); + sysRemind.setCreateBy(ShiroUtils.getLoginName()); + sysRemind.setCreateTime(DateUtils.getNowDate()); + insertSysRemind += sysRemindMapper.insertSysRemind(sysRemind); + if (insertSysRemind <= 0) { + throw new BusinessException("插入系统提醒失败,未影响任何行"); + } + } + } + + return insertSysRemind; + } + + + /** + * 开发修改单通知人提醒 + */ + @Override + public int erpDevelopModifyorderRemind(ErpDevelopModifyorder erpDevelopModifyorder) { + String loginName = ShiroUtils.getLoginName(); + int insertSysRemind = 0; + List modifyorderRemindVos = erpDevelopModifyorder.getModifyorderRemindVos(); + String developOrderCode = erpDevelopModifyorder.getDevelopOrderCode(); + for (ErpDevelopModifyorderRemindVo modifyorderRemindVo : modifyorderRemindVos) { + // 提醒 + SysRemind sysRemind = new SysRemind(); + sysRemind.setBusinessKey(developOrderCode); + sysRemind.setReceiverUser(modifyorderRemindVo.getReceiverUser()); + sysRemind.setRemindUser(loginName); + sysRemind.setRemindContent("开发修改单编号:" + developOrderCode + ",进行修改物料,请及时处理!"); + sysRemind.setRemindTime(new Date()); + sysRemind.setModule(BusinessKeysConstants.ERP_DEVELOPMENT_MODIFY); + sysRemind.setModuleUrl("erp/developModifyOrder"); + sysRemind.setIsView("0"); + sysRemind.setIsHandle("0"); + sysRemind.setCreateBy(ShiroUtils.getLoginName()); + sysRemind.setCreateTime(DateUtils.getNowDate()); + insertSysRemind += sysRemindMapper.insertSysRemind(sysRemind); + if (insertSysRemind <= 0) { + throw new BusinessException("插入系统提醒失败,未影响任何行"); + } + } + + return insertSysRemind; + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java index 90c58b86..acba8d31 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java @@ -34,6 +34,7 @@ import com.ruoyi.system.dto.ExportShippingInvoiceDto; import com.ruoyi.system.dto.ExportShippingOrderDto; import com.ruoyi.system.dto.ExportShippingPackingDto; import com.ruoyi.system.mapper.*; +import com.ruoyi.system.service.ISysRemindService; import com.ruoyi.warehouse.domain.WarehouseInventoryInquiry; import com.ruoyi.warehouse.domain.WarehouseOutOrder; import com.ruoyi.warehouse.mapper.WarehouseInventoryInquiryMapper; @@ -90,6 +91,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor @Autowired private WarehouseInventoryInquiryMapper inventoryInquiryMapper; + @Autowired + private ISysRemindService remindService; + /** * 查询销售出货通知 * @@ -320,6 +324,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor throw new BusinessException("更新库存查询记录失败"); } + remindService.warehouseSafetyStockRemind(inventoryInquiry); sysSalesShippingInformDetail.setOutOrderCode(outOrderCode); sysSalesShippingInformDetail.setMaterialNo(sysSalesOrderChild.getMaterialCode()); sysSalesShippingInformDetail.setMaterialName(sysSalesOrderChild.getMaterialName()); @@ -466,6 +471,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor if (inventoryUpdateResult<=0){ throw new BusinessException("更新库存查询记录失败"); } + remindService.warehouseSafetyStockRemind(inventoryInquiry); AfterSalesShippingDevice afterSalesShippingDevice = new AfterSalesShippingDevice(); afterSalesShippingDevice.setMaterialNo(materialNo); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java index 8e7fbcf0..1ae85f59 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseInventoryInquiryController.java @@ -186,4 +186,29 @@ public class WarehouseInventoryInquiryController extends BaseController return toAjax(warehouseInventoryInquiryService.updateAvailableStock(warehouseInventoryInquiry)); } + + /** + * 设置安全库存 + * */ + @GetMapping("/setSafetyStock/{inventoryInquiryId}") + public String setSafetyStock(@PathVariable("inventoryInquiryId") Long inventoryInquiryId, ModelMap mmap) + { + WarehouseInventoryInquiry warehouseInventoryInquiry = warehouseInventoryInquiryService.showEditAvailableStock(inventoryInquiryId); + + mmap.put("warehouseInventoryInquiry", warehouseInventoryInquiry); + return prefix + "/setSafetyStock"; + } + + + /** + * 设置保存安全库存 + */ + @Log(title = "仓库库存查询", businessType = BusinessType.UPDATE) + @PostMapping("/setSafetyStock") + @ResponseBody + public AjaxResult setSafetyStockSave(WarehouseInventoryInquiry warehouseInventoryInquiry) + { + return toAjax(warehouseInventoryInquiryService.updateSetSafetyStock(warehouseInventoryInquiry)); + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiry.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiry.java index c8b71881..25525a34 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiry.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryInquiry.java @@ -85,6 +85,8 @@ public class WarehouseInventoryInquiry extends BaseEntity @Excel(name = "可用库存数", sort = 9) private Integer availableStockNum; + /** 安全库存数*/ + private Integer safetyStockNum; /** 未占用共享可用库存*/ private Integer noOccupancyNum; @@ -272,6 +274,14 @@ public class WarehouseInventoryInquiry extends BaseEntity this.availableStockNum = availableStockNum; } + public Integer getSafetyStockNum() { + return safetyStockNum; + } + + public void setSafetyStockNum(Integer safetyStockNum) { + this.safetyStockNum = safetyStockNum; + } + public Integer getNoOccupancyNum() { return noOccupancyNum; } @@ -386,8 +396,9 @@ public class WarehouseInventoryInquiry extends BaseEntity .append("lockStockNum", getLockStockNum()) .append("stockLossesNum", getStockLossesNum()) .append("availableStockNum", getAvailableStockNum()) + .append("safetyStockNum", getSafetyStockNum()) .append("noOccupancyNum", getNoOccupancyNum()) - .append("editStockNum", getEditStockNum()) + .append("editStockNum", getEditStockNum()) .append("inventoryEditType", getInventoryEditType()) .append("attributionAvailableStockNum", getAttributionAvailableStockNum()) .append("noattributionAvailableStockNum", getNoattributionAvailableStockNum()) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java index e378b618..741ba8ef 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseInventoryInquiryService.java @@ -112,4 +112,9 @@ public interface IWarehouseInventoryInquiryService { * 修改保存库存履历 * */ int updateWarehouseInventoryHistory(WarehouseInventoryInquiry warehouseInventoryInquiry); + + /** + * 修改保存安全库存 + * */ + int updateSetSafetyStock(WarehouseInventoryInquiry warehouseInventoryInquiry); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java index 5f17c904..fa4b56d5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseInventoryInquiryServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.warehouse.service.impl; import java.util.Collections; +import java.util.Date; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @@ -302,7 +303,17 @@ public class WarehouseInventoryInquiryServiceImpl implements IWarehouseInventory @Override public int updateWarehouseInventoryHistory(WarehouseInventoryInquiry warehouseInventoryInquiry) { - return 1; } + + /** + * 修改保存安全库存 + * */ + @Override + public int updateSetSafetyStock(WarehouseInventoryInquiry warehouseInventoryInquiry) { + + warehouseInventoryInquiry.setUpdateBy(ShiroUtils.getLoginName()); + warehouseInventoryInquiry.setUpdateTime(new Date()); + return warehouseInventoryInquiryMapper.updateWarehouseInventoryInquiry(warehouseInventoryInquiry); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java index 4699d450..5d2f890c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java @@ -27,6 +27,7 @@ import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.Vo.BaseEmpRequisiteOrderVO; import com.ruoyi.system.domain.Vo.OutsourceRequisitionVO; import com.ruoyi.system.mapper.*; +import com.ruoyi.system.service.ISysRemindService; import com.ruoyi.warehouse.domain.*; import com.ruoyi.warehouse.mapper.WarehouseInventoryInquiryDetailMapper; import com.ruoyi.warehouse.mapper.WarehouseInventoryInquiryMapper; @@ -112,6 +113,8 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService @Autowired private AfterSalesShippingDeviceMapper shippingDeviceMapper; + @Autowired + private ISysRemindService sysRemindService; /** * 查询仓库出库单 @@ -584,6 +587,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService inventoryInquiry.setUpdateTime(DateUtils.getNowDate()); int inquiryUpdateResult = inventoryInquiryMapper.updateWarehouseInventoryInquiry(inventoryInquiry); + sysRemindService.warehouseSafetyStockRemind(inventoryInquiry); return inquiryUpdateResult; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java index 651f386f..a386c2b5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java @@ -29,6 +29,7 @@ import com.ruoyi.quality.service.IQualityOrderService; import com.ruoyi.system.domain.*; import com.ruoyi.system.mapper.*; import com.ruoyi.system.service.ISysMakeOrderService; +import com.ruoyi.system.service.ISysRemindService; import com.ruoyi.system.service.ISysSalesOrderService; import com.ruoyi.warehouse.domain.*; import com.ruoyi.warehouse.mapper.*; @@ -131,6 +132,9 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS @Autowired private SysMakeorderPickMapper makeorderPickMapper; + @Autowired + private ISysRemindService remindService; + /** * 查询仓库入库单 * @@ -773,6 +777,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS throw new BusinessException("更新库存查询记录失败!"); } + remindService.warehouseSafetyStockRemind(oldWarehouseInventoryInquiry); + WarehouseInventoryInquiryDetail inquiryDetail = new WarehouseInventoryInquiryDetail(); inquiryDetail.setMaterialNo(materialNo); inquiryDetail.setInquiryWarehouseType("0");//采购入库 @@ -821,6 +827,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS throw new BusinessException("更新库存查询记录失败!"); } + remindService.warehouseSafetyStockRemind(oldWarehouseInventoryInquiry); + WarehouseInventoryInquiryDetail inquiryDetail = new WarehouseInventoryInquiryDetail(); inquiryDetail.setMaterialNo(materialNo); inquiryDetail.setInquiryWarehouseType("0");//采购入库 @@ -1861,6 +1869,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS inquiry.setUpdateBy(ShiroUtils.getLoginName()); inquiry.setUpdateTime(DateUtils.getNowDate()); + remindService.warehouseSafetyStockRemind(inquiry); + return warehouseInventoryInquiryMapper.updateWarehouseInventoryInquiry(inquiry); } } diff --git a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml index 129d3212..01f65be3 100644 --- a/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml @@ -123,14 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and p.create_time between #{params.beginCreateTime} and #{params.endCreateTime} and p.audit_status = #{auditStatus} and p.use_status = #{useStatus} - and p.instance_id = #{instanceId} - and p.instance_type = #{instanceType} - and p.submit_instance_id = #{submitInstanceId} - and p.cancel_instance_id = #{cancelInstanceId} - and p.restore_instance_id = #{restoreInstanceId} - and p.apply_title = #{applyTitle} - and p.apply_user = #{applyUser} - and p.apply_time = #{applyTime} and p.create_time between #{params.beginCreateTime} and #{params.endCreateTime} @@ -165,6 +157,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where audit_status = '1' and use_status = '1' + + + insert into purchase_quote diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysRemindMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysRemindMapper.xml new file mode 100644 index 00000000..08468cc1 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/system/SysRemindMapper.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select remind_id, remind_user_id, remind_user, remind_dept_id, receiver_user_id, receiver_user, receiver_dept_id, handle_user_id, handle_user, handle_dept_id,remind_time, handle_time, remind_content, business_key, module, module_url, is_view, is_handle, create_by, create_time, update_by, update_time, remark from sys_remind + + + + + + + + + + + + insert into sys_remind + + remind_user_id, + remind_user, + remind_dept_id, + receiver_user_id, + receiver_user, + receiver_dept_id, + handle_user_id, + handle_user, + handle_dept_id, + remind_time, + handle_time, + remind_content, + business_key, + module, + module_url, + is_view, + is_handle, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{remindUserId}, + #{remindUser}, + #{remindDeptId}, + #{receiverUserId}, + #{receiverUser}, + #{receiverDeptId}, + #{handleUserId}, + #{handleUser}, + #{handleDeptId}, + #{remindTime}, + #{handleTime}, + #{remindContent}, + #{businessKey}, + #{module}, + #{moduleUrl}, + #{isView}, + #{isHandle}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_remind + + remind_user_id = #{remindUserId}, + remind_user = #{remindUser}, + remind_dept_id = #{remindDeptId}, + receiver_user_id = #{receiverUserId}, + receiver_user = #{receiverUser}, + receiver_dept_id = #{receiverDeptId}, + handle_user_id = #{handleUserId}, + handle_user = #{handleUser}, + handle_dept_id = #{handleDeptId}, + remind_time = #{remindTime}, + handle_time = #{handleTime}, + remind_content = #{remindContent}, + business_key = #{businessKey}, + module = #{module}, + module_url = #{moduleUrl}, + is_view = #{isView}, + is_handle = #{isHandle}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where remind_id = #{remindId} + + + + delete from sys_remind where remind_id = #{remindId} + + + + delete from sys_remind where remind_id in + + #{remindId} + + + + + update sys_remind set del_flag = '1' where remind_id = #{remindId} + + + + update sys_remind set del_flag = '0' where remind_id = #{remindId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml index b223c55e..65c47dc6 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryInquiryMapper.xml @@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -43,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" material_photoUrl, material_brand, material_unit, material_describe, material_process_method, material_model, material_specification,warehouse_dept, historical_total, shared_available_stock_num, lock_stock_num, fixed_available_stock_num, - stock_losses_num,available_stock_num, attribution_available_stock_num, + stock_losses_num,available_stock_num, safety_stock_num, attribution_available_stock_num, no_occupancy_num, inventory_edit_type, edit_stock_num, noattribution_available_stock_num, use_num, report_damage_num, material_use_status, remark, create_time, create_by, update_by, update_time @@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" fixed_available_stock_num, stock_losses_num, available_stock_num, + safety_stock_num, no_occupancy_num, edit_stock_num, inventory_edit_type, @@ -130,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{fixedAvailableStockNum}, #{stockLossesNum}, #{availableStockNum}, + #{safetyStockNum}, #{noOccupancyNum}, #{editStockNum}, #{inventoryEditType}, @@ -166,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" fixed_available_stock_num = #{fixedAvailableStockNum}, stock_losses_num = #{stockLossesNum}, available_stock_num = #{availableStockNum}, + safety_stock_num = #{safetyStockNum}, no_occupancy_num = #{noOccupancyNum}, edit_stock_num = #{editStockNum}, inventory_edit_type = #{inventoryEditType}, diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html index 946142f7..62512f0a 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html @@ -73,21 +73,21 @@ - - - - - - - - - - - - - - - +
+
+
+ 选择通知人 + + 添加通知人 + +
+
+
+
+
+
+
+
@@ -100,7 +100,7 @@ var levelDatas = [[${@dict.getType('bomLevel')}]]; var bomLevelSelectDatas = [[${@dict.getTypeSelect('bomLevel')}]]; - + var receiverUserList = []; var processMethodDatas = [[${@dict.getType('processMethod')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]]; @@ -133,6 +133,9 @@ // 采购修改物料 var purchaseTable = $('#bootstrap-table-purchase').bootstrapTable('getData'); + //通知人 + var remindPeopleTable = $('#bootstrap-table-remindPeople').bootstrapTable('getData'); + // 将表数据转换成与developModifyOrderData格式一致的数组 var developModifyMaterialDataList = developModifyTable.map(function(item) { // 根据实际字段名调整 @@ -169,9 +172,22 @@ }; }); + // 将表数据转换成与developModifyOrderData格式一致的数组 + var remindPeopleDataList = remindPeopleTable.map(function(item) { + // 根据实际字段名调整 + return { + "receiverUser": item.receiverUser, + "handleTime": item.handleTime, + // ...其他字段 + }; + }); + + + const combinedData = Object.assign({}, developModifyOrderData, { developModifyorderMaterialVoList: developModifyMaterialDataList, developModifyorderDetailList:purchaseMaterialDataList, + modifyorderRemindVos:remindPeopleDataList, beforeUpdateRemark:beforeUpdateRemark, afterUpdateRemark:afterUpdateRemark }); @@ -725,6 +741,113 @@ // } $("#userName_add").val(loginName); + + + // 点击选择添加通知人按钮 + function insertRemindPeople() { + var newRow = { + remindId: 'UC_' + new Date().getTime(), // 示例生成唯一ID + receiverUser: '', + handleTime: '', + }; + $("#bootstrap-table-remindPeople").bootstrapTable('append', newRow); + } + + //物料信息展示列表 + $(function() { + var options = { + id:'bootstrap-table-remindPeople', + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 + modalName: "选择通知人", + columns: [{ + checkbox: true + }, + { + title: '提醒表Id', + field: 'remindId', + visible: false + }, + { + title: '通知人', + field: 'receiverUser', + align: 'center', + formatter: function(value, row, index) { + return receiverUserFormatter(value, row, index); + } + }, + { + title: '确认时间', + field: 'handleTime', + align: 'center', + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('删除 '); + return actions.join(''); + } + } + ] + }; + $.table.init(options); + }) + + // 逻辑删除前端的一行数据 + function removeRemindPeople(remindId){ + $("#bootstrap-table-remindPeople").bootstrapTable('remove', { + field: 'remindId', + values: remindId + }) + } + + + // 获取所有接收人 + selectProcessCode(); + + // 重新初始化下拉框列表 + function receiverUserFormatter(value, row, index) { + var selectHtml = ''; + return selectHtml; + } + + // 列中获取接收人的下拉改变数据 + function onReceiverUserChange(selectElement, rowIndex) { + var receiverUserValue = $(selectElement).val(); + var tableData = $('#bootstrap-table-remindPeople').bootstrapTable('getData'); + var newRow = $.extend({}, tableData[rowIndex]); // 深拷贝当前行数据,防止直接修改原始数据 + // 更新行数据 + newRow.receiverUser = receiverUserValue; + $('#bootstrap-table-remindPeople').bootstrapTable('updateRow', {index: rowIndex, row: newRow}); + } + + function selectProcessCode(){ + $.ajax({ + url: ctx + 'system/remind/getAllReceiverUser', + type: "post", + dataType: "json", + success: function(res) { + if (res.rows.length > 0) { + receiverUserList = res.rows.map(function(result) { return result.loginName; }); + // 刷新表格以应用新的接收人列表 + $('#bootstrap-table-remindPeople').bootstrapTable('refresh'); + } else { + $.modal.error("数据为空"); + } + } + }); + } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/detail.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/detail.html index 76a7315c..ca74af7f 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/detail.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/detail.html @@ -67,21 +67,18 @@ - - - - - - - - - - - - - - - +
+
+
+ 选择通知人 +
+
+
+
+
+
+
+
@@ -668,6 +665,49 @@ }) } + + //物料信息展示列表 + $(function() { + var options = { + id:'bootstrap-table-remindPeople', + url: prefix +'/getErpDevelopRemindPeopleList', + queryParams:remindPeopleParams, + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 + modalName: "选择通知人", + columns: [{ + checkbox: true + }, + { + title: '提醒表Id', + field: 'remindId', + visible: false + }, + { + title: '通知人', + field: 'receiverUser', + align: 'center', + }, + { + title: '确认时间', + field: 'handleTime', + align: 'center', + }, + ] + }; + $.table.init(options); + }) + + function remindPeopleParams(params) { + var curParams = { + // 传递参数查询参数 + developOrderCode: $("#developOrderCode").val() + }; + return curParams; + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html index 38f8e92c..0896c3fa 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html @@ -218,11 +218,11 @@ return $.table.selectDictLabel(finshStatusDatas, value); } }, - {title: '确认状态',field: 'completeStatus', - formatter: function (value, row, index) { - return $.table.selectDictLabel(completeStatusDatas, value); - } - }, + // {title: '确认状态',field: 'completeStatus', + // formatter: function (value, row, index) { + // return $.table.selectDictLabel(completeStatusDatas, value); + // } + // }, {title: '采购入库状态',field: 'purchaseStorageStatus', formatter: function (value, row, index) { return $.table.selectDictLabel(purchaseStorageStatusDatas, value); diff --git a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html index 9958c74d..7d40b791 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html +++ b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html @@ -45,7 +45,7 @@ @@ -167,7 +167,8 @@ title: '操作', align: 'center',formatter: function(value, row, index) { var actions = []; actions.push('详情 '); - return actions.join(''); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } } ] diff --git a/ruoyi-admin/src/main/resources/templates/erp/materialReturnInspection/materialReturnInspection.html b/ruoyi-admin/src/main/resources/templates/erp/materialReturnInspection/materialReturnInspection.html index 175b546d..1c11c481 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/materialReturnInspection/materialReturnInspection.html +++ b/ruoyi-admin/src/main/resources/templates/erp/materialReturnInspection/materialReturnInspection.html @@ -56,7 +56,7 @@ 添加 - + 导出 @@ -127,10 +127,11 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('详情 '); + actions.push('编辑 '); + actions.push('详情 '); - return actions.join(''); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index 4285a320..c9451405 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -167,17 +167,14 @@
消息提醒
你有提醒 - -
  • 新的提醒

  • -
- + @@ -199,8 +196,7 @@ @@ -423,40 +419,45 @@ //获取我的提醒 function getRemind() { $.ajax({ - url: ctx + 'remind/getRemindListNoPaging',//地址 + url: ctx + 'system/remind/getRemindListNoPaging', // 地址 success: function (data, status) { - //alert(data); if (status == 'success') { $("#remindList").empty(); + if (data.length > 0) { - if (data.length > 10) {$("#remindBadge").text('10+');} - else {$("#remindSize").text(data.length + "项新");} - $("#remindBadge2").append("" + data.length + "") - } else if (data.length == 0) { + let remindCount = data.length > 10 ? '10+' : data.length; + $("#remindBadge").text(remindCount); + $("#remindSize").text(remindCount + "项新"); + $("#remindBadge2").append("" + data.length + ""); + } else { $("#remindBadge").text(''); $("#remindBadge2 span").remove(); + $("#remindSize").text("0项新"); } - if (data.length > 10) { - $("#remindSize").text('10+' + "项新"); - } else {$("#remindSize").text(data.length + "项新");} - for (var i = 0; i < data.length; i++) { + + for (var i = 0; i < Math.min(data.length, 10); i++) { // 只显示最多10条提醒 var obj = data[i]; - var offset = transDate(obj.remindDate) + var remindTime = transDate(obj.remindTime); + var module = obj.module || '未知模块'; // 防止module为空时显示默认值 var url = ctx + "remind/view/" + obj.id; - $("#remindList").append( - "
  • " + - " " + - "" + offset + " " + - " " + - " " + - obj.formName + - "" + - "" + - "
  • "); + + // 使用模板字符串构建HTML,增强可读性 + var listItem = ` +
  • + + ${remindTime} + + + 你有一项来自 "${module}" 的提醒 + + +
  • `; + + $("#remindList").append(listItem); } } } - }) + }); } // 计算耗时 diff --git a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html index dd12d6ef..255e9c34 100644 --- a/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html +++ b/ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html @@ -66,7 +66,7 @@ 添加 - + 导出 @@ -203,6 +203,64 @@ }; $.table.init(options); }); + + + // 导出 + function exportExcel(formId) { + // $.table.set(); + var purchaseQuoteCodeData = []; + var selections = $("#bootstrap-table").bootstrapTable("getSelections"); + if(selections.length === 0){ + $.modal.confirm("确定导出所有采购报价单吗?", function() { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + var params = $("#bootstrap-table").bootstrapTable('getOptions'); + var dataParam = $("#" + currentId).serializeArray(); + dataParam.push({ "name": "orderByColumn", "value": params.sortName }); + dataParam.push({ "name": "isAsc", "value": params.sortOrder }); + $.modal.loading("正在导出数据,请稍后..."); + $.post(prefix + '/exportAll', dataParam, function(result) { + if (result.code == web_status.SUCCESS) { + window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }); + }); + }else { + $.modal.confirm("确定导出选中的所有采购报价单吗?", function () { + //·拼接单号 + for(let i=0;i \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html index cfe86020..0fd70c14 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html +++ b/ruoyi-admin/src/main/resources/templates/quality/complaintNotice/complaintNotice.html @@ -56,7 +56,7 @@ @@ -144,10 +144,11 @@ formatter: function(value, row, index) { var actions = []; if (row.closingProcedures !== '0') { - actions.push('客诉处理 '); + actions.push('客诉处理 '); } - actions.push('详情 '); - return actions.join(''); + actions.push('详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/quality/iqcQualityOrder/iqcQualityOrder.html b/ruoyi-admin/src/main/resources/templates/quality/iqcQualityOrder/iqcQualityOrder.html index 1e10ade9..2a390a16 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/iqcQualityOrder/iqcQualityOrder.html +++ b/ruoyi-admin/src/main/resources/templates/quality/iqcQualityOrder/iqcQualityOrder.html @@ -183,20 +183,20 @@ var actions = []; //采购订单品质 if (row.qualityStatus != 2 && row.qualityStorageStatus == 0 ){ - actions.push('品质 '); + actions.push('品质 '); } //采购订单品质详情 if (row.qualityStorageStatus == 0 ){ - actions.push('详情 '); + actions.push('详情 '); } //委外入库品质 if (row.qualityStatus != 2 && row.qualityStorageStatus == 2 ){ - actions.push('品质 '); + actions.push('品质 '); } //委外入库品质详情 if (row.qualityStorageStatus == 2 ){ - actions.push('详情 '); + actions.push('详情 '); } var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html index cc924a32..9ac90226 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingCheckout/manufacturingCheckout.html @@ -226,15 +226,15 @@ var todoUserIdList = row.todoUserId.split(","); if(todoUserIdList.includes(loginName)){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); + actions.push(' '+nodeName+' '); } } // 审批历史 - actions.push(' 审批历史 '); + actions.push(' 审批历史 '); // 进度查看 - actions.push(' 进度查看 '); + actions.push(' 进度查看 '); } - actions.push('详情 '); + actions.push('详情 '); var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); } diff --git a/ruoyi-admin/src/main/resources/templates/quality/manufacturingProcess/manufacturingProcess.html b/ruoyi-admin/src/main/resources/templates/quality/manufacturingProcess/manufacturingProcess.html index 4f9be6e3..534921ff 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/manufacturingProcess/manufacturingProcess.html +++ b/ruoyi-admin/src/main/resources/templates/quality/manufacturingProcess/manufacturingProcess.html @@ -142,9 +142,10 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('详情 '); - return actions.join(''); + actions.push('编辑 '); + actions.push('详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html index aa45dc3a..3e5554c9 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html @@ -190,15 +190,15 @@ //生产订单成品品质 if (row.qualityStatus != 2 && row.qualityStorageStatus == 4 && (row.materialNo!=null && row.materialNo.startsWith("8"))){ - actions.push('品质 '); + actions.push('品质 '); } //生产订单其他物料品质 if (row.qualityStatus != 2 && row.qualityStorageStatus == 4 && !(row.materialNo!=null && row.materialNo.startsWith("8"))){ - actions.push('品质 '); + actions.push('品质 '); } //生产订单品质详情 if (row.qualityStorageStatus == 4 ){ - actions.push('详情 '); + actions.push('详情 '); } var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityReport/qualityReport.html b/ruoyi-admin/src/main/resources/templates/quality/qualityReport/qualityReport.html index 224f4219..8c12e75d 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityReport/qualityReport.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityReport/qualityReport.html @@ -259,15 +259,15 @@ var todoUserIdList = row.todoUserId.split(","); if(todoUserIdList.includes(loginName)){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); + actions.push(' '+nodeName+' '); } } // 审批历史 - actions.push(' 审批历史 '); + actions.push(' 审批历史 '); // 进度查看 - actions.push(' 进度查看 '); + actions.push(' 进度查看 '); } - actions.push('详情 '); + actions.push('详情 '); var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); } diff --git a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html index 29e60b6b..06204a13 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html +++ b/ruoyi-admin/src/main/resources/templates/quality/refundsExchanges/refundsExchanges.html @@ -69,7 +69,7 @@ 添加退货单 - + 导出 @@ -200,36 +200,36 @@ var actions = []; // actions.push('编辑 '); if (row.refundsExchangesStatus == 0 && row.qualityPurchaseStatus >= 3){ - actions.push('结案 '); + actions.push('结案 '); } /*入库前退货详情*/ if (row.qualityReturnNode == 0){ - actions.push('详情 '); + actions.push('详情 '); } /*入库后退货详情*/ if (row.qualityReturnNode == 1){ - actions.push('详情 '); + actions.push('详情 '); } /*入库前退换货-确认供应商-已有供应商*/ if (row.qualityReturnNode == 0 && row.qualityPurchaseStatus == 0 && row.qualityWarehouseStatus == 1){ - actions.push('确认供应商 '); + actions.push('确认供应商 '); } /*入库前退换货-确认收货-已有供应商*/ if (row.qualityReturnNode == 0 && row.qualityPurchaseStatus != 0 && row.qualityWarehouseStatus > 2 ){ - actions.push('确认收货 '); + actions.push('确认收货 '); } /*入库后退货-确认供应商-没有供应商*/ if (row.qualityReturnNode == 1 && row.qualityPurchaseStatus == 0 && row.qualityWarehouseStatus == 0){ - actions.push('确认供应商 '); + actions.push('确认供应商 '); } /*入库前退换货-确认收货-已有供应商*/ if (row.qualityReturnNode == 1 && row.qualityPurchaseStatus != 0 && row.qualityWarehouseStatus > 2 ){ - actions.push('确认收货 '); + actions.push('确认收货 '); } - - return actions.join(''); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/quality/returnInspection/returnInspection.html b/ruoyi-admin/src/main/resources/templates/quality/returnInspection/returnInspection.html index bde6e7f5..fcc02fd7 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/returnInspection/returnInspection.html +++ b/ruoyi-admin/src/main/resources/templates/quality/returnInspection/returnInspection.html @@ -53,7 +53,7 @@ @@ -117,9 +117,10 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('退检处理 '); - actions.push('详情 '); - return actions.join(''); + actions.push('退检处理 '); + actions.push('详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/quality/returnQualityOrder/returnQualityOrder.html b/ruoyi-admin/src/main/resources/templates/quality/returnQualityOrder/returnQualityOrder.html index ac89d3f0..0a3f1d7c 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/returnQualityOrder/returnQualityOrder.html +++ b/ruoyi-admin/src/main/resources/templates/quality/returnQualityOrder/returnQualityOrder.html @@ -195,9 +195,9 @@ formatter: function(value, row, index) { var actions = []; if (row.qualityStatus != 2){ - actions.push('品质 '); + actions.push('品质 '); } - actions.push('详情 '); + actions.push('详情 '); var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html index 9045e958..5c99baa7 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html @@ -261,38 +261,38 @@ // actions.push('删除 '); //详情页面 工程审核为详情页面 // actions.push('详情 '); - actions.push('详情 '); + actions.push('详情 '); // 评审 if(row.makeStatus == '0'){ - actions.push('评审 '); + actions.push('评审 '); } // 部门主管确认 if(row.deptLeaderConfirmStatus == '0'){ - actions.push('确认时间 '); + actions.push('确认时间 '); } // 工程审核 if(row.makeStatus == '2'){ - actions.push('工程审核 '); + actions.push('工程审核 '); } // 采购审核:生产状态-待采购审核,采购上级确认状态-已确认 if(row.makeStatus == '7'&&row.purchaseStatus == '1'){ - actions.push('采购审核 '); + actions.push('采购审核 '); } // 领料 if((row.makeStatus == '3' || row.makeStatus == '4' || row.makeStatus == '5') && (row.eceiptStatus == '7' || row.eceiptStatus == '8')){ - actions.push('领料 '); + actions.push('领料 '); } // 委外计划 if((row.makeStatus == '3' || row.makeStatus == '4' || row.makeStatus == '5') && (row.eceiptStatus == '3' || row.eceiptStatus == '4'|| row.eceiptStatus == '5'|| row.eceiptStatus == '6'|| row.eceiptStatus == '7' || row.eceiptStatus == '8')){ - actions.push('委外计划 '); + actions.push('委外计划 '); } // 委内入库 对应生产中 if(row.makeStatus == '4' || row.makeStatus == '5'){ // actions.push('委内入库 '); - actions.push('生产入库 '); + actions.push('生产入库 '); } diff --git a/ruoyi-admin/src/main/resources/templates/system/procedure/procedure.html b/ruoyi-admin/src/main/resources/templates/system/procedure/procedure.html index 99e41d68..6087ef72 100644 --- a/ruoyi-admin/src/main/resources/templates/system/procedure/procedure.html +++ b/ruoyi-admin/src/main/resources/templates/system/procedure/procedure.html @@ -52,12 +52,6 @@ 添加 - - - - - - @@ -104,10 +98,11 @@ {field: 'updateTime', title: '上次更新时间'}, {title: '操作',align: 'center',formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('详情 '); - actions.push('删除'); - return actions.join(''); + actions.push('编辑 '); + actions.push('详情 '); + actions.push('删除'); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } } ] diff --git a/ruoyi-admin/src/main/resources/templates/system/processCategory/processCategory.html b/ruoyi-admin/src/main/resources/templates/system/processCategory/processCategory.html index 334de092..7eb2051e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/processCategory/processCategory.html +++ b/ruoyi-admin/src/main/resources/templates/system/processCategory/processCategory.html @@ -31,12 +31,6 @@ 添加 - - 修改 - - - 删除 - @@ -63,7 +57,6 @@ showColumns: false, fixedColumns: true, // 启用冻结列 fixedRightNumber: 1, // 冻结右列个数 - height: $(window).height() - 100, modalName: "制程类别明细", columns: [ {checkbox: true}, @@ -79,10 +72,11 @@ {field: 'updateTime',title: '上次更新时间'}, {title: '操作',align: 'center',formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('删除'); - actions.push('详情 '); - return actions.join(''); + actions.push('编辑 '); + actions.push('删除'); + actions.push('详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } } ] diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/add.html b/ruoyi-admin/src/main/resources/templates/system/remind/add.html new file mode 100644 index 00000000..5265b7c4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/add.html @@ -0,0 +1,171 @@ + + + + + + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/detail.html b/ruoyi-admin/src/main/resources/templates/system/remind/detail.html new file mode 100644 index 00000000..5c67ccdf --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/detail.html @@ -0,0 +1,84 @@ + + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/edit.html b/ruoyi-admin/src/main/resources/templates/system/remind/edit.html new file mode 100644 index 00000000..ef6a8690 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/edit.html @@ -0,0 +1,77 @@ + + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/manualHandle.html b/ruoyi-admin/src/main/resources/templates/system/remind/manualHandle.html new file mode 100644 index 00000000..7bf0ec31 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/manualHandle.html @@ -0,0 +1,47 @@ + + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    +
    + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/remind/remind.html b/ruoyi-admin/src/main/resources/templates/system/remind/remind.html new file mode 100644 index 00000000..bad066ce --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/remind/remind.html @@ -0,0 +1,174 @@ + + + + + + +
    +
    +
    +
    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • +  搜索 +  重置 +
    • +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/sop/sop.html b/ruoyi-admin/src/main/resources/templates/system/sop/sop.html index 6c1cb0a2..aa8dd0e4 100644 --- a/ruoyi-admin/src/main/resources/templates/system/sop/sop.html +++ b/ruoyi-admin/src/main/resources/templates/system/sop/sop.html @@ -213,11 +213,12 @@ }, {title: '操作',align: 'center',formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); - actions.push('详情'); - actions.push('删除'); + actions.push('编辑 '); + actions.push('详情'); + actions.push('删除'); - return actions.join(''); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } } ] diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html index 43e0653f..729e92f4 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/inventoryInquiry.html @@ -106,6 +106,7 @@ }, {title: '历史总数量', field: 'historicalTotal',}, {title: '可用库存数', field: 'availableStockNum',}, + {title: '安全库存数', field: 'safetyStockNum',}, {title: '固定可用库存数', field: 'fixedAvailableStockNum',}, {title: '共享可用库存数', field: 'sharedAvailableStockNum',}, {title: '锁定库存数', field: 'lockStockNum',}, @@ -132,6 +133,8 @@ } actions.push('库存履历 '); + actions.push('设置安全库存 '); + var actionLinks = actions.join(''); return $.table.dropdownToggle(actionLinks); } @@ -177,6 +180,12 @@ $.modal.open("库存履历", url); } + //设置安全库存数 + function setSafetyStock(inventoryInquiryId) { + var url = prefix + "/setSafetyStock/" + inventoryInquiryId; + $.modal.open("设置安全库存数", url); + } + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/setSafetyStock.html b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/setSafetyStock.html new file mode 100644 index 00000000..8791f0f3 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/warehouse/inventoryInquiry/setSafetyStock.html @@ -0,0 +1,67 @@ + + + + + + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html index 6b1bbb27..6549cdb8 100644 --- a/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html +++ b/ruoyi-admin/src/main/resources/templates/warehouse/storageOrder/storageOrder.html @@ -258,91 +258,91 @@ /*暂收-采购单(仓库入库)*/ if (row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && row.warehouseStorageStatus == 0 ){ - actions.push('暂收 '); + actions.push('暂收 '); } /*暂收-采购单(仓库入库)详情*/ if (row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 0 || row.warehouseStorageStatus == 1)){ - actions.push('详情 '); + actions.push('详情 '); } /*暂收-采购单(采购入库)*/ if (row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && row.warehouseStorageStatus == 0 ){ - actions.push('暂收 '); + actions.push('暂收 '); } /*暂收-采购单(采购入库)详情*/ if (row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 0 || row.warehouseStorageStatus == 1)){ - actions.push('详情 '); + actions.push('详情 '); } /*暂收-委外单*/ if ( row.warehouseStorageType == 4 && row.warehouseOrderType == 3 && row.warehouseStorageStatus == 0 ){ - actions.push('暂收 '); + actions.push('暂收 '); } /*暂收-委外单 详情*/ if ( row.warehouseStorageType == 4 && row.warehouseOrderType == 3 && (row.warehouseStorageStatus == 0 || row.warehouseStorageStatus == 1)){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-采购单(采购入库)*/ if ( row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ - actions.push('入库 '); + actions.push('入库 '); } /*入库-采购单(采购入库)详情*/ if ( row.warehouseDeptType == 1 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3 || row.warehouseStorageStatus == 4) ){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-采购单(仓库入库)*/ if ( row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ - actions.push('入库 '); + actions.push('入库 '); } /*入库-采购单(仓库入库) 详情*/ if ( row.warehouseDeptType == 0 && row.warehouseOrderType == 0 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3 || row.warehouseStorageStatus == 4)){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-委外单*/ if ( row.warehouseStorageType == 4 && row.warehouseOrderType == 3 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ - actions.push('入库 '); + actions.push('入库 '); } /*入库-委外单 详情*/ if ( row.warehouseStorageType == 4 && row.warehouseOrderType == 3 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3 || row.warehouseStorageStatus == 4) ){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-生产订单(生产入库)*/ if ( row.warehouseStorageType == 5 && row.warehouseOrderType == 1 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ - actions.push('入库 '); + actions.push('入库 '); } /*入库-生产订单(生产入库) 详情*/ if ( row.warehouseStorageType == 5 && row.warehouseOrderType == 1 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3 || row.warehouseStorageStatus == 4) ){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-生产订单(委内入库)*/ if ( row.warehouseStorageType == 2 && row.warehouseOrderType == 1 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ - actions.push('入库 '); + actions.push('入库 '); } /*入库-生产订单(委内入库) 详情*/ if ( row.warehouseStorageType == 2 && row.warehouseOrderType == 1 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3 || row.warehouseStorageStatus == 4)){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-退换货单*/ if ( row.warehouseStorageType == 3 && row.warehouseOrderType == 2 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3) ){ - actions.push('入库 '); + actions.push('入库 '); } /*入库-退换货单 详情*/ if ( row.warehouseStorageType == 3 && row.warehouseOrderType == 2 && (row.warehouseStorageStatus == 2 || row.warehouseStorageStatus == 3 || row.warehouseStorageStatus == 4)){ - actions.push('详情 '); + actions.push('详情 '); } /*入库-退料单*/ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java index 4e22758f..f36db051 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/BusinessKeysConstants.java @@ -26,4 +26,10 @@ public class BusinessKeysConstants { /** 基础资料汇率管理*/ public static final String SYS_EXCHANGE_RATE = "5"; + /** 工程开发修改单信息 */ + public static final String ERP_DEVELOPMENT_MODIFY = "6"; + + /** 仓库库存查询信息*/ + public static final String WAREHOUSE_INQUIRY = "7"; + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java index 93b063d7..fe854196 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java @@ -114,4 +114,11 @@ public interface SysDeptMapper * @return 子部门数 */ public int selectNormalChildrenDeptById(Long deptId); + + /** + * 根据部门编号查询部门 + * @param deptNumber 部门编号 + * @return 部门信息 + */ + SysDept selectDeptByDeptNumber(String deptNumber); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java index 30684951..01fc93f2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java @@ -170,7 +170,7 @@ public interface SysUserMapper * */ String selectLoginNameByUserName(String businessMembers); - List selectUserAll() throws Exception; + List selectUserAll(); /** * 通过部门id查询该部门下的所有用户 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java index e034ce43..a5e0cc76 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java @@ -107,4 +107,11 @@ public interface ISysDeptService * @return 结果 */ public String checkDeptNameUnique(SysDept dept); + + /** + * 根据部门编号查询部门 + * @param deptNumber 部门编号 + * @return 部门信息 + */ + SysDept selectDeptByDeptNumber(String deptNumber); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java index 1a8d3ddc..8f9e4d73 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java @@ -220,7 +220,7 @@ public interface ISysUserService List selectRoleToUserList(String roleKeys); - public List selectUserAll() throws Exception; + public List selectUserAll(); /** * 通过部门id查询该部门下的所有用户 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 08765bd9..c9cab7a7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -311,4 +311,14 @@ public class SysDeptServiceImpl implements ISysDeptService } return UserConstants.DEPT_NAME_UNIQUE; } + + /** + * 根据部门编号查询部门 + * @param deptNumber 部门编号 + * @return 部门信息 + */ + @Override + public SysDept selectDeptByDeptNumber(String deptNumber) { + return deptMapper.selectDeptByDeptNumber(deptNumber); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 5347e490..e71d4ffc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -547,7 +547,7 @@ public class SysUserServiceImpl implements ISysUserService return userMapper.selectRoleToUserList(Convert.toStrArray(roleKeys)); } @Override - public List selectUserAll() throws Exception { + public List selectUserAll(){ return userMapper.selectUserAll(); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 475cb9f2..45f66250 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -83,8 +83,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + + + + insert into sys_dept( dept_id, parent_id,