diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java index b5e2045c..b1a416ca 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java @@ -90,6 +90,18 @@ public class SysMakeOrderController extends BaseController return prefix + "/gcsh"; } + /** + * 跳转添加领料页面 + */ + @GetMapping("/addpick/{id}") + public String addPick(@PathVariable("id") Long id, ModelMap mmap) + { + mmap.put("currentUser", ShiroUtils.getSysUser()); + SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id); + mmap.put("sysMakeOrder", sysMakeOrder); + return prefix + "/addPick"; + } + /** * 部门评审 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeorderPickDetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeorderPickDetailController.java new file mode 100644 index 00000000..a49d6112 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeorderPickDetailController.java @@ -0,0 +1,151 @@ +package com.ruoyi.system.controller; + +import java.util.List; +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.SysMakeorderPickDetail; +import com.ruoyi.system.service.ISysMakeorderPickDetailService; +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; + +/** + * 生产订单领料明细Controller + * + * @author ruoyi + * @date 2024-04-13 + */ +@Controller +@RequestMapping("/system/detail") +public class SysMakeorderPickDetailController extends BaseController +{ + private String prefix = "system/detail"; + + @Autowired + private ISysMakeorderPickDetailService sysMakeorderPickDetailService; + + @RequiresPermissions("system:detail:view") + @GetMapping() + public String detail() + { + return prefix + "/detail"; + } + + /** + * 查询生产订单领料明细列表 + */ + @RequiresPermissions("system:detail:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysMakeorderPickDetail sysMakeorderPickDetail) + { + startPage(); + List list = sysMakeorderPickDetailService.selectSysMakeorderPickDetailList(sysMakeorderPickDetail); + return getDataTable(list); + } + + /** + * 导出生产订单领料明细列表 + */ + @RequiresPermissions("system:detail:export") + @Log(title = "生产订单领料明细", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysMakeorderPickDetail sysMakeorderPickDetail) + { + List list = sysMakeorderPickDetailService.selectSysMakeorderPickDetailList(sysMakeorderPickDetail); + ExcelUtil util = new ExcelUtil(SysMakeorderPickDetail.class); + return util.exportExcel(list, "生产订单领料明细数据"); + } + + /** + * 新增生产订单领料明细 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存生产订单领料明细 + */ + @RequiresPermissions("system:detail:add") + @Log(title = "生产订单领料明细", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysMakeorderPickDetail sysMakeorderPickDetail) + { + return toAjax(sysMakeorderPickDetailService.insertSysMakeorderPickDetail(sysMakeorderPickDetail)); + } + + /** + * 修改生产订单领料明细 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + SysMakeorderPickDetail sysMakeorderPickDetail = sysMakeorderPickDetailService.selectSysMakeorderPickDetailById(id); + mmap.put("sysMakeorderPickDetail", sysMakeorderPickDetail); + return prefix + "/edit"; + } + + /** + * 修改保存生产订单领料明细 + */ + @RequiresPermissions("system:detail:edit") + @Log(title = "生产订单领料明细", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysMakeorderPickDetail sysMakeorderPickDetail) + { + return toAjax(sysMakeorderPickDetailService.updateSysMakeorderPickDetail(sysMakeorderPickDetail)); + } + + /** + * 删除生产订单领料明细 + */ + @RequiresPermissions("system:detail:remove") + @Log(title = "生产订单领料明细", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysMakeorderPickDetailService.deleteSysMakeorderPickDetailByIds(ids)); + } + + /** + * 作废生产订单领料明细 + */ + @RequiresPermissions("system:detail:cancel") + @Log(title = "生产订单领料明细", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(sysMakeorderPickDetailService.cancelSysMakeorderPickDetailById(id)); + } + + /** + * 恢复生产订单领料明细 + */ + @RequiresPermissions("system:detail:restore") + @Log(title = "生产订单领料明细", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(sysMakeorderPickDetailService.restoreSysMakeorderPickDetailById(id)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPick.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPick.java index 1789f7b1..d3c7309b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPick.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPick.java @@ -1,6 +1,8 @@ package com.ruoyi.system.domain; import java.util.Date; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -80,6 +82,8 @@ public class SysMakeorderPick extends BaseEntity @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd") private Date applyTime; + private List pickDetails; + public void setId(Long id) { this.id = id; @@ -225,6 +229,14 @@ public class SysMakeorderPick extends BaseEntity return applyTime; } + public List getPickDetails() { + return pickDetails; + } + + public void setPickDetails(List pickDetails) { + this.pickDetails = pickDetails; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java new file mode 100644 index 00000000..bb58c927 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java @@ -0,0 +1,125 @@ +package com.ruoyi.system.domain; + +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_makeorder_pick_detail + * + * @author ruoyi + * @date 2024-04-13 + */ +public class SysMakeorderPickDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 删除标志(0代表存在 1代表删除) */ + private String delFlag; + + /** 生产订单号 */ + @Excel(name = "生产订单号") + private String makeNo; + + /** 生产领料单号 */ + @Excel(name = "生产领料单号") + private String pickNo; + + /** 料号 */ + @Excel(name = "料号") + private String materialNo; + + /** bomid */ + @Excel(name = "bomid") + private Long bomId; + + /** 领料数量 */ + @Excel(name = "领料数量") + private Long pickNum; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + public void setMakeNo(String makeNo) + { + this.makeNo = makeNo; + } + + public String getMakeNo() + { + return makeNo; + } + public void setPickNo(String pickNo) + { + this.pickNo = pickNo; + } + + public String getPickNo() + { + return pickNo; + } + public void setMaterialNo(String materialNo) + { + this.materialNo = materialNo; + } + + public String getMaterialNo() + { + return materialNo; + } + public void setBomId(Long bomId) + { + this.bomId = bomId; + } + + public Long getBomId() + { + return bomId; + } + public void setPickNum(Long pickNum) + { + this.pickNum = pickNum; + } + + public Long getPickNum() + { + return pickNum; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("makeNo", getMakeNo()) + .append("pickNo", getPickNo()) + .append("materialNo", getMaterialNo()) + .append("bomId", getBomId()) + .append("pickNum", getPickNum()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickVo.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickVo.java index 05ddc621..09a7d5e2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickVo.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickVo.java @@ -32,6 +32,11 @@ public class SysMakeorderPickVo extends SysMakeorderPick { /** 流程实例类型名称 */ private String instanceTypeName; + /*物料合计*/ + private Double materialSum; + /*数量合计*/ + private Double enterpriseSum; + /** * 关键词 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeorderPickDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeorderPickDetailMapper.java new file mode 100644 index 00000000..80fab2a7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysMakeorderPickDetailMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.SysMakeorderPickDetail; + +/** + * 生产订单领料明细Mapper接口 + * + * @author ruoyi + * @date 2024-04-13 + */ +public interface SysMakeorderPickDetailMapper +{ + /** + * 查询生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 生产订单领料明细 + */ + public SysMakeorderPickDetail selectSysMakeorderPickDetailById(Long id); + + /** + * 查询生产订单领料明细列表 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 生产订单领料明细集合 + */ + public List selectSysMakeorderPickDetailList(SysMakeorderPickDetail sysMakeorderPickDetail); + + /** + * 新增生产订单领料明细 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 结果 + */ + public int insertSysMakeorderPickDetail(SysMakeorderPickDetail sysMakeorderPickDetail); + + /** + * 修改生产订单领料明细 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 结果 + */ + public int updateSysMakeorderPickDetail(SysMakeorderPickDetail sysMakeorderPickDetail); + + /** + * 删除生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + public int deleteSysMakeorderPickDetailById(Long id); + + /** + * 批量删除生产订单领料明细 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysMakeorderPickDetailByIds(String[] ids); + + /** + * 作废生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + public int cancelSysMakeorderPickDetailById(Long id); + + /** + * 恢复生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + public int restoreSysMakeorderPickDetailById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderPickDetailService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderPickDetailService.java new file mode 100644 index 00000000..65d1da82 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysMakeorderPickDetailService.java @@ -0,0 +1,75 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.SysMakeorderPickDetail; + +/** + * 生产订单领料明细Service接口 + * + * @author ruoyi + * @date 2024-04-13 + */ +public interface ISysMakeorderPickDetailService +{ + /** + * 查询生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 生产订单领料明细 + */ + public SysMakeorderPickDetail selectSysMakeorderPickDetailById(Long id); + + /** + * 查询生产订单领料明细列表 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 生产订单领料明细集合 + */ + public List selectSysMakeorderPickDetailList(SysMakeorderPickDetail sysMakeorderPickDetail); + + /** + * 新增生产订单领料明细 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 结果 + */ + public int insertSysMakeorderPickDetail(SysMakeorderPickDetail sysMakeorderPickDetail); + + /** + * 修改生产订单领料明细 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 结果 + */ + public int updateSysMakeorderPickDetail(SysMakeorderPickDetail sysMakeorderPickDetail); + + /** + * 批量删除生产订单领料明细 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteSysMakeorderPickDetailByIds(String ids); + + /** + * 删除生产订单领料明细信息 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + public int deleteSysMakeorderPickDetailById(Long id); + + /** + * 作废生产订单领料明细 + * @param id 生产订单领料明细ID + * @return + */ + int cancelSysMakeorderPickDetailById(Long id); + + /** + * 恢复生产订单领料明细 + * @param id 生产订单领料明细ID + * @return + */ + int restoreSysMakeorderPickDetailById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickDetailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickDetailServiceImpl.java new file mode 100644 index 00000000..2c5c251b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickDetailServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.SysMakeorderPickDetailMapper; +import com.ruoyi.system.domain.SysMakeorderPickDetail; +import com.ruoyi.system.service.ISysMakeorderPickDetailService; +import com.ruoyi.common.core.text.Convert; + +/** + * 生产订单领料明细Service业务层处理 + * + * @author ruoyi + * @date 2024-04-13 + */ +@Service +public class SysMakeorderPickDetailServiceImpl implements ISysMakeorderPickDetailService +{ + @Autowired + private SysMakeorderPickDetailMapper sysMakeorderPickDetailMapper; + + /** + * 查询生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 生产订单领料明细 + */ + @Override + public SysMakeorderPickDetail selectSysMakeorderPickDetailById(Long id) + { + return sysMakeorderPickDetailMapper.selectSysMakeorderPickDetailById(id); + } + + /** + * 查询生产订单领料明细列表 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 生产订单领料明细 + */ + @Override + public List selectSysMakeorderPickDetailList(SysMakeorderPickDetail sysMakeorderPickDetail) + { + return sysMakeorderPickDetailMapper.selectSysMakeorderPickDetailList(sysMakeorderPickDetail); + } + + /** + * 新增生产订单领料明细 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 结果 + */ + @Override + public int insertSysMakeorderPickDetail(SysMakeorderPickDetail sysMakeorderPickDetail) + { + String loginName = ShiroUtils.getLoginName(); + sysMakeorderPickDetail.setCreateBy(loginName); + sysMakeorderPickDetail.setCreateTime(DateUtils.getNowDate()); + return sysMakeorderPickDetailMapper.insertSysMakeorderPickDetail(sysMakeorderPickDetail); + } + + /** + * 修改生产订单领料明细 + * + * @param sysMakeorderPickDetail 生产订单领料明细 + * @return 结果 + */ + @Override + public int updateSysMakeorderPickDetail(SysMakeorderPickDetail sysMakeorderPickDetail) + { + String loginName = ShiroUtils.getLoginName(); + sysMakeorderPickDetail.setUpdateBy(loginName); + sysMakeorderPickDetail.setUpdateTime(DateUtils.getNowDate()); + return sysMakeorderPickDetailMapper.updateSysMakeorderPickDetail(sysMakeorderPickDetail); + } + + /** + * 删除生产订单领料明细对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteSysMakeorderPickDetailByIds(String ids) + { + return sysMakeorderPickDetailMapper.deleteSysMakeorderPickDetailByIds(Convert.toStrArray(ids)); + } + + /** + * 删除生产订单领料明细信息 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + @Override + public int deleteSysMakeorderPickDetailById(Long id) + { + return sysMakeorderPickDetailMapper.deleteSysMakeorderPickDetailById(id); + } + + /** + * 作废生产订单领料明细 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + @Override + public int cancelSysMakeorderPickDetailById(Long id) + { + return sysMakeorderPickDetailMapper.cancelSysMakeorderPickDetailById(id); + } + + /** + * 恢复生产订单领料明细信息 + * + * @param id 生产订单领料明细ID + * @return 结果 + */ + @Override + public int restoreSysMakeorderPickDetailById(Long id) + { + return sysMakeorderPickDetailMapper.restoreSysMakeorderPickDetailById(id); + } +} 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 f1219fa1..ea676282 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 @@ -12,9 +12,11 @@ import com.ruoyi.common.utils.StringUtils; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; import com.ruoyi.system.domain.SysMakeorderPick; +import com.ruoyi.system.domain.SysMakeorderPickDetail; import com.ruoyi.system.domain.SysMakeorderPickVo; 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.ISysRoleService; import org.activiti.engine.TaskService; @@ -23,6 +25,7 @@ import org.activiti.engine.runtime.ProcessInstance; import org.activiti.engine.task.Task; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.HashMap; import java.util.List; @@ -41,6 +44,9 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService @Autowired private SysMakeorderPickMapper sysMakeorderPickMapper; + @Autowired + private ISysMakeorderPickDetailService makeorderPickDetailService; + @Autowired private RedisCache redisCache; @@ -69,10 +75,16 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService public SysMakeorderPickVo selectSysMakeorderPickById(Long id) { SysMakeorderPickVo makeorderPickVo = sysMakeorderPickMapper.selectSysMakeorderPickById(id); - SysUser pickUser = userMapper.selectUserByLoginName(makeorderPickVo.getPickUser()); - makeorderPickVo.setPickUserName(pickUser.getUserName()); - SysUser applyUser = userMapper.selectUserByLoginName(makeorderPickVo.getApplyUser()); - makeorderPickVo.setApplyUserName(applyUser.getUserName()); + if(makeorderPickVo!=null){ + SysUser pickUser = userMapper.selectUserByLoginName(makeorderPickVo.getPickUser()); + if(pickUser!=null){ + makeorderPickVo.setPickUserName(pickUser.getUserName()); + } + SysUser applyUser = userMapper.selectUserByLoginName(makeorderPickVo.getApplyUser()); + if(applyUser!=null){ + makeorderPickVo.setApplyUserName(applyUser.getUserName()); + } + } return makeorderPickVo; } @@ -146,8 +158,11 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService * @return 结果 */ @Override + @Transactional(rollbackFor = Exception.class) public int insertSysMakeorderPick(SysMakeorderPick sysMakeorderPick) { + String makeNo = sysMakeorderPick.getMakeNo(); + List pickDetails = sysMakeorderPick.getPickDetails(); String loginName = ShiroUtils.getLoginName(); sysMakeorderPick.setCreateBy(loginName); sysMakeorderPick.setCreateTime(DateUtils.getNowDate()); @@ -155,7 +170,13 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService String billNo = redisCache.generateBillNo("SCLL"); sysMakeorderPick.setPickNo(billNo); int id = sysMakeorderPickMapper.insertSysMakeorderPick(sysMakeorderPick); - // yjc todo 子表插入领料数量 + // 插入子表 + for (int i = 0; i < pickDetails.size(); i++) { + SysMakeorderPickDetail pickDetail = pickDetails.get(i); + pickDetail.setPickNo(billNo); + pickDetail.setMakeNo(makeNo); + makeorderPickDetailService.insertSysMakeorderPickDetail(pickDetail); + } return id; } @@ -227,7 +248,7 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService SysUser user = ShiroUtils.getSysUser(); makeorderPick.setApplyUser(user.getLoginName()); makeorderPick.setApplyTime(DateUtils.getNowDate()); - //获取插入的Bom列表的id + // 保存 insertSysMakeorderPick(makeorderPick); // 启动流程 String applyTitle = user.getUserName()+"发起了生产领料单提交审批-"+DateUtils.dateTimeNow(); diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickDetailMapper.xml new file mode 100644 index 00000000..9340d612 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickDetailMapper.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + select id, del_flag, create_by, create_time, update_by, update_time, remark, make_no, pick_no, material_no, bom_id, pick_num from sys_makeorder_pick_detail + + + + + + + + insert into sys_makeorder_pick_detail + + del_flag, + create_by, + create_time, + update_by, + update_time, + remark, + make_no, + pick_no, + material_no, + bom_id, + pick_num, + + + #{delFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{makeNo}, + #{pickNo}, + #{materialNo}, + #{bomId}, + #{pickNum}, + + + + + update sys_makeorder_pick_detail + + del_flag = #{delFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + make_no = #{makeNo}, + pick_no = #{pickNo}, + material_no = #{materialNo}, + bom_id = #{bomId}, + pick_num = #{pickNum}, + + where id = #{id} + + + + delete from sys_makeorder_pick_detail where id = #{id} + + + + delete from sys_makeorder_pick_detail where id in + + #{id} + + + + + update sys_makeorder_pick_detail set del_flag = '1' where id = #{id} + + + + update sys_makeorder_pick_detail set del_flag = '0' where id = #{id} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickMapper.xml index 0dfcb3b1..582de6ff 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysMakeorderPickMapper.xml @@ -27,41 +27,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + - select id, del_flag, create_by, create_time, update_by, update_time, remark, make_no, sale_no, pick_no, pick_status, pick_user, audit_status, instance_id, instance_type, submit_instance_id, cancel_instance_id, restore_instance_id, apply_title, apply_user, apply_time from sys_makeorder_pick + select a.id, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark + , a.make_no, a.sale_no, a.pick_no, a.pick_status, a.pick_user, a.audit_status + , a.instance_id, a.instance_type, a.submit_instance_id, a.cancel_instance_id, a.restore_instance_id, a.apply_title, a.apply_user, a.apply_time + ,b.material_sum + ,b.enterprise_sum + from sys_makeorder_pick a + left join sys_sales_order b + on a.sale_no = b.sales_order_code diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html new file mode 100644 index 00000000..ada7d641 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html @@ -0,0 +1,355 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+
+
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html index 7b67718e..1b0a584e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/bmps.html @@ -330,7 +330,7 @@ field : 'id', title : '生产订单部门ID', formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -339,7 +339,7 @@ title : '生产订单号', visible: false, formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -348,7 +348,7 @@ title : '料号', visible: false, formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -379,7 +379,7 @@ /*if(subTableFormArray[parentRowIndex]){ value = subTableFormArray[parentRowIndex].deptName?subTableFormArray[parentRowIndex].deptName:value; }*/ - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -387,7 +387,7 @@ field: 'planFinishDate', title: '计划完成时间', formatter: function(value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; var endDateName = 'planFinishEndDate_'+parentRowIndex; var startDateName = 'planFinishStartDate_'+parentRowIndex; var html; @@ -434,7 +434,7 @@ // 当所有数据被加载时触发 onLoadSuccess: function(data) { for (let i = 0; i < data.rows.length; i++) { - var curIndex = parentRowIndex*5+i; + var curIndex = parentRowIndex*6+i; var startDateIndex = 'planFinishStartDate_'+i; var endDateIndex = 'planFinishEndDate_'+i; diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html index 7ca89bbe..6d041f35 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/bmzgqr.html @@ -334,7 +334,7 @@ field : 'id', title : '生产订单部门ID', formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -343,7 +343,7 @@ title : '生产订单号', visible: false, formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -352,7 +352,7 @@ title : '料号', visible: false, formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -383,7 +383,7 @@ /*if(subTableFormArray[parentRowIndex]){ value = subTableFormArray[parentRowIndex].deptName?subTableFormArray[parentRowIndex].deptName:value; }*/ - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -391,7 +391,7 @@ field: 'planFinishDate', title: '计划完成时间', formatter: function(value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; var endDateName = 'planFinishEndDate_'+parentRowIndex; var startDateName = 'planFinishStartDate_'+parentRowIndex; var html; @@ -411,7 +411,7 @@ field : 'deptLeaderConfirmStatus', title : '部门主管确认', formatter: function(value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; var disabledFlag = row.deptNumber == curUsrDeptNumber; var html = ''; } }, @@ -343,7 +343,7 @@ title : '生产订单号', visible: false, formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -352,7 +352,7 @@ title : '料号', visible: false, formatter: function (value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -383,7 +383,7 @@ /*if(subTableFormArray[parentRowIndex]){ value = subTableFormArray[parentRowIndex].deptName?subTableFormArray[parentRowIndex].deptName:value; }*/ - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; return ''; } }, @@ -391,7 +391,7 @@ field: 'planFinishDate', title: '计划完成时间', formatter: function(value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; var endDateName = 'planFinishEndDate_'+parentRowIndex; var startDateName = 'planFinishStartDate_'+parentRowIndex; var html; @@ -411,7 +411,7 @@ field : 'deptLeaderConfirmStatus', title : '部门主管确认', formatter: function(value, row, index) { - var curIndex = parentRowIndex*5+index; + var curIndex = parentRowIndex*6+index; var html = ' +
@@ -34,22 +34,314 @@
- +
+
+
+
+