Merge branch 'tzhneasrs' of http://47.97.1.152:5880/r/zy-asrs into tzhneasrs
| | |
| | | |
| | | plaService.updateById(pla); |
| | | |
| | | SaasUtils.insertLog(2,sourceLocNo,pla.getBrand(),pla.getWeightAnfme(),getUser().getUsername(),locNo,pla.getBatch(),pla.getPackageNo()); |
| | | SaasUtils.insertLog(2,sourceLocNo,pla.getBrand(),pla.getWeightAnfme(),getUser().getUsername(), |
| | | locNo,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | |
| | | return R.ok(); |
| | | } |
| | |
| | | pla.setModifyTime(new Date()); |
| | | pla.setWeightAnfme(0.0); |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1,pla.getLocNo(),pla.getBrand(),anfme,getUser().getUsername(),null,pla.getBatch(),pla.getPackageNo()); |
| | | SaasUtils.insertLog(1,pla.getLocNo(),pla.getBrand(),anfme,getUser().getUsername(), |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | }); |
| | | |
| | | return R.ok(); |
| | |
| | | manPakOut.setStatus(0); |
| | | manPakOut.setDocId(plaQty.getOrderDetlId()); |
| | | manPakOut.setNodeId(plaQty.getId()); |
| | | manPakOut.setCustName(plaQty.getCustomer()); |
| | | //manPakOut.setNodeId(plaQty.getOrderDetlId()); |
| | | manPakOutService.insert(manPakOut); |
| | | return R.ok(); |
| | |
| | | private String doc_num; |
| | | private Date create_time; |
| | | private Integer status; |
| | | private String custName; |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.create_time)){ |
| | |
| | | manLocDetl.setAnfme(locDetlAdjust.getCount()); |
| | | manLocDetl.setUpdateBy(userId); |
| | | manLocDetl.setModiTime(now); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null, null); |
| | | this.baseMapper.insert(manLocDetl); |
| | | } |
| | | } |
| | |
| | | } |
| | | orderService.checkComplete(order.getOrderNo()); |
| | | |
| | | SaasUtils.insertLog(0,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(0,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | } |
| | | |
| | | |
| | |
| | | return R.error("更新平库库存状态失败"); |
| | | } |
| | | } |
| | | SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | |
| | | } |
| | | return R.ok("下架完成"); |
| | |
| | | pla.setLocNo(node.getUuid()); |
| | | |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(0,locNo,pla.getBrand(),pla.getWeightAnfme(),user.getUsername(),null,pla.getBatch(),pla.getPackageNo()); |
| | | SaasUtils.insertLog(0,locNo,pla.getBrand(),pla.getWeightAnfme(),user.getUsername(), |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_3); |
| | | } |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1,locNo,pla.getBrand(),anfme,null,null,pla.getBatch(),pla.getPackageNo()); |
| | | SaasUtils.insertLog(1,locNo,pla.getBrand(),anfme,null,null, |
| | | pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | |
| | | //更新订单明细 |
| | | Order order = orderService.selectByNo(orderNo); |
| | |
| | | manLocDetl.setCreateBy(userId); |
| | | manLocDetl.setStatus(1); |
| | | manLocDetl.setPayment(1); |
| | | SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | manLocDetlService.insert(manLocDetl); |
| | | }else { |
| | | // check.setAnfme(dto.getCount() + check.getAnfme()); |
| | |
| | | if (manLocDetl.getAnfme() - param.getCount() < 0) { |
| | | return R.error("物料:"+ param.getMatnr() + " 在库位中数量不足"); |
| | | } else if (manLocDetl.getAnfme() - param.getCount() == 0) { |
| | | SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | manLocDetlService.delete(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no",node.getUuid()) |
| | | .eq("matnr",param.getMatnr())); |
| | |
| | | manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no",node.getUuid()) |
| | | .eq("matnr",param.getMatnr())); |
| | | SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | } |
| | | } |
| | | } |
| | |
| | | source.setLocNo(targetNode.getUuid()); |
| | | source.setNodeId(targetNode.getId()); |
| | | |
| | | SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme(),user.getUsername(),null,null,null); |
| | | SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | manLocDetlService.insert(source); |
| | | }else { |
| | | // check.setAnfme(check.getAnfme() + source.getAnfme()); |
| | |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | this.updateById(pla); |
| | | |
| | | SaasUtils.insertLog(0,pla.getLocNo(),pla.getBrand(),plaQty.getOrderWeight(),user.getUsername(),null,pla.getBatch(),pla.getPackageNo()); |
| | | SaasUtils.insertLog(0,pla.getLocNo(),pla.getBrand(),plaQty.getOrderWeight(),user.getUsername(), |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | |
| | | }); |
| | | } |
| | |
| | | @Override |
| | | public Page<Pla> getStockStatisAll(Page<Pla> page) { |
| | | |
| | | List<Pla> plaList; |
| | | if(Cools.isEmpty(page.getCondition().get("brand"))){ |
| | | page.setRecords(baseMapper.getStockStatisAll()); |
| | | plaList=baseMapper.getStockStatisAll(); |
| | | }else { |
| | | page.setRecords(baseMapper.getStockStatisAllByBrand(page.getCondition().get("brand").toString())); |
| | | plaList = baseMapper.getStockStatisAllByBrand(page.getCondition().get("brand").toString()); |
| | | } |
| | | |
| | | double weightSum = plaList.stream().mapToDouble(Pla::getWeight).sum(); |
| | | |
| | | // 最后一条记录仅供合计重量信息展示 |
| | | Pla pla = new Pla(); |
| | | pla.setBrand("合计"); |
| | | pla.setMatnr(""); |
| | | pla.setWeight(weightSum); |
| | | plaList.add(pla); |
| | | |
| | | page.setRecords(plaList); |
| | | page.setTotal(0); |
| | | return page; |
| | | } |
| | |
| | | import java.util.Date; |
| | | |
| | | public class SaasUtils { |
| | | public static void insertLog(Integer type, String locNo, String matnr,Double anfme,String user,String targetLocNo,String batch,Integer packageNo){ |
| | | /** |
| | | * 记录出入库日志 |
| | | * @param type |
| | | * @param locNo |
| | | * @param matnr |
| | | * @param anfme |
| | | * @param user |
| | | * @param targetLocNo |
| | | * @param batch |
| | | * @param packageNo |
| | | * @param owner 主体 |
| | | * @param workshop 车间 |
| | | */ |
| | | public static void insertLog(Integer type, String locNo, String matnr,Double anfme, |
| | | String user,String targetLocNo,String batch,Integer packageNo,String owner,String workshop){ |
| | | SaasLogService bean = SpringUtils.getBean(SaasLogService.class); |
| | | SaasLog saasLog = new SaasLog(); |
| | | saasLog.setType(type); |
| | |
| | | saasLog.setPackageNo(packageNo); |
| | | saasLog.setCreateBy(1L); |
| | | saasLog.setCreateByName(user); |
| | | saasLog.setOwner(owner); |
| | | saasLog.setWorkshop(workshop); |
| | | bean.insert(saasLog); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | |
| | | @Data |
| | | @TableName("sys_saas_log") |
| | | @AllArgsConstructor |
| | | public class SaasLog implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | private String batch; |
| | | private Integer packageNo; |
| | | |
| | | /** |
| | | * 主体 |
| | | */ |
| | | private String owner; |
| | | |
| | | /** |
| | | * 车间 |
| | | */ |
| | | private String workshop; |
| | | |
| | | public SaasLog() {} |
| | | |
| | | public SaasLog(Long id,Integer type,String locNo,String matnr,Date ioTime,Long createBy) { |
| | |
| | | |
| | | <select id="selectPakOut" resultType="com.zy.asrs.entity.param.PakOutDTO"> |
| | | select * from ( |
| | | SELECT ROW_NUMBER() over (order by doc_num) as row, doc_num,MAX(create_time) as create_time FROM man_pakout |
| | | SELECT ROW_NUMBER() over (order by doc_num) as row, doc_num,MAX(create_time) as create_time, cust_name as custName FROM man_pakout |
| | | where 1=1 |
| | | <include refid="selectPakOutSql"></include> |
| | | GROUP BY doc_num |
| | | GROUP BY doc_num,cust_name |
| | | ) t where t.row BETWEEN ((#{curr}-1)*#{limit}+1) and (#{curr}*#{limit}) |
| | | ORDER BY create_time DESC |
| | | |
| | |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'packageNo', align: 'center',title: '包号'} |
| | | ,{field: 'targetLocNo', align: 'center',title: '目标库位'} |
| | | ,{field: 'owner', align: 'center',title: '主体'} |
| | | ,{field: 'workshop', align: 'center',title: '车间'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'createByName', align: 'center',title: '操作人'} |
| | | ,{field: 'ioTime$', align: 'center',title: '操作时间'} |