Commit 17dd00cc42322b382e3dface1b40d7eb87a7e8e1

Authored by pengcheng
2 parents 165752f9 9ebc847a

Merge remote-tracking branch 'origin/develop' into develop

Showing 24 changed files with 302 additions and 118 deletions
src/main/java/com/huaheng/pc/check/checkingRegister/controller/CheckingRegisterController.java
... ... @@ -130,10 +130,12 @@ public class CheckingRegisterController extends BaseController {
130 130 IPage<CheckingRegister> iPage = checkingRegisterService.page(page, lambdaQueryWrapper);
131 131 if (isDetailNull){
132 132 if (iPage.getTotal() == 0){
  133 + //空list
133 134 List emptyList = checkingRegisterService.emptyList(checkingRegister.getCheckDetailId());
134 135 return getMpDataTable(emptyList, Long.valueOf(emptyList.size()));
135 136 }
136 137 if (!"20".equals(checkDetail.getStatus())){
  138 + //未完成质检list
137 139 List notCompleteList = checkingRegisterService.notCompleteList(checkingRegister.getCheckDetailId());
138 140 return getMpDataTable(notCompleteList, Long.valueOf(notCompleteList.size()));
139 141 }
... ... @@ -143,10 +145,12 @@ public class CheckingRegisterController extends BaseController {
143 145 List<CheckingRegister> list = checkingRegisterService.list(lambdaQueryWrapper);
144 146 if (isDetailNull){
145 147 if (list.size() == 0){
  148 + //空list
146 149 List emptyList = checkingRegisterService.emptyList(checkingRegister.getCheckDetailId());
147 150 return getMpDataTable(emptyList, Long.valueOf(emptyList.size()));
148 151 }
149 152 if (!"20".equals(checkDetail.getStatus())){
  153 + //未完成质检list
150 154 List notCompleteList = checkingRegisterService.notCompleteList(checkingRegister.getCheckDetailId());
151 155 return getMpDataTable(notCompleteList, Long.valueOf(notCompleteList.size()));
152 156 }
... ...
src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java
... ... @@ -65,9 +65,11 @@ public class cycleCountPreferenceController extends BaseController {
65 65 .le(StringUtils.isNotEmpty(createdEnd), CycleCountPreference::getCreated, createdEnd)//创建时间范围
66 66 .eq(CycleCountPreference::getWarehouseCode, ShiroUtils.getWarehouseCode()) //仓库
67 67 .eq(StringUtils.isNotEmpty(cycleCountPreference.getCode()), CycleCountPreference::getCode, cycleCountPreference.getCode())//首选项编码
68   - .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLocation()),CycleCountPreference::getPromptLocation,cycleCountPreference.getPromptLocation())//提示货位
  68 +
  69 + /*.eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLocation()),CycleCountPreference::getPromptLocation,cycleCountPreference.getPromptLocation())//提示货位
69 70 .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptLpn()),CycleCountPreference::getPromptLpn,cycleCountPreference.getPromptLpn())//提示PLN
70 71 .eq(StringUtils.isNotEmpty(cycleCountPreference.getPromptItem()),CycleCountPreference::getPromptItem,cycleCountPreference.getPromptItem())//提示物料
  72 + */
71 73 .eq(StringUtils.isNotEmpty(cycleCountPreference.getLastUpdatedBy()),CycleCountPreference::getLastUpdatedBy,cycleCountPreference.getLastUpdatedBy())//更新人
72 74 .eq(StringUtils.isNotEmpty(cycleCountPreference.getCreatedBy()),CycleCountPreference::getCreatedBy,cycleCountPreference.getCreatedBy())//创建人
73 75  
... ...
src/main/java/com/huaheng/pc/config/cycleCountPreference/domain/CycleCountPreference.java
... ... @@ -48,35 +48,35 @@ public class CycleCountPreference implements Serializable {
48 48 */
49 49 @TableField(value = "promptLocation")
50 50 @ApiModelProperty(value="系统提示货位")
51   - private String promptLocation;
  51 + private Boolean promptLocation;
52 52  
53 53 /**
54   - * 系统提示LPN
  54 + * 系统提示容器
55 55 */
56 56 @TableField(value = "promptLpn")
57   - @ApiModelProperty(value="系统提示LPN")
58   - private String promptLpn;
  57 + @ApiModelProperty(value="系统提示容器")
  58 + private Boolean promptLpn;
59 59  
60 60 /**
61 61 * 系统提示物料
62 62 */
63 63 @TableField(value = "promptItem")
64 64 @ApiModelProperty(value="系统提示物料")
65   - private String promptItem;
  65 + private Boolean promptItem;
66 66  
67 67 /**
68 68 * 显示库存数量
69 69 */
70 70 @TableField(value = "promptQuantity")
71 71 @ApiModelProperty(value="显示库存数量")
72   - private Integer promptQuantity;
  72 + private Boolean promptQuantity;
73 73  
74 74 /**
75 75 * 允许添加库存
76 76 */
77 77 @TableField(value = "allowAddNewInventory")
78 78 @ApiModelProperty(value="允许添加库存")
79   - private Integer allowAddNewInventory;
  79 + private Boolean allowAddNewInventory;
80 80  
81 81 /**
82 82 * 有效
... ... @@ -153,7 +153,7 @@ public class CycleCountPreference implements Serializable {
153 153 */
154 154 @TableField(value = "countByPiece")
155 155 @ApiModelProperty(value="RF逐件盘点")
156   - private Integer countByPiece;
  156 + private Boolean countByPiece;
157 157  
158 158 private static final long serialVersionUID = 1L;
159 159 }
160 160 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/station/domain/Station.java 0 → 100644
  1 +package com.huaheng.pc.config.station.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import io.swagger.annotations.ApiModel;
  8 +import io.swagger.annotations.ApiModelProperty;
  9 +import java.io.Serializable;
  10 +import java.util.Date;
  11 +import lombok.Data;
  12 +
  13 +/**
  14 + * Created by Enzo Cotter on 2019/10/11.
  15 + */
  16 +
  17 +@ApiModel(value="com.huaheng.pc.config.station.domain.Station")
  18 +@Data
  19 +@TableName(value = "station")
  20 +public class Station implements Serializable {
  21 + @TableId(value = "id", type = IdType.INPUT)
  22 + @ApiModelProperty(value="null")
  23 + private Integer id;
  24 +
  25 + /**
  26 + * 编码
  27 + */
  28 + @TableField(value = "code")
  29 + @ApiModelProperty(value="编码")
  30 + private String code;
  31 +
  32 + /**
  33 + * 状态
  34 + */
  35 + @TableField(value = "status")
  36 + @ApiModelProperty(value="状态")
  37 + private Integer status;
  38 +
  39 + /**
  40 + * 仓库编码
  41 + */
  42 + @TableField(value = "warehouseCode")
  43 + @ApiModelProperty(value="仓库编码")
  44 + private String warehouseCode;
  45 +
  46 + /**
  47 + * 创建时间
  48 + */
  49 + @TableField(value = "created")
  50 + @ApiModelProperty(value="创建时间")
  51 + private Date created;
  52 +
  53 + /**
  54 + * 创建者
  55 + */
  56 + @TableField(value = "createdBy")
  57 + @ApiModelProperty(value="创建者")
  58 + private String createdBy;
  59 +
  60 + /**
  61 + * 更新时间
  62 + */
  63 + @TableField(value = "lastUpdated")
  64 + @ApiModelProperty(value="更新时间")
  65 + private Date lastUpdated;
  66 +
  67 + /**
  68 + * 更新者
  69 + */
  70 + @TableField(value = "lastUpdatedBy")
  71 + @ApiModelProperty(value="更新者")
  72 + private String lastUpdatedBy;
  73 +
  74 + private static final long serialVersionUID = 1L;
  75 +}
0 76 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/station/mapper/StationMapper.java 0 → 100644
  1 +package com.huaheng.pc.config.station.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.huaheng.pc.config.station.domain.Station;
  5 +
  6 +/**
  7 + * Created by Enzo Cotter on 2019/10/11.
  8 + */
  9 +
  10 +public interface StationMapper extends BaseMapper<Station> {
  11 +}
0 12 \ No newline at end of file
... ...
src/main/java/com/huaheng/pc/config/station/service/StationService.java 0 → 100644
  1 +package com.huaheng.pc.config.station.service;
  2 +
  3 +import org.springframework.stereotype.Service;
  4 +import javax.annotation.Resource;
  5 +import java.util.List;
  6 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  7 +import com.huaheng.pc.config.station.domain.Station;
  8 +import com.huaheng.pc.config.station.mapper.StationMapper;
  9 +/**
  10 + * Created by Enzo Cotter on 2019/10/11.
  11 + */
  12 +
  13 +@Service
  14 +public class StationService extends ServiceImpl<StationMapper, Station> {
  15 +
  16 +}
... ...
src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
... ... @@ -165,6 +165,10 @@ public class adjustDetailController extends BaseController {
165 165 if(StringUtils.isEmpty(adjustDetailEdit.getAgreeBy()) || adjustDetailEdit.getStatus() < 1 ){
166 166 return AjaxResult.error("单据未审批不允许调整");
167 167 }
  168 + //不能重复调整
  169 + if(adjustDetailEdit.getStatus() >= 3){
  170 + return AjaxResult.error("不能重复调整!");
  171 + }
168 172 adjustDetailService.updateAdjustDetail(adjustDetailEdit);
169 173 }
170 174 return AjaxResult.success("调整下发成功!");
... ...
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java
... ... @@ -45,6 +45,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
45 45 @Resource
46 46 private CycleCountDetailService cycleCountDetailService;
47 47 @Resource
  48 + private AdjustHeaderService adjustHeaderService;
  49 + @Resource
48 50 private MaterialService materialService;
49 51 @Resource
50 52 private CheckDetailService checkDetailService;
... ... @@ -72,10 +74,14 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
72 74 @Transactional
73 75 @Override
74 76 public AjaxResult addDetails(AdjustDetail adjustDetail) {
75   - //数据直接插入表里
76   - //查询主单据
77   -
78 77  
  78 + //查询主单据
  79 + AdjustHeader adjustHeader = new AdjustHeader();
  80 + adjustHeader.setCode(adjustDetail.getAdjustCode());
  81 + adjustHeader.setWarehouseCode(adjustDetail.getWarehouseCode());
  82 + adjustHeader.setCompanyCode(adjustDetail.getCompanyCode());
  83 + LambdaQueryWrapper<AdjustHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(adjustHeader);
  84 + adjustHeader = adjustHeaderService.getOne(lambdaQueryWrapper);
79 85 //检查库存
80 86 if((adjustDetail.getInventoryDetailId()) != null){
81 87 InventoryDetail inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId());
... ... @@ -103,17 +109,16 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
103 109 if(!material.getName().equals(adjustDetail.getMaterialName())){
104 110 return AjaxResult.error("物料名称错误!");
105 111 }
106   -
107 112 }else{
108 113 return AjaxResult.error("物料编码错误!");
109 114 }
  115 + adjustDetail.setProblemType(adjustHeader.getProblemType());//调整类型
110 116 adjustDetail.setMaterialUnit(material.getUnit());
111 117 adjustDetail.setMaterialSpec(material.getSpec());
112 118 adjustDetail.setCreated(new Date());
113 119 adjustDetail.setCreatedBy(ShiroUtils.getLoginName());
114 120 adjustDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
115 121 adjustDetail.setLastUpdated(new Date());
116   -
117 122 this.saveOrUpdate(adjustDetail);
118 123  
119 124 return AjaxResult.success("新增调整明细成功!");
... ... @@ -157,7 +162,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
157 162 AjaxResult.error("该单据已调整,不允许再次调整!" );
158 163 }
159 164 //查询调整的库存明细
160   - InventoryDetail inventoryDetail ;
  165 + InventoryDetail inventoryDetail;
161 166 //调整单中不带库存明细时不查询
162 167 if(adjustDetail.getInventoryDetailId() != null) {
163 168 inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId());
... ... @@ -166,23 +171,16 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
166 171 return AjaxResult.error("调整单和所调整库存的库位容器不符,前检查数据");
167 172 }
168 173 //验证该条库存是不是正在使用,验证库存明细
169   - /*Location location = new Location();
  174 + Location location = new Location();
170 175 location.setCode(inventoryDetail.getLocationCode());
171 176 location.setWarehouseCode(inventoryDetail.getWarehouseCode());
172 177 LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(location);
173 178 location = locationService.getOne(lambdaQueryWrapper);
174 179 if (!location.getStatus().equals("empty")) {
175 180 return AjaxResult.error (inventoryDetail.getId() + "库存非空闲,请等待其他任务完成再进行调整!");
176   - }*/
177   -
178   - //判断调整哪一个属性值
179   - /*以下方法有待验证讨论,BigDecimal传入null,如何避免传入0?*/
180   -
181   - //把BigDecimal类型转换成String再判断null
182   -
183   - String toQtyString = adjustDetail.getToQty().toString(); //调整后库存
184   - String gapQtyString = adjustDetail.getGapQty().toString(); //调整变动数量
185   - if (StringUtils.isNotEmpty(toQtyString) || StringUtils.isNotEmpty(gapQtyString)) {
  181 + }
  182 + //判断调整库存状态还是数量
  183 + if (adjustDetail.getToQty() != null || adjustDetail.getGapQty() != null) {
186 184 //调整数量
187 185 updateAdjustDetailNumber(adjustDetail, inventoryDetail);
188 186 }
... ... @@ -240,9 +238,10 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
240 238 inventoryDetail.setQty(adjustDetail.getToQty());//调整后的数量
241 239 inventoryDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
242 240 inventoryDetail.setLastUpdated(new Date());
243   - inventoryDetailService.saveOrUpdate(inventoryDetail);
244   -
245   - }
  241 + Boolean j = inventoryDetailService.saveOrUpdate(inventoryDetail);
  242 + if(j == false){
  243 + throw new SecurityException("调整修改库存失败!");
  244 + } }
