| | |
| | | |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(2, sourceLocNo, pla.getBrand(), pla.getWeightAnfme(), getUser().getUsername(), |
| | | locNo, pla.getBatch(), pla.getPackageNo(), pla.getOwner(), pla.getWorkshop(), null); |
| | | locNo, pla.getBatch(), pla.getPackageNo(), pla.getOwner(), pla.getWorkshop(), null,"移库前:"+pla.getWeightAnfme()); |
| | | |
| | | }); |
| | | |
| | |
| | | pla.setWeightAnfme(0.0); |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1, pla.getLocNo(), pla.getBrand(), anfme, getUser().getUsername(), |
| | | null, pla.getBatch(), pla.getPackageNo(), pla.getOwner(), pla.getWorkshop(), null); |
| | | null, pla.getBatch(), pla.getPackageNo(), pla.getOwner(), pla.getWorkshop(), null,"全部出库" + anfme); |
| | | }); |
| | | |
| | | return R.ok(); |
| | |
| | | manLocDetl.setUpdateBy(userId); |
| | | manLocDetl.setModiTime(now); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null, null,null); |
| | | null,null,null,null, null,null,"库存调整为"+locDetlAdjust.getCount()); |
| | | this.baseMapper.insert(manLocDetl); |
| | | } |
| | | } |
| | |
| | | orderService.checkComplete(order.getOrderNo()); |
| | | |
| | | SaasUtils.insertLog(0,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null,null); |
| | | null,null,null,null,null,null,"订单上架:"+jsonOrderDetl.getAnfme()); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null,null); |
| | | null,null,null,null,null,null,"订单下架:" +jsonOrderDetl.getAnfme() ); |
| | | |
| | | } |
| | | return R.ok("下架完成"); |
| | |
| | | |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(0,locNo,pla.getBrand(),pla.getWeightAnfme(),user.getUsername(), |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null,"pla入库:" + pla.getWeightAnfme()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | //更新plaQty信息 |
| | | plaQty.setPakoutTime(Utils.getDateStr(new Date())); |
| | | plaQtyService.updateById(plaQty); |
| | | |
| | | double beforeWeightAnfme = pla.getWeightAnfme(); |
| | | //更新pla明细 |
| | | pla.setWeightAnfme(pla.getWeightAnfme() - anfme); |
| | | pla.setQtyAnfme(pla.getQtyAnfme() - anfme); |
| | |
| | | log.info("pla出库v1,订单出库,更新为待出库或则全部出库,pla:{},anfme:{},是否替换:{}",pla,anfme,isReplace); |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1,locNo,pla.getBrand(),anfme,null,null, |
| | | pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null,"pla出库前:" + beforeWeightAnfme+",出库:" + anfme); |
| | | |
| | | //更新订单明细 |
| | | Order order = orderService.selectByNo(orderNo); |
| | |
| | | @Override |
| | | public void plaPackOutWithoutOrder(String brand, String batch, Integer packageNo, Double anfme) { |
| | | Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo,brand); |
| | | double beforeWeightAnfme = pla.getWeightAnfme(); |
| | | if(Cools.isEmpty(pla)){ |
| | | throw new CoolException("当前物料明细不存在"); |
| | | } |
| | |
| | | |
| | | plaService.updateById(pla); |
| | | |
| | | SaasUtils.insertLog(1,pla.getLocNo(),pla.getBrand(),anfme,null,null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | SaasUtils.insertLog(1,pla.getLocNo(),pla.getBrand(),anfme,null,null, |
| | | pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null,"pla手动出库前:" + beforeWeightAnfme +",出库:" + anfme); |
| | | |
| | | } |
| | | |
| | |
| | | manLocDetl.setStatus(1); |
| | | manLocDetl.setPayment(1); |
| | | SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null,null); |
| | | null,null,null,null,null,null,"入库"+ dto.getCount()); |
| | | manLocDetlService.insert(manLocDetl); |
| | | }else { |
| | | // check.setAnfme(dto.getCount() + check.getAnfme()); |
| | |
| | | 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,null,null,null); |
| | | null,null,null,null,null,null,"出库前剩余:" + manLocDetl.getAnfme()+",出库:"+param.getCount()); |
| | | manLocDetlService.delete(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no",node.getUuid()) |
| | | .eq("matnr",param.getMatnr())); |
| | | } else { |
| | | |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme() - param.getCount()); |
| | | double beforeWeightAnfme = manLocDetl.getAnfme(); |
| | | 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,null,null,null); |
| | | null,null,null,null,null,null,"出库前剩余:"+beforeWeightAnfme+",出库:"+param.getCount()); |
| | | } |
| | | } |
| | | } |
| | |
| | | source.setNodeId(targetNode.getId()); |
| | | |
| | | SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null,null); |
| | | null,null,null,null,null,null,"移库数量:" + source.getAnfme()); |
| | | manLocDetlService.insert(source); |
| | | }else { |
| | | // check.setAnfme(check.getAnfme() + source.getAnfme()); |
| | |
| | | pla.setTransfer("退货"); |
| | | pla.setStash(""); // 库区 |
| | | pla.setLocNo(""); // 库位 |
| | | |
| | | double beforeWeightAnfme = pla.getWeightAnfme(); |
| | | pla.setWeightAnfme(pla.getWeightAnfme() + plaQty.getOrderWeight()); |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | this.updateById(pla); |
| | | |
| | | SaasUtils.insertLog(4,pla.getLocNo(),pla.getBrand(),plaQty.getOrderWeight(),user.getUsername(), |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null,"退回前:"+beforeWeightAnfme+",退回后:"+pla.getWeightAnfme()); |
| | | |
| | | }); |
| | | } |
| | |
| | | * @param docType 单据类型 |
| | | */ |
| | | public static void insertLog(Integer type, String locNo, String matnr,Double anfme, |
| | | String user,String targetLocNo,String batch,Integer packageNo,String owner,String workshop, Long docType){ |
| | | String user,String targetLocNo,String batch,Integer packageNo,String owner,String workshop, Long docType,String memo){ |
| | | SaasLogService bean = SpringUtils.getBean(SaasLogService.class); |
| | | SaasLog saasLog = new SaasLog(); |
| | | saasLog.setType(type); |
| | |
| | | saasLog.setOwner(owner); |
| | | saasLog.setWorkshop(workshop); |
| | | saasLog.setDocType(docType); |
| | | saasLog.setMemo(memo); |
| | | bean.insert(saasLog); |
| | | } |
| | | } |
| | |
| | | @TableField("doc_type") |
| | | private Long docType; |
| | | |
| | | @TableField("memo") |
| | | private String memo; |
| | | |
| | | public SaasLog() {} |
| | | |
| | | public SaasLog(Long id,Integer type,String locNo,String matnr,Date ioTime,Long createBy) { |
| | |
| | | <file>${LOG_PATH}/info.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <FileNamePattern>${LOG_PATH}/info_%d{yyyy-MM-dd}.%i.log</FileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | <maxHistory>60</maxHistory> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>10MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | |
| | | <file>${LOG_PATH}/error.log</file> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <FileNamePattern>${LOG_PATH}/error_%d{yyyy-MM-dd}.%i.log</FileNamePattern> |
| | | <maxHistory>10</maxHistory> |
| | | <maxHistory>60</maxHistory> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>10MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | |
| | | <result column="io_time" property="ioTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_by_name" property="createByName" /> |
| | | <result column="memo" property="memo" /> |
| | | |
| | | </resultMap> |
| | | <select id="selectListSummary" resultType="com.zy.system.entity.SaasLog"> |
| | |
| | | // ,{field: 'createByName', align: 'center',title: '操作人'} |
| | | ,{field: 'ioTime$', align: 'center',title: '操作时间'} |
| | | ,{field: 'createBy', align: 'center',title: '', hide:true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide:true} |
| | | |
| | | ]], |
| | | request: { |