Browse Source

[update]:生产订单-领料单驳回重新申请更新明细数量

dev
youjianchi 7 months ago
parent
commit
cce486eef8
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickServiceImpl.java

9
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeorderPickServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.PageDomain; import com.ruoyi.common.core.page.PageDomain;
@ -26,6 +27,7 @@ import org.activiti.engine.task.Task;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -187,8 +189,15 @@ public class SysMakeorderPickServiceImpl implements ISysMakeorderPickService
* @return 结果 * @return 结果
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public int updateSysMakeorderPick(SysMakeorderPick sysMakeorderPick) public int updateSysMakeorderPick(SysMakeorderPick sysMakeorderPick)
{ {
List<SysMakeorderPickDetail> pickDetails = sysMakeorderPick.getPickDetails();
if(CollectionUtil.isNotEmpty(pickDetails)){
pickDetails.forEach(pickDetail->{
makeorderPickDetailService.updateSysMakeorderPickDetail(pickDetail);
});
}
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
sysMakeorderPick.setUpdateBy(loginName); sysMakeorderPick.setUpdateBy(loginName);
sysMakeorderPick.setUpdateTime(DateUtils.getNowDate()); sysMakeorderPick.setUpdateTime(DateUtils.getNowDate());

Loading…
Cancel
Save