246 245 //写入库存交易记录
247 246 InventoryTransaction inventoryTransaction = new InventoryTransaction();
248 247 inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode());
... ... @@ -256,8 +255,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
256 255 inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit());
257 256 inventoryTransaction.setTaskQty(adjustDetail.getGapQty());
258 257 inventoryTransaction.setInventorySts(inventoryDetail.getInventorySts());
259   - inventoryTransaction.setReferCode(inventoryDetail.getReferCode());
260   - inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId());
  258 + inventoryTransaction.setReferCode(adjustDetail.getAdjustCode());
  259 + inventoryTransaction.setReferDetailId(adjustDetail.getId().toString());
261 260 inventoryTransaction.setBatch(inventoryDetail.getBatch());
262 261 inventoryTransaction.setLot(inventoryDetail.getLot());
263 262 inventoryTransaction.setProjectNo(inventoryDetail.getProjectNo());
... ... @@ -281,8 +280,10 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
281 280 // inventoryTransaction.setBillCode();
282 281 inventoryTransaction.setBillDetailId(inventoryDetail.getReceiptDetailId());
283 282 inventoryTransaction.setSupplierCode(inventoryDetail.getSupplierCode());
284   - inventoryTransactionService.saveOrUpdate(inventoryTransaction);
285   -
  283 + Boolean k = inventoryTransactionService.saveOrUpdate(inventoryTransaction);
  284 + if(k == false){
  285 + throw new SecurityException("调整单库存交易生成失败!");
  286 + }
