diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java index 4d11f1eb..81057408 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java @@ -862,6 +862,7 @@ public class DepositoryRecordController { List applicationOutMinByParentId = depositoryRecordService.findApplicationOutMinByParentId(outRecordP.getId()); StringBuilder mname = new StringBuilder(); StringBuilder mcode = new StringBuilder(); + StringBuilder mversion = new StringBuilder(); StringBuilder depositoryName = new StringBuilder(); double sumQuantity = 0; double sumPrice = 0.0; @@ -869,10 +870,14 @@ public class DepositoryRecordController { // 获取子订单信息 // 获取出库物料信息 Inventory inventory = materialService.findInventoryById(applicationOutRecordMin.getMid()); + if (inventory.getBrand() == null) { + inventory.setBrand(""); + } // 获取出库物料仓库信息 Depository depository = depositoryService.findDepositoryById(applicationOutRecordMin.getDepositoryId()); mname.append(inventory.getMname()).append(","); mcode.append(inventory.getCode()).append(","); + mversion.append(inventory.getBrand()).append(" ").append(inventory.getVersion()).append(","); depositoryName.append(depository.getDname()).append(","); sumQuantity += applicationOutRecordMin.getQuantity(); String unit = applicationOutRecordMin.getUnit(); @@ -894,6 +899,7 @@ public class DepositoryRecordController { } outRecordP.setMcode(mcode.toString()); outRecordP.setMname(mname.toString()); + outRecordP.setMversion(mversion.toString()); outRecordP.setDepositoryName(depositoryName.toString()); outRecordP.setQuantity(sumQuantity); outRecordP.setPrice(sumPrice); diff --git a/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationInRecord.java b/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationInRecord.java index 640568f9..4675af11 100644 --- a/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationInRecord.java +++ b/src/main/java/com/dreamchaser/depository_manage/entity/ApplicationInRecord.java @@ -155,5 +155,9 @@ public class ApplicationInRecord { * 物料品牌 */ private String mbrand; + /** + * 库位编码 + */ + private String pkingdeecode; } diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml index e0ad3769..0fc58090 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -84,6 +84,7 @@ + @@ -169,7 +170,7 @@ - airid,did,airmproducedDate,mname,quantity,price,tname,applicant_time,aircode,dname,applicant_id,applyRemark,mcode,mversion,munit,mtexture,mkingdeecode,mdepositoryCode,airUnit,flagForGroup,mid,airPlaceId,airapproverPass,airapproverTime,airapproverId,airstate,airapproverMessage,airtoGroupId,mbrand + airid,did,airmproducedDate,mname,quantity,price,tname,applicant_time,aircode,dname,applicant_id,applyRemark,mcode,mversion,munit,mtexture,mkingdeecode,mdepositoryCode,airUnit,flagForGroup,mid,airPlaceId,airapproverPass,airapproverTime,airapproverId,airstate,airapproverMessage,airtoGroupId,mbrand,pkingdeecode diff --git a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java index 8b701160..bbaa21f5 100644 --- a/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java +++ b/src/main/java/com/dreamchaser/depository_manage/pojo/ApplicationInRecordP.java @@ -155,6 +155,12 @@ public class ApplicationInRecordP { */ private String mbrand; + + /** + * 库位编码 + */ + private String pkingdeecode; + public ApplicationInRecordP(ApplicationInRecord ar) { this.id = ar.getId(); this.mname = ar.getMname(); @@ -188,6 +194,7 @@ public class ApplicationInRecordP { this.airapproverMessage = ar.getAirapproverMessage(); this.mproducedDate = ar.getMproducedDate(); this.mbrand = ar.getMbrand() == null ? "" : ar.getMbrand(); + this.pkingdeecode = ar.getPkingdeecode(); } public ApplicationInRecordP() { diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java index c4b47add..342ca4d8 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java @@ -108,7 +108,7 @@ public class MaterialServiceImpl implements MaterialService { } // 获取当前类型 Object code = map.get("code"); - if(code == null){ + if (code == null) { if (map.containsKey("typeId")) { Integer typeId = ObjectFormatUtil.toInteger(map.get("typeId").toString()); MaterialType materialTypeById = materialTypeMapper.findMaterialTypeById(typeId); @@ -118,12 +118,12 @@ public class MaterialServiceImpl implements MaterialService { if (maxCode == null) { newCode = String.format("%04d", 1); } else { - newCode = String.format("%04d",Integer.parseInt(maxCode) + 1); + newCode = String.format("%04d", Integer.parseInt(maxCode) + 1); } - map.put("code",newCode); + map.put("code", newCode); } - }else{ + } else { map.put("materialTypeId", map.get("typeId")); } if (map.containsKey("barCode")) { @@ -257,7 +257,7 @@ public class MaterialServiceImpl implements MaterialService { if (material.getPrice() != null) { material.setPrice(material.getPrice() / 100); } - if(material.getBrand() == null){ + if (material.getBrand() == null) { material.setBrand(""); } } @@ -479,6 +479,7 @@ public class MaterialServiceImpl implements MaterialService { inventoryById.setPrice(0.0); } inventoryById.setAmounts(inventoryById.getPrice() * inventoryById.getQuantity()); + return inventoryById; } @@ -862,7 +863,7 @@ public class MaterialServiceImpl implements MaterialService { m.setShowQuantity(splitInventoryForUnit); m.setUnit(unit); m.setDefaultUnit(unit); - if(m.getBrand() == null){ + if (m.getBrand() == null) { m.setBrand(""); } result.add(m); diff --git a/src/main/resources/templates/pages/depository/table-in_mobile.html b/src/main/resources/templates/pages/depository/table-in_mobile.html index 5e9b263c..50446035 100644 --- a/src/main/resources/templates/pages/depository/table-in_mobile.html +++ b/src/main/resources/templates/pages/depository/table-in_mobile.html @@ -116,15 +116,19 @@ lis.push("
"); for (let i = 0; i < result.length; i++) { + let brandItem ='

' + "物料品牌:"+result[i].mbrand + '

'; + if(result[i].mbrand === ""){ + brandItem = ""; + } lis.push('
  • ' + result[i].applicantName + "的入库申请" + '

    '); lis.push('
    ' - + '

    ' + result[i].mname + '

    ' - + '

    ' + result[i].mversion + '

    ' - + '

    ' + result[i].mbrand + '

    ' - + '

    ' + result[i].quantity + " : " + result[i].airUnit + '

    ' - + '

    ' + result[i].depositoryName + '

    ' - + '

    ' + result[i].applicantTime + '

    ' + + '

    ' + "物料名称:"+ result[i].mname + '

    ' + + '

    ' + "物料型号:"+result[i].mversion + '

    ' + + brandItem + + '

    ' + "入库数量:"+result[i].quantity + " : " + result[i].airUnit + '

    ' + + '

    ' + "入库位置:"+result[i].depositoryName+"-"+result[i].pkingdeecode + '

    ' + + '

    ' + "申请时间:"+ result[i].applicantTime + '

    ' + '
  • '); } lis.push('
    '); diff --git a/src/main/resources/templates/pages/depository/table-out_mobile.html b/src/main/resources/templates/pages/depository/table-out_mobile.html index 19a8a160..653a988f 100644 --- a/src/main/resources/templates/pages/depository/table-out_mobile.html +++ b/src/main/resources/templates/pages/depository/table-out_mobile.html @@ -123,15 +123,14 @@ result = res.data; lis.push("
    "); for (let i = 0; i < result.length; i++) { - lis.push('
  • ' + result[i].applicantName + "的出库申请" + '

    '); lis.push('
    ' - + '

    ' + result[i].mname + '

    ' - + '

    ' + result[i].mversion + '

    ' - + '

    ' + result[i].mbrand + '

    ' - + '

    ' + result[i].depositoryName + '

    ' - + '

    ' + result[i].applicantTime + '

    ' + + '

    ' + "物料名称:"+ result[i].mname + '

    ' + + '

    ' + "物料型号:" +result[i].mversion + '

    ' + + '

    ' + "申请总数:" + result[i].quantity + '

    ' + + '

    ' + "所处仓库:" + result[i].depositoryName + '

    ' + + '

    ' + "申请时间:"+ result[i].applicantTime + '

    ' + '
  • '); } lis.push('
    '); diff --git a/src/main/resources/templates/pages/depository/table-stock_mobile.html b/src/main/resources/templates/pages/depository/table-stock_mobile.html index 3c34a9f1..fbfdc292 100644 --- a/src/main/resources/templates/pages/depository/table-stock_mobile.html +++ b/src/main/resources/templates/pages/depository/table-stock_mobile.html @@ -150,13 +150,17 @@ for (let i = 0; i < result.length; i++) { + let brandItem = '

    ' + "物料品牌:" + result[i].brand + '

    '; + if (result[i].brand === "") { + brandItem = ""; + } lis.push('
  • ' + result[i].mname + '

    '); lis.push('
    ' - + '

    ' + result[i].code + '

    ' - + '

    ' + result[i].version + '

    ' - + '

    ' + "品牌:" + result[i].brand + '

    ' - + '

    ' + result[i].typeName + '

    ' + + '

    ' + "物料编码:" + result[i].code + '

    ' + + '

    ' + "物料型号:" + result[i].version + '

    ' + + brandItem + + '

    ' + "物料类型:" + result[i].typeName + '

    ' + '
  • '); } lis.push(''); diff --git a/src/main/resources/templates/pages/group/group-out_mobile.html b/src/main/resources/templates/pages/group/group-out_mobile.html index 80784ca0..32ddaada 100644 --- a/src/main/resources/templates/pages/group/group-out_mobile.html +++ b/src/main/resources/templates/pages/group/group-out_mobile.html @@ -108,10 +108,10 @@ lis.push('
  • ' + result[i].gname + '

    '); lis.push('
    ' - + '

    ' + result[i].code + '

    ' - + '

    ' + Object.keys(result[i].materialSimple).toString() + '

    ' - + '

    ' + result[i].remark + '

    ' - + '

    ' + result[i].createTime + '

    ' + + '

    ' +"组合编码:"+ result[i].code + '

    ' + + '

    ' + "包含物料:"+Object.keys(result[i].materialSimple).toString() + '

    ' + + '

    ' + "备注说明:"+result[i].remark + '

    ' + + '

    ' +"创建时间:"+ result[i].createTime + '

    ' + '
  • '); } lis.push(''); diff --git a/src/main/resources/templates/pages/group/group_edit_mobile.html b/src/main/resources/templates/pages/group/group_edit_mobile.html index 63fb3e5b..0b57ee52 100644 --- a/src/main/resources/templates/pages/group/group_edit_mobile.html +++ b/src/main/resources/templates/pages/group/group_edit_mobile.html @@ -106,11 +106,11 @@ lis.push('
  • ' + result[i].mname + '

    '); lis.push('
    ' - + '

    ' + result[i].mcode + '

    ' - + '

    ' + result[i].version + '

    ' - + '

    ' + result[i].brand + '

    ' - + '

    ' + result[i].quantity + ":" + result[i].showUnit + '

    ' - + '

    ' + result[i].showCreateTime + '

    ' + + '

    ' + "物料编码:" + result[i].mcode + '

    ' + + '

    ' + "物料型号:" + result[i].version + '

    ' + + '

    ' + "物料品牌:" + result[i].brand + '

    ' + + '

    ' + "包含数量:" + result[i].quantity + ":" + result[i].showUnit + '

    ' + + '

    ' + "创建时间:" + result[i].showCreateTime + '

    ' + '
  • '); } lis.push(''); @@ -173,7 +173,7 @@ }); }; - showDetail = function(obj) { + showDetail = function (obj) { layer.open({ type: 2, title: "物料明细", @@ -183,11 +183,11 @@ area: ['100%', '100%'], move: '.layui-layer-title', fixed: false, - content: '/materialForGroup?mid='+obj+'&gid='+id, - end:function () { + content: '/materialForGroup?mid=' + obj + '&gid=' + id, + end: function () { } }); -} + } }) diff --git a/src/main/resources/templates/pages/material/material-out_mobile.html b/src/main/resources/templates/pages/material/material-out_mobile.html index 4401fcfc..57204fed 100644 --- a/src/main/resources/templates/pages/material/material-out_mobile.html +++ b/src/main/resources/templates/pages/material/material-out_mobile.html @@ -158,13 +158,16 @@ result = res.data; lis.push("
    "); for (let i = 0; i < result.length; i++) { - + let brandItem ='

    ' + "物料品牌:"+result[i].brand + '

    '; + if(result[i].brand === ""){ + brandItem = ""; + } lis.push('
  • ' + result[i].mname + '

    '); + + result[i].id + ')">

    ' + "物料名称:"+result[i].mname + '

    '); lis.push('
    ' - + '

    ' + result[i].code + '

    ' - + '

    ' + result[i].version + '

    ' - + '

    ' + "品牌:" + result[i].brand + '

    ' + + '

    ' + "物料编码:"+result[i].code + '

    ' + + '

    ' +"物料型号:"+ result[i].version + '

    ' + + brandItem + '
  • '); } lis.push('
    '); @@ -221,13 +224,16 @@ result = res.data; lis.push("
    "); for (let i = 0; i < result.length; i++) { - + let brandItem ='

    ' + "物料品牌:"+result[i].brand + '

    '; + if(result[i].brand === ""){ + brandItem = ""; + } lis.push('
  • ' + result[i].mname + '

    '); + + result[i].id + ')">

    ' + "物料名称:"+result[i].mname + '

    '); lis.push('
    ' - + '

    ' + result[i].code + '

    ' - + '

    ' + result[i].version + '

    ' - + '

    ' + "品牌:" + result[i].brand + '

    ' + + '

    ' + "物料编码:"+result[i].code + '

    ' + + '

    ' +"物料型号:"+ result[i].version + '

    ' + + brandItem + '
  • '); } lis.push('
    '); diff --git a/src/main/resources/templates/pages/split/split-out_mobile.html b/src/main/resources/templates/pages/split/split-out_mobile.html index bf3569b0..3f249f43 100644 --- a/src/main/resources/templates/pages/split/split-out_mobile.html +++ b/src/main/resources/templates/pages/split/split-out_mobile.html @@ -115,15 +115,19 @@ result = res.data; lis.push("
    "); for (let i = 0; i < result.length; i++) { - + let brandItem ='

    ' + "物料品牌:"+result[i].brand + '

    '; + if(result[i].brand === ""){ + brandItem = ""; + } lis.push('
  • ' + result[i].mname + '

    '); + + result[i].id + ')">

    ' + "物料名称:"+result[i].mname + '

    '); lis.push('
    ' - + '

    ' + result[i].mcode + '

    ' - + '

    ' + result[i].version + '

    ' - + '

    ' + result[i].brand + '

    ' + + '

    ' + "物料编码:"+result[i].mcode + '

    ' + + '

    ' + "物料型号:"+result[i].version + '

    ' + + brandItem + '

    ' + "旧单位:" + result[i].oldUnit + '

    ' - + '

    ' + "新单位:" + result[i].quantity + " : " + result[i].newUnit + '

    ' + + '

    ' + "新单位:" + result[i].newUnit + '

    ' + + '

    ' + "对应关系:" + result[i].quantity + '

    ' + '
  • '); } lis.push('
    '); @@ -155,15 +159,19 @@ result = res.data; lis.push("
    "); for (let i = 0; i < result.length; i++) { - + let brandItem ='

    ' + "物料品牌:"+result[i].brand + '

    '; + if(result[i].brand === ""){ + brandItem = ""; + } lis.push('
  • ' + result[i].mname + '

    '); + + result[i].id + ')">

    ' + "物料名称:"+result[i].mname + '

    '); lis.push('
    ' - + '

    ' + result[i].mcode + '

    ' - + '

    ' + result[i].version + '

    ' - + '

    ' + result[i].brand + '

    ' + + '

    ' + "物料编码:"+result[i].mcode + '

    ' + + '

    ' + "物料型号:"+result[i].version + '

    ' + + brandItem + '

    ' + "旧单位:" + result[i].oldUnit + '

    ' - + '

    ' + "新单位:" + result[i].quantity + " : " + result[i].newUnit + '

    ' + + '

    ' + "新单位:" + result[i].newUnit + '

    ' + + '

    ' + "对应关系:" + result[i].quantity + '

    ' + '
  • '); } lis.push('
    ');