Commit 9ebc847a1de9a74ffadcff030b35dd2195d9437d
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
13 changed files
with
169 additions
and
11 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/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/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... | ... | @@ -289,6 +289,10 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<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<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<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<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<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<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
... | ... | @@ -148,7 +148,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
148 | 148 | ReceiptContainerHeader record =new ReceiptContainerHeader(); |
149 | 149 | record.setStatus((short)0); |
150 | 150 | record.setId(taskHeader.getAllocationHeadId()); |
151 | - if (receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");} | |
151 | + if (!receiptContainerHeaderService.updateById(record)){throw new ServiceException("回滚组盘明细失败");} | |
152 | 152 | } |
153 | 153 | //根据任务类型来更新货箱状态 |
154 | 154 | //修改关联的货箱状态 |
... | ... | @@ -1174,8 +1174,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1174 | 1174 | if (!receiptDetailService.updateById(detail)){ |
1175 | 1175 | throw new ServiceException("更新入库单详情失败"); |
1176 | 1176 | } |
1177 | - //更新头表状态 | |
1178 | - receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
1179 | 1177 | } |
1180 | 1178 | } |
1181 | 1179 | } else { |
... | ... |
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/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/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 |
... | ... |