Commit 43d62c8cf8f6dd7a4fb4dd4bae73c2d378ecc29d
1 parent
42f8ecfe
优化erp同步成品入库
Showing
3 changed files
with
21 additions
and
13 deletions
src/main/java/com/huaheng/api/general/controller/BasicDataApiController.java
... | ... | @@ -36,6 +36,7 @@ import com.huaheng.pc.system.user.domain.User; |
36 | 36 | import io.swagger.annotations.Api; |
37 | 37 | import io.swagger.annotations.ApiOperation; |
38 | 38 | import org.springframework.beans.factory.annotation.Autowired; |
39 | +import org.springframework.transaction.annotation.Transactional; | |
39 | 40 | import org.springframework.web.bind.annotation.*; |
40 | 41 | |
41 | 42 | import javax.annotation.Resource; |
... | ... |
src/main/java/com/huaheng/api/general/service/BarCodeApiService.java
... | ... | @@ -7,6 +7,7 @@ import com.huaheng.api.general.domain.BarCodeDomain; |
7 | 7 | import com.huaheng.api.wcs.service.taskInfo.TaskInfoService; |
8 | 8 | import com.huaheng.common.constant.QuantityConstant; |
9 | 9 | import com.huaheng.common.exception.service.ServiceException; |
10 | +import com.huaheng.common.utils.spring.SpringUtils; | |
10 | 11 | import com.huaheng.framework.web.domain.AjaxResult; |
11 | 12 | import com.huaheng.pc.barcode.barcodeDetail.domain.BarCodeDetail; |
12 | 13 | import com.huaheng.pc.barcode.barcodeDetail.service.BarCodeDetailService; |
... | ... | @@ -95,7 +96,7 @@ public class BarCodeApiService { |
95 | 96 | |
96 | 97 | |
97 | 98 | |
98 | - | |
99 | + @Transactional(rollbackFor = Exception.class) | |
99 | 100 | public AjaxResult addBarCodeApi(BarCodeDomain barCodeDomain){ |
100 | 101 | AjaxResult ajaxResult = checkBarCode(barCodeDomain); |
101 | 102 | if(ajaxResult.getCode()!=200){ |
... | ... | @@ -129,6 +130,9 @@ public class BarCodeApiService { |
129 | 130 | LambdaQueryWrapper<Material> materialLambdaQueryWrapper = Wrappers.lambdaQuery(); |
130 | 131 | materialLambdaQueryWrapper.eq(Material::getCode,barCodeDetail.getMaterialCode()); |
131 | 132 | Material materialServiceOne = materialService.getOne(materialLambdaQueryWrapper); |
133 | + if(StringUtils.isNotEmpty(materialServiceOne.getName())){ | |
134 | + return AjaxResult.error("物料信息不一致"); | |
135 | + } | |
132 | 136 | String materialName = materialServiceOne.getName(); |
133 | 137 | barCodeDetail.setMaterialName(materialName); |
134 | 138 | } |
... | ... |
src/main/resources/templates/shipment/shipmentDetail/add.html
... | ... | @@ -42,6 +42,18 @@ |
42 | 42 | <!-- </div>--> |
43 | 43 | <!-- </div>--> |
44 | 44 | <div class="form-group"> |
45 | + <label class="col-sm-3 control-label">订单号 :</label> | |
46 | + <div class="col-sm-8"> | |
47 | + <input id="orderNo" name="orderNo" class="form-control" type="text"> | |
48 | + </div> | |
49 | + </div> | |
50 | + <div class="form-group"> | |
51 | + <label class="col-sm-3 control-label">电池包编码:</label> | |
52 | + <div class="col-sm-8"> | |
53 | + <input id="batteryPageCode" name="batteryPageCode" class="form-control" type="text"> | |
54 | + </div> | |
55 | + </div> | |
56 | + <div class="form-group"> | |
45 | 57 | <label class="col-sm-3 control-label">磅单编码:</label> |
46 | 58 | <div class="col-sm-8"> |
47 | 59 | <input id="poundNumber" name="poundNumber" class="form-control" type="text" th:value="${poundNumber}" readonly="readonly"> |
... | ... | @@ -65,6 +77,7 @@ |
65 | 77 | <input id="netWeight" name="netWeight" class="form-control" th:value="${netWeight}" type="text" readonly="readonly"> |
66 | 78 | </div> |
67 | 79 | </div> |
80 | + | |
68 | 81 | <div class="form-group"> |
69 | 82 | <label class="col-sm-3 control-label">库存状态:</label> |
70 | 83 | <div class="col-sm-8"> |
... | ... | @@ -86,12 +99,7 @@ |
86 | 99 | <!-- <input id="electricQuantity" name="electricQuantity" class="form-control" type="text">--> |
87 | 100 | <!-- </div>--> |
88 | 101 | <!-- </div>--> |
89 | - <div class="form-group"> | |
90 | - <label class="col-sm-3 control-label">订单号 :</label> | |
91 | - <div class="col-sm-8"> | |
92 | - <input id="orderNo" name="orderNo" class="form-control" type="text"> | |
93 | - </div> | |
94 | - </div> | |
102 | + | |
95 | 103 | <div class="form-group"> |
96 | 104 | <label class="col-sm-3 control-label">出库口:</label> |
97 | 105 | <div class="col-sm-8"> |
... | ... | @@ -238,12 +246,7 @@ |
238 | 246 | <input id="batteryQty" name="batteryQty" class="form-control" type="text"> |
239 | 247 | </div> |
240 | 248 | </div> |
241 | - <div class="form-group"> | |
242 | - <label class="col-sm-3 control-label">电池包编码:</label> | |
243 | - <div class="col-sm-8"> | |
244 | - <input id="batteryPageCode" name="batteryPageCode" class="form-control" type="text"> | |
245 | - </div> | |
246 | - </div> | |
249 | + | |
247 | 250 | |
248 | 251 | |
249 | 252 | <div class="form-group"> |
... | ... |