286 287 }
287 288  
288 289 /**
... ... @@ -295,11 +296,12 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
295 296  
296 297 //修改库存的状态
297 298 inventoryDetail.setInventorySts(adjustDetail.getToInventorySts());//修改为调整库存
  299 + inventoryDetail.setExpirationDate(adjustDetail.getExpirationDate());
298 300 inventoryDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
299 301 inventoryDetail.setLastUpdated(new Date());
300 302 inventoryDetailService.saveOrUpdate(inventoryDetail);
301 303  
302   - //写入库存交易,库存交易2条一条出,一条入
  304 + //写入库存交易,2条一条出,一条入
303 305 //调整出
304 306 InventoryTransaction inventoryTransaction = new InventoryTransaction();
305 307 inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode());
... ... @@ -313,8 +315,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
313 315 inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit());
314 316 inventoryTransaction.setTaskQty(BigDecimal.ZERO);//数量不变
315 317 inventoryTransaction.setInventorySts(adjustDetail.getFromInventorySts());//状态
316   - inventoryTransaction.setReferCode(inventoryDetail.getReferCode());
317   - inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId());
  318 + inventoryTransaction.setReferCode(adjustDetail.getAdjustCode());
  319 + inventoryTransaction.setReferDetailId(adjustDetail.getId().toString());
318 320 inventoryTransaction.setBatch(inventoryDetail.getBatch());
319 321 inventoryTransaction.setLot(inventoryDetail.getLot());
320 322 inventoryTransaction.setProjectNo(inventoryDetail.getProjectNo());
... ... @@ -346,8 +348,8 @@ public class AdjustDetailServiceImpl extends ServiceImpl&lt;AdjustDetailMapper, Adj
346 348 inventoryTransaction2.setMaterialUnit(inventoryDetail.getMaterialUnit());
347 349 inventoryTransaction2.setTaskQty(BigDecimal.ZERO);//数量不变
348 350 inventoryTransaction2.setInventorySts(inventoryDetail.getInventorySts());//状态
349   - inventoryTransaction2.setReferCode(inventoryDetail.getReferCode());
350   - inventoryTransaction2.setReferDetailId(inventoryDetail.getReferDetailId());
  351 + inventoryTransaction.setReferCode(adjustDetail.getAdjustCode());
  352 + inventoryTransaction.setReferDetailId(adjustDetail.getId().toString());
351 353 inventoryTransaction2.setBatch(inventoryDetail.getBatch());
352 354 inventoryTransaction2.setLot(inventoryDetail.getLot());
353 355 inventoryTransaction2.setProjectNo(inventoryDetail.getProjectNo());
... ...
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... ... @@ -289,6 +289,10 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
289 289 lambdaDetails.eq(ReceiptDetail::getReceiptId, id);
290 290 List<ReceiptDetail> receiptDetails = this.list(lambdaDetails);
291 291  
  292 + // 判断入库明细是否为空
  293 + if (receiptDetails.isEmpty()){
  294 + throw new ServiceException("不存在入库明细");
  295 + }
292 296 //查询出头表信息
293 297 ReceiptHeader receiptHeader = receiptHeaderService.getById(id);
294 298 Integer minStatus = Integer.parseInt(receiptDetails.get(0).getProcessStamp());
... ... @@ -362,7 +366,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
362 366 //如果明细中需要质检,则判断是否已经生成质检单
363 367 if ("0".equals(receiptDetail.getQcCheck())){
364 368 LambdaQueryWrapper<CheckHeader> lambda = Wrappers.lambdaQuery();
365   - lambda.eq(CheckHeader::getReferCode, receiptDetail.getReceiptCode());
  369 + lambda.eq(CheckHeader::getCode, receiptDetail.getReceiptCode());
366 370 CheckHeader checkHeader = checkHeaderService.getOne(lambda);
367 371 if (checkHeader == null){
368 372 return true;
... ...
src/main/java/com/huaheng/pc/receipt/receiptHeader/service/ReceiptHeaderService.java
... ... @@ -24,6 +24,7 @@ import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailServiceImpl;
24 24 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
25 25 import com.huaheng.pc.receipt.receiptHeader.mapper.ReceiptHeaderMapper;
26 26 import org.springframework.stereotype.Service;
  27 +import org.springframework.transaction.annotation.Transactional;
27 28  
28 29 import javax.annotation.Resource;
29 30 import java.lang.ref.WeakReference;
... ... @@ -161,10 +162,10 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
161 162  
162 163 //判断是否已经生成了质检单
163 164 LambdaQueryWrapper<CheckHeader> checkHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
164   - checkHeaderLambdaQueryWrapper.eq(CheckHeader::getReferCode, receiptHeader.getCode());
  165 + checkHeaderLambdaQueryWrapper.eq(CheckHeader::getCode, receiptHeader.getCode());
165 166 CheckHeader checkHeaderQuery = checkHeaderService.getOne(checkHeaderLambdaQueryWrapper);
166 167 if (checkHeaderQuery != null){
167   - throw new ServiceException("质检已生成");
  168 + throw new ServiceException("质检已生成");
168 169 }
169 170 //创建质检头表
170 171 CheckHeader checkHeader = new CheckHeader();
... ... @@ -260,6 +261,7 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
260 261 * @param ids 头表id字符串
261 262 * @return
262 263 */
  264 + @Transactional
