Commit 621d4a0f1d98ce79b0b0581033c76e73917e1fdf
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
13 changed files
with
67 additions
and
34 deletions
src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java
src/main/java/com/huaheng/pc/config/material/mapper/MaterialMapper.java
... | ... | @@ -4,4 +4,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | 4 | import com.huaheng.pc.config.material.domain.Material; |
5 | 5 | |
6 | 6 | public interface MaterialMapper extends BaseMapper<Material> { |
7 | + | |
8 | + /** | |
9 | + * 根据编码查询物料 | |
10 | + * @param code | |
11 | + * @return Material | |
12 | + */ | |
13 | + Material findAllByCode(String code); | |
7 | 14 | } |
8 | 15 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/config/material/service/MaterialService.java
... | ... | @@ -8,9 +8,20 @@ import java.util.List; |
8 | 8 | |
9 | 9 | public interface MaterialService extends IService<Material>{ |
10 | 10 | |
11 | + /** | |
12 | + * 批量删除物料 | |
13 | + * @param ids | |
14 | + * @return | |
15 | + */ | |
11 | 16 | AjaxResult removeByIds(String ids); |
12 | 17 | |
13 | - | |
18 | + /** | |
19 | + * excel导入物料 | |
20 | + * @param materialList | |
21 | + * @param updateSupport | |
22 | + * @param operName | |
23 | + * @return | |
24 | + */ | |
14 | 25 | String importMaterial(List<Material> materialList, Boolean updateSupport,String operName); |
15 | 26 | |
16 | 27 | /** |
... | ... | @@ -19,4 +30,6 @@ public interface MaterialService extends IService<Material>{ |
19 | 30 | * @return |
20 | 31 | */ |
21 | 32 | AjaxResult addSave(Material material); |
33 | + | |
34 | + Material findAllByCode(String code); | |
22 | 35 | } |
... | ... |
src/main/java/com/huaheng/pc/config/material/service/MaterialServiceImpl.java
... | ... | @@ -7,6 +7,7 @@ import com.huaheng.common.support.Convert; |
7 | 7 | import com.huaheng.common.utils.StringUtils; |
8 | 8 | import com.huaheng.common.utils.security.ShiroUtils; |
9 | 9 | import com.huaheng.framework.web.domain.AjaxResult; |
10 | +import com.huaheng.pc.config.materialMultiple.domain.MaterialMultiple; | |
10 | 11 | import com.huaheng.pc.config.materialType.domain.MaterialType; |
11 | 12 | import com.huaheng.pc.config.materialType.service.MaterialTypeService; |
12 | 13 | import com.huaheng.pc.config.materialUnit.domain.MaterialUnit; |
... | ... | @@ -32,6 +33,8 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i |
32 | 33 | private MaterialUnitService materialUnitService; |
33 | 34 | @Resource |
34 | 35 | private MaterialTypeService materialTypeService; |
36 | + @Resource | |
37 | + private MaterialMapper materialMapper; | |
35 | 38 | |
36 | 39 | @Override |
37 | 40 | public AjaxResult removeByIds(String ids) { |
... | ... | @@ -151,6 +154,11 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i |
151 | 154 | return AjaxResult.success("新增物料成功"); |
152 | 155 | } |
153 | 156 | |
157 | + @Override | |
158 | + public Material findAllByCode(String code) { | |
159 | + return materialMapper.findAllByCode(code); | |
160 | + } | |
161 | + | |
154 | 162 | /** |
155 | 163 | * 生成物料编码 |
156 | 164 | * @param code |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailServiceImpl.java
... | ... | @@ -130,16 +130,16 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe |
130 | 130 | |
131 | 131 | @Override |
132 | 132 | public List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail, String sqll, ShipmentPreference shipmentPreference) { |
133 | - if(shipmentPreference.getAllowQcCheckResult() == true) { | |
133 | + if(shipmentPreference.getAllowQcCheckResult() == false) { | |
134 | 134 | sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" + |
135 | 135 | "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" + |
136 | 136 | "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" + |
137 | - "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+ | |
138 | 137 | "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+ sqll; |
139 | 138 | }else { |
140 | 139 | sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" + |
141 | 140 | "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" + |
142 | 141 | "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" + |
142 | + "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+ | |
143 | 143 | "and qcCheck=1\n"+ sqll; |
144 | 144 | } |
145 | 145 | return inventoryDetailMapper.selectBysql(sql); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -375,6 +375,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
375 | 375 | * 自动生成容器编码 |
376 | 376 | * @return 容器编码 |
377 | 377 | */ |
378 | + @Transactional | |
378 | 379 | public String createContainer(){ |
379 | 380 | String code = MessageFormat.format("{0}{1}", |
380 | 381 | "LS", |
... | ... | @@ -387,6 +388,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
387 | 388 | container.setCreatedBy(ShiroUtils.getLoginName()); |
388 | 389 | container.setLastUpdated(new Date()); |
389 | 390 | container.setLastUpdatedBy(ShiroUtils.getLoginName()); |
391 | + container.setEnable(true); | |
390 | 392 | container.setStatus("empty"); |
391 | 393 | if (!containerService.save(container)){ |
392 | 394 | throw new ServiceException("新增容器失败"); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/controller/ReceiptDetailController.java
... | ... | @@ -181,7 +181,9 @@ public class ReceiptDetailController extends BaseController { |
181 | 181 | ReceiptDetail newReceiptDetail = receiptDetailService.getById(id); |
182 | 182 | |
183 | 183 | //更新入库明细状态 |
184 | - receiptDetailService.updateById(receiptDetailService.queryflow(newReceiptDetail)); | |
184 | + if (!receiptDetailService.updateById(receiptDetailService.queryflow(newReceiptDetail))){ | |
185 | + throw new ServiceException("更新入库明细失败"); | |
186 | + } | |
185 | 187 | ReceiptHeader receiptHeader = new ReceiptHeader(); |
186 | 188 | receiptHeader.setFirstStatus(approval); |
187 | 189 | receiptHeader.setId(newReceiptDetail.getReceiptId()); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
... | ... | @@ -104,13 +104,18 @@ public class ReceiptHeaderService extends ServiceImpl<ReceiptHeaderMapper, Recei |
104 | 104 | */ |
105 | 105 | public AjaxResult reservation(ReceiptHeader receiptHeader) { |
106 | 106 | LambdaQueryWrapper<ReceiptDetail> receiptDetailLambda = Wrappers.lambdaQuery(); |
107 | - receiptDetailLambda.eq(ReceiptDetail::getReceiptId, receiptHeader.getId()) | |
108 | - .eq(ReceiptDetail::getProcessStamp, "120"); | |
107 | + receiptDetailLambda.eq(ReceiptDetail::getReceiptId, receiptHeader.getId()); | |
109 | 108 | List<ReceiptDetail> receiptDetails = receiptDetailService.list(receiptDetailLambda); |
110 | 109 | //更新入库明细流程 |
111 | 110 | for (ReceiptDetail receiptDetail : receiptDetails) { |
112 | - receiptDetail = receiptDetailService.queryflow(receiptDetail); | |
113 | - receiptDetailService.updateById(receiptDetail); | |
111 | + receiptDetail.setProcessStamp("120"); | |
112 | + if (!receiptDetailService.updateById(receiptDetail)){ | |
113 | + throw new ServiceException("更新入库明细处理标记失败"); | |
114 | + } | |
115 | + receiptDetail = receiptDetailService.queryflow(receiptDetail); | |
116 | + if (!receiptDetailService.updateById(receiptDetail)){ | |
117 | + throw new ServiceException("更新入库明细流程失败"); | |
118 | + } | |
114 | 119 | } |
115 | 120 | receiptHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); |
116 | 121 | //更新入库单预约时间 |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -425,11 +425,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
425 | 425 | @Transactional |
426 | 426 | public void completeTask(TaskHeader task) { |
427 | 427 | //区分任务类型 |
428 | - if (task.getTaskType() == 100) { | |
428 | + if (task.getInternalTaskType() == 100) { | |
429 | 429 | //入库任务 |
430 | 430 | completeReceiptTask(task); |
431 | 431 | } |
432 | - if (task.getTaskType() == 200) { | |
432 | + if (task.getInternalTaskType() == 200) { | |
433 | 433 | // 出库任务 |
434 | 434 | completeShipmentTask(task); |
435 | 435 | } |
... | ... | @@ -598,6 +598,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
598 | 598 | if (! receiptContainerDetailService.update(receiptContainerDetail, receiptContainerDetailLambdaUpdateWrapper)) |
599 | 599 | throw new ServiceException("更新组盘状态失败"); |
600 | 600 | |
601 | + | |
602 | + //修改入库组盘头表状态 | |
603 | + | |
604 | + ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader(); | |
605 | + receiptContainerHeader.setId(task.getAllocationHeadId()); | |
606 | + receiptContainerHeader.setLastUpdated(new Date()); | |
607 | + receiptContainerHeader.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
608 | + receiptContainerHeader.setStatus((short) 20); | |
609 | + if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){ | |
610 | + throw new ServiceException("更新入库组盘头表状态失败"); | |
611 | + } | |
612 | + | |
601 | 613 | //修改入库单状态 |
602 | 614 | ReceiptHeader receiptHeader = new ReceiptHeader(); |
603 | 615 | receiptHeader.setFirstStatus(800); |
... | ... | @@ -606,17 +618,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
606 | 618 | receiptHeader.setLastUpdated(new Date()); |
607 | 619 | LambdaUpdateWrapper<ReceiptHeader> receiptHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
608 | 620 | receiptHeaderLambdaUpdateWrapper.eq(ReceiptHeader::getId,DataUtils.getInteger(map.get("receiptId"))); |
609 | - if (! receiptHeaderService.update(receiptHeader, receiptHeaderLambdaUpdateWrapper)) | |
610 | - throw new ServiceException("更新入库状态失败"); | |
611 | -// if (task.getInternalTaskType()==100){ | |
612 | -// //修改入库明细 | |
613 | -// ReceiptDetail receiptDetail = receiptDetailService.queryflow(receiptDetailService.getById(DataUtils.getInteger(map.get("receiptDetailId")))); | |
614 | -// if (!receiptDetailService.updateById(receiptDetail)){ | |
615 | -// throw new ServiceException("更新状态失败"); | |
616 | -// } | |
617 | -// receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
618 | -// } | |
619 | - | |
621 | + if (!receiptHeaderService.update(receiptHeader, receiptHeaderLambdaUpdateWrapper)) | |
622 | + throw new ServiceException("更新入库头表状态失败"); | |
620 | 623 | |
621 | 624 | } |
622 | 625 | |
... | ... |
src/main/resources/mybatis/config/MaterialMapper.xml
... | ... | @@ -50,4 +50,7 @@ |
50 | 50 | lastUpdatedBy, version, userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, |
51 | 51 | userDef7, userDef8 |
52 | 52 | </sql> |
53 | + <select id="findAllByCode" resultMap="BaseResultMap" parameterType="java.lang.String"> | |
54 | + select * from material where code = #{code,jdbcType=VARCHAR} | |
55 | + </select> | |
53 | 56 | </mapper> |
54 | 57 | \ No newline at end of file |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
... | ... | @@ -81,7 +81,7 @@ |
81 | 81 | var removeFlag = [[${@permission.hasPermi('receipt:receiptContainer:remove')}]]; |
82 | 82 | var prefix = ctx + "receipt/receiptContainerHeader"; |
83 | 83 | var detailPrefix = ctx + "receipt/receiptContainerDetail"; |
84 | - var receiptTaskType=[[${@dict.getType('receiptTaskType')}]]; | |
84 | + var taskType=[[${@dict.getType('taskType')}]]; | |
85 | 85 | // var taskStatus=[[${@dict.getType('taskStatus')}]]; //任务状态 |
86 | 86 | var receiptContainerHeaderStatus = [[${@dict.getType('receiptContainerHeaderStatus')}]] //容器状态 |
87 | 87 | var S_headerId; |
... | ... | @@ -118,7 +118,7 @@ |
118 | 118 | title : '任务类型', |
119 | 119 | align: 'center', |
120 | 120 | formatter: function(value, row, index) { |
121 | - return $.table.selectDictLabel(receiptTaskType, value); | |
121 | + return $.table.selectDictLabel(taskType, value); | |
122 | 122 | },sortable:true |
123 | 123 | }, |
124 | 124 | { |
... | ... |
src/main/resources/templates/receipt/receiving/add.html
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | <div class="form-group"> |
71 | 71 | <label class="col-sm-3 control-label">定位规则:</label> |
72 | 72 | <div class="col-sm-8"> |
73 | - <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('入库')}"> | |
73 | + <select id="locatingRule" name="locatingRule" class="form-control" th:with="list=${@FilterConfigDetailService.queryFilterConfigDetail('locationRule')}"> | |
74 | 74 | <option value="">请选择</option> |
75 | 75 | <option th:each="item : ${list}" th:text="${item['description']}" th:value="${item['code']}"></option> |
76 | 76 | </select> |
... | ... |
src/main/resources/templates/receipt/receiving/receiving.html
... | ... | @@ -145,7 +145,6 @@ |
145 | 145 | receiptDetailId:value.data[i].receiptDetailId, |
146 | 146 | containerCode: value.data[i].containerCode, |
147 | 147 | locationCode: value.data[i].locationCode, |
148 | - taskType: value.data[i].taskType, | |
149 | 148 | materialCode: value.data[i].materialCode, |
150 | 149 | materialName: value.data[i].materialName, |
151 | 150 | materialSpec: value.data[i].materialSpec, |
... | ... | @@ -312,14 +311,6 @@ |
312 | 311 | title : '数量' |
313 | 312 | }, |
314 | 313 | { |
315 | - field : 'taskType', | |
316 | - title : '任务类型', | |
317 | - align: 'center', | |
318 | - formatter: function(value, row, index) { | |
319 | - return $.table.selectDictLabel(Types, value); | |
320 | - } | |
321 | - }, | |
322 | - { | |
323 | 314 | field : 'project', |
324 | 315 | title : '项目号' |
325 | 316 | }, |
... | ... |