| | |
| | | @TableField("vendor") |
| | | private String vendor; |
| | | |
| | | @ApiModelProperty(value= "æ¯ç®±æ°é") |
| | | @TableField("qty_box") |
| | | private Double qtyBox; |
| | | |
| | | public String getLocNo$(){ |
| | | LocMastService service = SpringUtils.getBean(LocMastService.class); |
| | | LocMast locMast = service.selectById(this.locNo); |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public MatCodeCountDto() { |
| | | } |
| | | |
| | | |
| | | public MatCodeCountDto(String matNo, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, String supplier, Double count, String memo) { |
| | | public MatCodeCountDto(String matNo, String supplier, Double count, String memo,String source, String vendor) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.supplier = supplier; |
| | | this.memo = memo; |
| | | this.source = source; |
| | | this.vendor= vendor; |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, String supplier, Double count) { |
| | | public MatCodeCountDto(String matNo, String supplier, Double count,String source, String vendor) { |
| | | this.matNo = matNo; |
| | | this.supplier = supplier; |
| | | this.count = count; |
| | | this.source = source; |
| | | this.vendor= vendor; |
| | | } |
| | | |
| | | public MatCodeCountDto(String billNo, Integer seqNo, String matNo, String supplier, Double count,String source, String vendor) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.billNo = billNo; |
| | | this.supplier = supplier; |
| | | this.seqNo = seqNo; |
| | | this.source = source; |
| | | this.vendor= vendor; |
| | | } |
| | | |
| | | public MatCodeCountDto(String billNo, Integer seqNo, String matNo, String supplier, Double count) { |
| | |
| | | this.supplier = supplier; |
| | | this.seqNo = seqNo; |
| | | } |
| | | |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | | public void setBillNo(String billNo) { this.billNo = billNo; } |
| | |
| | | @TableField("vendor") |
| | | private String vendor; |
| | | |
| | | @ApiModelProperty(value= "æ¯ç®±æ°é") |
| | | @TableField("qty_box") |
| | | private Double qtyBox; |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | |
| | | @ApiModelProperty(value= "ä¾åºå") |
| | | @TableField("vendor") |
| | | private String vendor; |
| | | |
| | | @ApiModelProperty(value = "æ¯ç®±æ°é") |
| | | @TableField("qty_box") |
| | | private Double qtyBox; |
| | | |
| | | public String getIoTime$(){ |
| | | if (Cools.isEmpty(this.ioTime)){ |
| | | return ""; |
| | |
| | | /** |
| | | * ä¿®æ¹åºåæç»æ°éï¼å¦ææ°é为0ï¼åå é¤è®°å½ |
| | | */ |
| | | boolean updateAnfme(Double qty, String locNo, String matNo); |
| | | boolean updateAnfme(Double qty, String locNo, String matNo,String supplier); |
| | | |
| | | boolean updateLocNo(String newLocNo, String oldLocNo); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateAnfme(Double qty, String locNo, String matNo) { |
| | | public boolean updateAnfme(Double qty, String locNo, String matNo,String supplier) { |
| | | if (qty <= 0) { |
| | | return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("mat_no", matNo)); |
| | | return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("mat_no", matNo).eq("supplier",supplier)); |
| | | } else { |
| | | int res = baseMapper.updateAnfme(qty, locNo, matNo); |
| | | return res > 0; |
| | |
| | | pltBarcode.setAllWeight(matCode.getWeight()*pltBarcode.getQty()+30); |
| | | pltBarcode.setVendor(combMat.getVendor()); |
| | | pltBarcode.setSource(combMat.getSource()); |
| | | pltBarcode.setQtyBox(matCode.getStr6()); |
| | | if (!pltBarcodeService.insert(pltBarcode)) { |
| | | throw new CoolException("ä¿åæ°æ®å¤±è´¥"); |
| | | } |
| | |
| | | // çæå·¥ä½æ¡£æç» |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getSupplier(), elem.getCount(),elem.getMemo())); |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getSupplier(), elem.getCount(),elem.getMemo(),elem.getSource(),elem.getVendor())); |
| | | }); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId); |
| | | // æ´æ°æºç«ç¹ä¿¡æ¯ |
| | |
| | | wrkDetl.setAllWeight(matCode.getWeight()*dto.getCount()+30); |
| | | wrkDetl.setSource(dto.getSource()); |
| | | wrkDetl.setVendor(dto.getVendor()); |
| | | wrkDetl.setWeight(matCode.getWeight()); |
| | | wrkDetl.setQtyBox(matCode.getStr6()); |
| | | if (!this.insert(wrkDetl)) { |
| | | throw new CoolException("ä¿å工使ç»å¤±è´¥"); |
| | | } |
| | |
| | | private IoCompleteService ioCompleteService; |
| | | @Autowired |
| | | private PltBarcodeService pltBarcodeService; |
| | | |
| | | @Autowired |
| | | private MatCodeService matCodeService; |
| | | /** |
| | | * ERPæ¥å£æ¯å¦å¯ç¨ |
| | | */ |
| | |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo()).eq("mat_no", wrkDetl.getMatNo()).eq("supplier", wrkDetl.getSupplier())); |
| | | if (null != locDetl) { |
| | | boolean res = locDetlService.updateAnfme(wrkDetl.getQty()+locDetl.getQty(), wrkMast.getLocNo(), wrkDetl.getMatNo()); |
| | | boolean res = locDetlService.updateAnfme(wrkDetl.getQty()+locDetl.getQty(), wrkMast.getLocNo(), wrkDetl.getMatNo(),wrkDetl.getSupplier()); |
| | | |
| | | |
| | | if (!res) { |
| | | exceptionHandle("å
¨æ¿å
¥åº ===>> æ´æ°åºåæç»å¤±è´¥ï¼[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | } else { |
| | | WrkDetl wrk_no = wrkDetlService.selectOne(new EntityWrapper<WrkDetl>() |
| | | .eq("wrk_no", wrkMast.getWrkNo())); |
| | | |
| | | .eq("wrk_no", wrkMast.getWrkNo()).eq("mat_no",wrkDetl.getMatNo()).eq("supplier",wrkDetl.getSupplier())); |
| | | |
| | | MatCode matCode = matCodeService.selectOne(new EntityWrapper<MatCode>().eq("mat_no", wrkDetl.getMatNo())); |
| | | locDetl = new LocDetl(); |
| | | |
| | | locDetl.setLocNo(wrkMast.getLocNo()); // åºä½å· |
| | |
| | | locDetl.setAllWeight(wrk_no.getAllWeight()); |
| | | locDetl.setSource(wrk_no.getSource()); |
| | | locDetl.setVendor(wrk_no.getVendor()); |
| | | locDetl.setWeight(matCode.getWeight()); |
| | | locDetl.setQtyBox(matCode.getStr6()); |
| | | if (!Cools.isEmpty(wrk_no)){ |
| | | locDetl.setMemo(wrk_no.getMemo()); |
| | | locDetl.setSupplier(wrk_no.getSupplier()); |
| | |
| | | // ä¿®æ¹åºåæç»æ°éï¼å¦æå·¥ä½æç»æ°é为0æ¶ï¼å é¤åºåæç» |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()).eq("mat_no", wrkDetl.getMatNo())); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(locDetl.getQty() - wrkDetl.getQty(), locMast.getLocNo(), wrkDetl.getMatNo())) { |
| | | if (!locDetlService.updateAnfme(locDetl.getQty() - wrkDetl.getQty(), locMast.getLocNo(), wrkDetl.getMatNo(),wrkDetl.getSupplier())) { |
| | | exceptionHandle("æ£æå
¥åº ===>> ä¿®æ¹åºåæç»æ°é失败ï¼[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | } |
| | | |
| | |
| | | for (WrkDetl wrkDetl:wrkDetls54) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()).eq("mat_no", wrkDetl.getMatNo())); |
| | | if (null != locDetl) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getQty()+locDetl.getQty(), locMast.getLocNo(), wrkDetl.getMatNo())) { |
| | | if (!locDetlService.updateAnfme(wrkDetl.getQty()+locDetl.getQty(), locMast.getLocNo(), wrkDetl.getMatNo(),wrkDetl.getSupplier())) { |
| | | exceptionHandle("å¹¶æ¿å
¥åº ===>> ä¿®æ¹åºåæç»æ°é失败ï¼[workNo={0}],[matNo={1}]", wrkMast.getWrkNo(), wrkDetl.getMatNo()); |
| | | } |
| | | } else { |
| | |
| | | // çæå·¥ä½æ¡£æç» |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | pltBarcodes.forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(), elem.getSeqNo(), elem.getMatNo(), null, elem.getQty())); |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(), elem.getSeqNo(), elem.getMatNo(), null, elem.getQty(),elem.getSource(),elem.getVendor())); |
| | | |
| | | //æ´æ°ç»ææ°æ®ç¶æä¸ºå
¥åºä¸ |
| | | Wrapper<PltBarcode> wrapper = new EntityWrapper<PltBarcode>().eq("barcode", elem.getBarcode()) |
| | |
| | | <result column="all_weight" property="allWeight"/> |
| | | <result column="source" property="source" /> |
| | | <result column="vendor" property="vendor" /> |
| | | <result column="qty_box" property="qtyBox"/> |
| | | </resultMap> |
| | | |
| | | <sql id="stockOutCondition"> |
| | |
| | | <result column="all_weight" property="allWeight"/> |
| | | <result column="source" property="source" /> |
| | | <result column="vendor" property="vendor" /> |
| | | <result column="qty_box" property="qtyBox"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="all_weight" property="allWeight"/> |
| | | <result column="source" property="source" /> |
| | | <result column="vendor" property="vendor" /> |
| | | <result column="qty_box" property="qtyBox"/> |
| | | </resultMap> |
| | | |
| | | <select id="queryWrkDetl" resultMap="BaseResultMap"> |
| | |
| | | {field: 'matNo', align: 'center',title: '产åç¼ç '} |
| | | ,{field: 'matName', align: 'center',title: '产ååç§°'} |
| | | ,{field: 'specs', align: 'center',title: 'è§æ ¼'} |
| | | ,{field: 'qty', align: 'center',title: 'æ°é'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé'} |
| | | ,{field: 'qty', align: 'center',title: 'å
¥åºæ°é'} |
| | | ,{field: 'qtyBox', align: 'center',title: 'æ¯ç®±æ°é(PCS)'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é(PCS)'} |
| | | ,{field: 'weight', align: 'center',title: 'æ¯ç®±éé(KG)'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé(KG)'} |
| | | ,{field: 'source', align: 'center',title: 'æ¥æº'} |
| | | ,{field: 'vendor', align: 'center',title: 'ä¾åºå'} |
| | | ,{field: 'unit', align: 'center',title: 'åä½', width:80, hide: true} |
| | |
| | | {fixed: 'left', field: 'count', title: 'æ°é(å¿
å¡«)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'supplier', title: 'æ¹å·', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'source', title: 'æ¥æº', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'vendor', title: 'ä¾åºå', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'allqty', title: 'æ»æ°é', align: 'center'}, |
| | | {field: 'allweight', title: 'æ»éé', align: 'center'} |
| | | {field: 'vendor', title: 'ä¾åºå', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | // {field: 'allqty', title: 'æ»æ°é', align: 'center'}, |
| | | // {field: 'allweight', title: 'æ»éé', align: 'center'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | |
| | | } |
| | | } |
| | | break |
| | | case 'source': |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (matCodeData[i]["matNo"] === obj.data.matNo |
| | | && (matCodeData[i]["supplier"] === obj.data.supplier || matCodeData[i]["supplier"]==='')){ |
| | | matCodeData[i]["source"] = obj.data.source; |
| | | } |
| | | } |
| | | break; |
| | | case 'vendor': |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (matCodeData[i]["matNo"] === obj.data.matNo |
| | | && (matCodeData[i]["supplier"] === obj.data.supplier || matCodeData[i]["supplier"]==='')){ |
| | | matCodeData[i]["vendor"] = obj.data.vendor; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | }); |
| | |
| | | ,{field: 'matNo', align: 'center',title: 'ç©æç¼ç '} |
| | | ,{field: 'matName', align: 'center',title: 'ç©æåç§°'} |
| | | ,{field: 'qty', align: 'center',title: 'å
¥åºæ°é'} |
| | | ,{field: 'qtyBox', align: 'center',title: 'æ¯ç®±æ°é'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é'} |
| | | ,{field: 'qtyBox', align: 'center',title: 'æ¯ç®±æ°é(PCS)'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é(PCS)'} |
| | | ,{field: 'locNo', align: 'center',title: 'åºä½å·'} |
| | | ,{field: 'specs', align: 'center',title: 'è§æ ¼'} |
| | | ,{field: 'unit', align: 'center',title: 'åä½'} |
| | |
| | | var cols = [ |
| | | {field: 'wrkNo', align: 'center',title: 'å·¥ä½å·'} |
| | | ,{field: 'ioTime$', align: 'center',title: '工使¶é´'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé'} |
| | | ,{field: 'qtyBox', align: 'center',title: 'æ¯ç®±æ°é(PCS)'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é(PCS)'} |
| | | ,{field: 'weight', align: 'center',title: 'æ¯ç®±éé(KG)'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé(KG)'} |
| | | ,{field: 'source', align: 'center',title: 'æ¥æº'} |
| | | ,{field: 'vendor', align: 'center',title: 'ä¾åºå'} |
| | | ]; |
| | |
| | | {field: 'matNo', align: 'center',title: '产åç¼ç '} |
| | | ,{field: 'matName', align: 'center',title: '产ååç§°'} |
| | | ,{field: 'specs', align: 'center',title: 'è§æ ¼'} |
| | | ,{field: 'qty', align: 'center',title: 'æ°é'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé'} |
| | | ,{field: 'qty', align: 'center',title: 'å
¥åºæ°é'} |
| | | ,{field: 'qtyBox', align: 'center',title: 'æ¯ç®±æ°é(PCS)'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é(PCS)'} |
| | | ,{field: 'weight', align: 'center',title: 'æ¯ç®±éé(KG)'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé(KG)'} |
| | | ,{field: 'source', align: 'center',title: 'æ¥æº'} |
| | | ,{field: 'vendor', align: 'center',title: 'ä¾åºå'} |
| | | ,{field: 'unit', align: 'center',title: 'åä½', width:80, hide: true} |
| | |
| | | ,{field: 'matNo', align: 'center',title: '产åç¼ç '} |
| | | ,{field: 'matName', align: 'center',title: '产ååç§°'} |
| | | ,{field: 'specs', align: 'center',title: 'è§æ ¼'} |
| | | ,{field: 'qty', align: 'center',title: 'æ°é'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé'} |
| | | ,{field: 'qty', align: 'center',title: 'å
¥åºæ°é'} |
| | | ,{field: 'qtyBox', align: 'center',title: 'æ¯ç®±æ°é(PCS)'} |
| | | ,{field: 'allQty', align: 'center',title: 'æ»æ°é(PCS)'} |
| | | ,{field: 'weight', align: 'center',title: 'æ¯ç®±éé(KG)'} |
| | | ,{field: 'allWeight', align: 'center',title: 'æ»éé(KG)'} |
| | | ,{field: 'source', align: 'center',title: 'æ¥æº'} |
| | | ,{field: 'vendor', align: 'center',title: 'ä¾åºå'} |
| | | ,{field: 'unit', align: 'center',title: 'åä½', width:80, hide: true} |
| | |
| | | |
| | | |
| | | 工使¡£ï¼wrk_detlåwrk_detl_logï¼æï¼all_qty(æ»æ°éï¼æµ®ç¹ç±»å) all_weight(æ»ééï¼æµ®ç¹ç±»å) |
| | | source(æ¥æºï¼å符串) vendor(ä¾åºåï¼å符串) |
| | | source(æ¥æºï¼å符串) vendor(ä¾åºåï¼å符串) qty_box(æ¯ç®±æ°éï¼æµ®ç¹ç±»å) |
| | | |
| | | åºå表ï¼loc_detlï¼æï¼all_qty(æ»æ°éï¼æµ®ç¹ç±»å) all_weight(æ»ééï¼æµ®ç¹ç±»å) |
| | | source(æ¥æºï¼å符串) vendor(ä¾åºåï¼å符串) |
| | | source(æ¥æºï¼å符串) vendor(ä¾åºåï¼å符串) qty_box(æ¯ç®±æ°éï¼æµ®ç¹ç±»å) |
| | | |
| | | |
| | | ç©æè¡¨ï¼mat_codeï¼åæ´æï¼str3ï¼å®¢æ·åç§°ï¼åç¬¦ä¸²ï¼ str4ï¼é¡¹ç®ä¿¡æ¯ï¼åç¬¦ä¸²ï¼ str5ï¼ç±»å«ï¼åç¬¦ä¸²ï¼ |