263 265 public AjaxResult addPool(String ids){
264 266 List<Integer> idList = Arrays.asList(Convert.toIntArray(ids));
265 267 for (Integer id : idList){
... ... @@ -269,6 +271,12 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
269 271 if (list.size() != 0){
270 272 for (ReceiptDetail receiptDetail : list){
271 273 if (Integer.parseInt(receiptDetail.getProcessStamp()) < 100){
  274 + //判断入库明细是否需要审核
  275 + ReceiptDetail beforeReceiptDetail = receiptDetailService.queryflow(receiptDetail);
  276 + if (Integer.parseInt(beforeReceiptDetail.getProcessStamp()) == 5 || Integer.parseInt(beforeReceiptDetail.getProcessStamp()) == 100){
  277 + throw new ServiceException("请先提交审核");
  278 + }
  279 + //加入订单池
272 280 receiptDetail.setProcessStamp("100");
273 281 ReceiptDetail receiptDetail1 = receiptDetailService.queryflow(receiptDetail);
274 282 if (!receiptDetailService.updateById(receiptDetail1)){
... ... @@ -282,6 +290,6 @@ public class ReceiptHeaderService extends ServiceImpl&lt;ReceiptHeaderMapper, Recei
282 290 //更新头表状态
283 291 receiptDetailService.updateReceiptHeaderLastStatus(id);
284 292 }
285   - return AjaxResult.success("");
  293 + return AjaxResult.success("加入成功");
286 294 }
287 295 }
... ...
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... ... @@ -112,7 +112,7 @@ public class ReceivingService {
112 112 //物料类别中定位规则为空时,查询入库首选项
113 113 LambdaQueryWrapper<ConfigValue> configValueLambda = Wrappers.lambdaQuery();
114 114 configValueLambda.eq(ConfigValue::getWarehouseCode, ShiroUtils.getWarehouseCode())
115   - .eq(ConfigValue::getModuleType, "入库")
  115 + .eq(ConfigValue::getModuleType, "receipt")
116 116 .eq(ConfigValue::getRecordType, "入库首选项");
117 117 ConfigValue configValue = configValueService.getOne(configValueLambda);
118 118 LambdaQueryWrapper<ReceiptPreference> lambdaQueryWrapper = Wrappers.lambdaQuery();
... ...
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... ... @@ -152,7 +152,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
152 152 ReceiptContainerHeader record =new ReceiptContainerHeader();
153 153 record.setStatus((short)0);
154 154 record.setId(taskHeader.getAllocationHeadId());
155   - if (receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");}
  155 + if (!receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");}
156 156 }
157 157 //根据任务类型来更新货箱状态
158 158 //修改关联的货箱状态
... ... @@ -1179,8 +1179,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1179 1179 if (!receiptDetailService.updateById(detail)){
1180 1180 throw new ServiceException("更新入库单详情失败");
1181 1181 }
1182   - //更新头表状态
1183   - receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId());
1184 1182 }
1185 1183 }
1186 1184 } else {
... ...
src/main/resources/mybatis/config/CycleCountPreferenceMapper.xml
... ... @@ -7,11 +7,11 @@
7 7 <result column="code" jdbcType="VARCHAR" property="code" />
8 8 <result column="name" jdbcType="VARCHAR" property="name" />
9 9 <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
10   - <result column="promptLocation" jdbcType="VARCHAR" property="promptLocation" />
11   - <result column="promptLpn" jdbcType="VARCHAR" property="promptLpn" />
12   - <result column="promptItem" jdbcType="VARCHAR" property="promptItem" />
13   - <result column="promptQuantity" jdbcType="INTEGER" property="promptQuantity" />
14   - <result column="allowAddNewInventory" jdbcType="INTEGER" property="allowAddNewInventory" />
  10 + <result column="promptLocation" jdbcType="BOOLEAN" property="promptLocation" />
  11 + <result column="promptLpn" jdbcType="BOOLEAN" property="promptLpn" />
  12 + <result column="promptItem" jdbcType="BOOLEAN" property="promptItem" />
  13 + <result column="promptQuantity" jdbcType="BOOLEAN" property="promptQuantity" />
  14 + <result column="allowAddNewInventory" jdbcType="BOOLEAN" property="allowAddNewInventory" />
15 15 <result column="Enable" jdbcType="BOOLEAN" property="enable" />
16 16 <result column="created" jdbcType="TIMESTAMP" property="created" />
17 17 <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
... ... @@ -22,7 +22,7 @@
22 22 <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
23 23 <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
24 24 <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
25   - <result column="countByPiece" jdbcType="INTEGER" property="countByPiece" />
  25 + <result column="countByPiece" jdbcType="BOOLEAN" property="countByPiece" />
26 26 </resultMap>
27 27 <sql id="Base_Column_List">
28 28 <!--@mbg.generated-->
... ...
src/main/resources/mybatis/config/StationMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="com.huaheng.pc.config.station.mapper.StationMapper">
  4 + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.station.domain.Station">
  5 + <!--@mbg.generated-->
  6 + <!--@Table station-->
  7 + <id column="id" jdbcType="INTEGER" property="id" />
  8 + <result column="code" jdbcType="VARCHAR" property="code" />
  9 + <result column="status" jdbcType="INTEGER" property="status" />
  10 + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
  11 + <result column="created" jdbcType="TIMESTAMP" property="created" />
  12 + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
  13 + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
  14 + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
  15 + </resultMap>
  16 + <sql id="Base_Column_List">
  17 + <!--@mbg.generated-->
  18 + id, code, `status`, warehouseCode, created, createdBy, lastUpdated, lastUpdatedBy
  19 + </sql>
  20 +</mapper>
0 21 \ No newline at end of file
... ...
src/main/resources/templates/check/checkHeader/checkHeader.html
... ... @@ -130,7 +130,7 @@
130 130 var receiptTypes = [[${@receiptTypeService.getType()}]];
131 131 var checkHeaderStatus = [[${@dict.getType('checkHeaderStatus')}]];
132 132 var checkDetailStatus = [[${@dict.getType('checkDetailStatus')}]];
133   - var inventorySts = [[${@dict.getType('inventoryStatus')}]];
  133 + var inventorySts = [[${@dict.getType('inventorySts')}]];
134 134 var printFlag = [[${@permission.hasPermi('check:checkHeader:report')}]];
135 135 var addFlag= [[${@permission.hasPermi('check:checkHeader:add')}]];
136 136 var datas = [[${@dict.getType('sys_normal_disable')}]];
... ...
src/main/resources/templates/config/cycleCountPreference/add.html
... ... @@ -17,54 +17,85 @@
17 17 <input id="name" name="name" class="form-control" type="text">
18 18 </div>
19 19 </div>
  20 +
20 21 <div class="form-group">
21   - <label class="col-sm-3 control-label">系统提示位:</label>
  22 + <label class="col-sm-3 control-label">系统提示位:</label>
22 23 <div class="col-sm-8">
23   - <input id="promptLocation" name="promptLocation" class="form-control" type="text">
  24 + <div class="onoffswitch">
  25 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptLocation" name="promptLocation">
  26 + <label class="onoffswitch-label" for="promptLocation">
  27 + <span class="onoffswitch-inner"></span>
  28 + <span class="onoffswitch-switch"></span>
  29 + </label>
  30 + </div>
24 31 </div>
25 32 </div>
  33 +
26 34 <div class="form-group">
27   - <label class="col-sm-3 control-label">系统提示LPN:</label>
28   - <div class="col-sm-8">
29   - <input id="promptLpn" name="promptLpn" class="form-control" type="text">
30   - </div>
31   - </div>
32   - <!-- <div class="form-group">
33   - <label class="col-sm-3 control-label">允许超收:</label>
  35 + <label class="col-sm-3 control-label">系统提示容器:</label>
34 36 <div class="col-sm-8">
35 37 <div class="onoffswitch">
36   - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowOverReceiving" name="allowOverReceiving">
37   - <label class="onoffswitch-label" for="allowOverReceiving">
  38 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptLpn" name="promptLpn">
  39 + <label class="onoffswitch-label" for="promptLpn">
38 40 <span class="onoffswitch-inner"></span>
39 41 <span class="onoffswitch-switch"></span>
40 42 </label>
41 43 </div>
42   - </div>
43   - </div>-->
  44 + </div>
  45 + </div>
  46 +
44 47 <div class="form-group">
45 48 <label class="col-sm-3 control-label">系统提示物料:</label>
46 49 <div class="col-sm-8">
47   - <input id="promptItem" name="promptItem" class="form-control" type="text">
  50 + <div class="onoffswitch">
  51 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptItem" name="promptItem">
  52 + <label class="onoffswitch-label" for="promptLpn">
  53 + <span class="onoffswitch-inner"></span>
  54 + <span class="onoffswitch-switch"></span>
  55 + </label>
  56 + </div>
48 57 </div>
49 58 </div>
  59 +
50 60 <div class="form-group">
51 61 <label class="col-sm-3 control-label">显示库存数量:</label>
52 62 <div class="col-sm-8">
53   - <input id="promptQuantity" name="promptQuantity" class="form-control" type="text">
  63 + <div class="onoffswitch">
  64 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="promptQuantity" name="promptQuantity">
  65 + <label class="onoffswitch-label" for="promptQuantity">
  66 + <span class="onoffswitch-inner"></span>
  67 + <span class="onoffswitch-switch"></span>
  68 + </label>
  69 + </div>
54 70 </div>
55 71 </div>
56   - <div class="form-group">
  72 +
  73 +<!-- <div class="form-group">
57 74 <label class="col-sm-3 control-label">允许添加库存:</label>
58 75 <div class="col-sm-8">
59   - <input id="allowAddNewInventory" name="allowAddNewInventory" class="form-control" type="text">
  76 + <div class="onoffswitch">
  77 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="allowAddNewInventory" name="allowAddNewInventory">
  78 + <label class="onoffswitch-label" for="allowAddNewInventory">
  79 + <span class="onoffswitch-inner"></span>
  80 + <span class="onoffswitch-switch"></span>
  81 + </label>
  82 + </div>
60 83 </div>
61   - </div>
62   - <div class="form-group">
  84 + </div>-->
  85 +
  86 +<!-- <div class="form-group">
63 87 <label class="col-sm-3 control-label">RF逐件盘点:</label>
64 88 <div class="col-sm-8">
65   - <input id="countByPiece" name="countByPiece" class="form-control" type="text">
  89 + <div class="onoffswitch">
  90 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="countByPiece" name="countByPiece">
  91 + <label class="onoffswitch-label" for="countByPiece">
  92 + <span class="onoffswitch-inner"></span>
  93 + <span class="onoffswitch-switch"></span>
  94 + </label>
  95 + </div>
66 96 </div>
67   - </div>
  97 + </div>-->
  98 +
68 99 <!--<div class="form-group">
69 100 <label class="col-sm-3 control-label">数据版本:</label>
70 101 <div class="col-sm-8">
... ... @@ -98,7 +129,6 @@
98 129 <div class="form-group">
99 130 <label class="col-sm-3 control-label">是否有效:</label>
100 131 <div class="col-sm-8">
101   - <!--<input id="enable" name="enable" class="form-control" type="text">-->
102 132 <div class="onoffswitch">
103 133 <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable">
104 134 <label class="onoffswitch-label" for="enable">
... ...
src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html
... ... @@ -19,7 +19,7 @@
19 19 提示物料:<input type="text" name="promptItem"/>
20 20 </li>
21 21 <li>
22   - 提示LPN:<input type="text" name="promptLpn"/>
  22 + 提示容器:<input type="text" name="promptLpn"/>
23 23 </li>
24 24 <li>
25 25 更新人:<input type="text" name="lastUpdatedBy"/>
... ... @@ -34,8 +34,8 @@
34 34 <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/>
35 35 </li>
36 36 <li>
  37 + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleCountPreference-form')"><i class="fa fa-refresh"></i>&nbsp;清除选择</a>
37 38 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
38   - <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleCountPreference-form')"><i class="fa fa-refresh"></i>&nbsp;重置</a>
39 39 <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i>&nbsp;导出</a>-->
40 40 </li>
41 41 </ul>
... ... @@ -89,11 +89,11 @@
89 89 },
90 90 {
91 91 field : 'promptLocation',
92   - title : '系统提示位',
  92 + title : '系统提示位',
93 93 },
94 94 {
95 95 field : 'promptLpn',
96   - title : '系统提示LPN'
  96 + title : '系统提示容器'
97 97 },
98 98 {
99 99 field : 'promptItem',
... ... @@ -105,7 +105,8 @@
105 105 },
106 106 {
107 107 field : 'allowAddNewInventory',
108   - title : '允许添加库存'
  108 + title : '允许添加库存',
  109 + visible : false
109 110 },
110 111 {
111 112 field : 'Enable',
... ... @@ -144,9 +145,9 @@
144 145 {
145 146 field : 'countByPiece',
146 147 title : 'RF逐件盘点' ,
147   - visible:true
  148 + visible : false
148 149 },
149   - {
  150 + /*{
150 151 field : 'userDef1',
151 152 title : '自定义字段1' ,
152 153 visible:false
... ... @@ -160,14 +161,14 @@
160 161 field : 'userDef3',
161 162 title : '自定义字段3' ,
162 163 visible:false
163   - },
  164 + },*/
164 165  
165 166 {
166 167 title: '操作',
167 168 align: 'center',
168 169 formatter: function(value, row, index) {
169 170 var actions = [];
170   - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>修改</a> ');
  171 + //actions.push('<a class="btn btn-success btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>修改</a> ');
171 172 actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
172 173 return actions.join('');
173 174 }
... ...
src/main/resources/templates/config/material/material.html
... ... @@ -162,7 +162,17 @@
162 162 },
163 163 {
164 164 field : 'autoGenSerialNum',
165   - title : '自动生成序列号' ,
  165 + title : '自动生成序列号',
  166 + align: 'center',
  167 + formatter: function(value, row, index) {
  168 + var actions = [];
  169 + if (value == 0){
  170 + actions.push("<span class='badge badge-primary'>自动生成</span>");
  171 + } else {
  172 + actions.push("<span class='badge badge-primary'>不自动生成</span>");
  173 + }
  174 + return actions.join('');
  175 + }
166 176 },
167 177 {
168 178 field : 'autoGenSerialNumFormat',
... ...
src/main/resources/templates/inventory/adjustDetail/add.html
... ... @@ -101,7 +101,7 @@
101 101 <input id="materialUnit" name="materialUnit" class="form-control" type="text">
102 102 </div>
103 103 </div>-->
104   - <div class="form-group">
  104 + <!--<div class="form-group">
105 105 <label class="col-sm-3 control-label">调整类型:</label>
106 106 <div class="col-sm-8">
107 107 <select id="problemType" name="problemType" class="form-control"
... ... @@ -109,9 +109,9 @@
109 109 <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}"
110 110 th:value="${dict['dictValue']}"></option>
111 111 </select>
112   - <!--<input id="problemType" name="problemType" class="form-control" type="text" >-->
  112 + &lt;!&ndash;<input id="problemType" name="problemType" class="form-control" type="text" >&ndash;&gt;
113 113 </div>
114   - </div>
  114 + </div>-->
115 115 <div class="form-group">
116 116 <label class="col-sm-3 control-label">属性号:</label>
117 117 <div class="col-sm-8">
... ... @@ -143,8 +143,8 @@
143 143 <label class="col-sm-3 control-label">调整前库存状态:</label>
144 144 <div class="col-sm-8">
145 145 <select id="fromInventorySts" name="fromInventorySts" class="form-control"
146   - th:with="fromInventorySts=${@dict.getType('inventoryStatus')}">
147   - <option th:each="dict : ${fromInventorySts}" th:text="${dict['dictLabel']}"
  146 + th:with="fromInventoryStatus=${@dict.getType('inventorySts')}">
  147 + <option th:each="dict : ${fromInventoryStatus}" th:text="${dict['dictLabel']}"
148 148 th:value="${dict['dictValue']}"></option>
149 149 </select>
150 150 </div>
... ... @@ -153,22 +153,12 @@
153 153 <label class="col-sm-3 control-label">调整后库存状态:</label>
154 154 <div class="col-sm-8">
155 155 <select id="toInventorySts" name="toInventorySts" class="form-control"
156   - th:with="toInventorySts=${@dict.getType('inventoryStatus')}">
157   - <option th:each="dict : ${toInventorySts}" th:text="${dict['dictLabel']}"
  156 + th:with="toInventoryStatus=${@dict.getType('inventorySts')}">
  157 + <option th:each="dict : ${toInventoryStatus}" th:text="${dict['dictLabel']}"
158 158 th:value="${dict['dictValue']}"></option>
159 159 </select>
160 160 </div>
161 161 </div>
162   - <!--<div class="form-group">
163   - <label class="col-sm-3 control-label">调整状态:</label>
164   - <div class="col-sm-8">
165   - <select id="status" name="status" class="form-control"
166   - th:with="status=${@dict.getType('inventoryStatus')}">
167   - <option th:each="dict : ${status}" th:text="${dict['dictLabel']}"
168   - th:value="${dict['dictValue']}"></option>
169   - </select>
170   - </div>
171   - </div>-->
172 162 <div class="form-group">
173 163 <label class="col-sm-3 control-label">重量:</label>
174 164 <div class="col-sm-8">
... ... @@ -228,9 +218,6 @@
228 218 adjustCode: {
229 219 required: true,
230 220 },
231   - problemType: {
232   - required: true,
233   - },
234 221 materialCode: {
235 222 required: true,
236 223 },
... ...
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
... ... @@ -420,7 +420,7 @@
420 420 $.modal.alertWarning("请至少选择一条记录");
421 421 return;
422 422 }
423   - $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!"
  423 + $.modal.confirm("注意:该操作将更改库存数量或属性,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!"
424 424 , function() {
425 425 var url = prefix + "/adjustEdit";
426 426 var data = { "ids": rows.join() };
... ...
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
... ... @@ -99,7 +99,7 @@
99 99 <div th:include="include :: footer"></div>
100 100 <script th:inline="javascript">
101 101 var prefix = ctx + "inventory/inventoryDetail";
102   - var inventoryStatus = [[${@dict.getType('inventoryStatus')}]];
  102 + var inventoryStatus = [[${@dict.getType('inventorySts')}]];
103 103 $(function () {
104 104 update();
105 105 });
... ... @@ -158,7 +158,15 @@
158 158 },
159 159 {
160 160 field: 'qty',
161   - title: '数量'
  161 + title: '库存数量'
  162 + },
  163 + {
  164 + field: 'inventorySts',
  165 + title: '库存状态',
  166 + align: 'center',
  167 + formatter: function (value, row, index) {
  168 + return $.table.selectDictLabel(inventoryStatus, value);
  169 + }
162 170 },
163 171 {
164 172 field: 'taskQty',
... ... @@ -215,14 +223,6 @@
215 223 sortable: true,
216 224 visible: false
217 225 },
218   - {
219   - field: 'inventorySts',
220   - title: '库存状态',
221   - align: 'center',
222   - formatter: function (value, row, index) {
223   - return $.table.selectDictLabel(inventoryStatus, value);
224   - }
225   - },
226 226  
227 227 {
228 228 field: 'referCode',
... ...
src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html
... ... @@ -94,7 +94,7 @@
94 94 <script th:inline="javascript">
95 95 var editFlag = [[${@permission.hasPermi('inventoryHeader:inventoryTransaction:edit')}]];
96 96 var prefix = ctx + "inventory/inventoryTransaction";
97   - var inventoryStatus=[[${@dict.getType('inventoryStatus')}]];
  97 + var inventoryStatus=[[${@dict.getType('inventorySts')}]];
98 98 var inventoryTransactionType = [[${@dict.getType('inventoryTransactionType')}]];
99 99 $(function() {
100 100 $("#bootstrap-table").bootstrapTable({
... ...
src/main/resources/templates/receipt/receiving/add.html
... ... @@ -140,6 +140,7 @@
140 140 $("input[name='openQty']").val(urlParms.openQty);
141 141 $("input[name='inventorySts']").val(urlParms.inventorySts);
142 142 $("input[name='materialUnit']").val(urlParms.materialUnit);
  143 + $("input[name='qty']").val(urlParms.totalQty-urlParms.openQty);
143 144 $("input[name='qty']").focus();
144 145  
145 146  
... ...
src/main/resources/templates/task/taskHeader/taskHeader.html
... ... @@ -146,7 +146,7 @@
146 146 sortOrder: "desc",
147 147 search: false,
148 148 clickToSelect:true,
149   - queryParams:"InternalTaskType="+[[${InternalTaskType}]],
  149 + queryParams: queryParams,
150 150 columns: [{
151 151 checkbox: true
152 152 },
... ... @@ -491,6 +491,17 @@
491 491 $.modal.open("空托盘出库",prefix+"/emptyOut")
492 492 }
493 493  
  494 + function queryParams(params) {
  495 + return {
  496 + InternalTaskType: +[[${InternalTaskType}]],
  497 + // 传递参数查询参数
  498 + pageSize: params.limit,
  499 + pageNum: params.offset / params.limit + 1,
  500 + searchValue: params.search,
  501 + orderByColumn: params.sort,
  502 + isAsc: params.order
  503 + };
  504 + };
494 505 </script>
495 506 </body>
496 507 </html>
497 508 \ No newline at end of file
... ...