Commit e52db63ab651809636dc8415e574049255e74d3f
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop
# Conflicts: # huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java # huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentDetail.java
Showing
10 changed files
with
76 additions
and
70 deletions
ant-design-vue-jeecg/pom.xml
ant-design-vue-jeecg/src/views/system/inventory/InventoryMaterialSummaryList.vue
... | ... | @@ -18,12 +18,6 @@ |
18 | 18 | </a-upload> |
19 | 19 | <!-- 高级查询区域 --> |
20 | 20 | <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> |
21 | - <a-dropdown v-if="selectedRowKeys.length > 0"> | |
22 | - <a-menu slot="overlay"> | |
23 | - <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |
24 | - </a-menu> | |
25 | - <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |
26 | - </a-dropdown> | |
27 | 21 | </div> |
28 | 22 | |
29 | 23 | <!-- table区域-begin --> |
... | ... | @@ -68,25 +62,6 @@ |
68 | 62 | </a-button> |
69 | 63 | </template> |
70 | 64 | |
71 | - <span slot="action" slot-scope="text, record"> | |
72 | - <a @click="handleEdit(record)">编辑</a> | |
73 | - | |
74 | - <a-divider type="vertical" /> | |
75 | - <a-dropdown> | |
76 | - <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |
77 | - <a-menu slot="overlay"> | |
78 | - <a-menu-item> | |
79 | - <a @click="handleDetail(record)">详情</a> | |
80 | - </a-menu-item> | |
81 | - <a-menu-item> | |
82 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
83 | - <a>删除</a> | |
84 | - </a-popconfirm> | |
85 | - </a-menu-item> | |
86 | - </a-menu> | |
87 | - </a-dropdown> | |
88 | - </span> | |
89 | - | |
90 | 65 | </a-table> |
91 | 66 | </div> |
92 | 67 | |
... | ... | @@ -165,14 +140,6 @@ |
165 | 140 | title:'物料总数', |
166 | 141 | align:"center", |
167 | 142 | dataIndex: 'qty' |
168 | - }, | |
169 | - { | |
170 | - title: '操作', | |
171 | - dataIndex: 'action', | |
172 | - align:"center", | |
173 | - fixed:"right", | |
174 | - width:147, | |
175 | - scopedSlots: { customRender: 'action' } | |
176 | 143 | } |
177 | 144 | ], |
178 | 145 | url: { |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue
... | ... | @@ -74,14 +74,7 @@ |
74 | 74 | </a-button> |
75 | 75 | </template> |
76 | 76 | |
77 | - <span slot="action" slot-scope="text, record"> | |
78 | - <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑</a> | |
79 | - <a-divider type="vertical"/> | |
80 | 77 | |
81 | - <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |
82 | - <a v-has="'inventoryDetail:add'">删除</a> | |
83 | - </a-popconfirm> | |
84 | - </span> | |
85 | 78 | |
86 | 79 | </a-table> |
87 | 80 | </div> |
... | ... | @@ -227,15 +220,11 @@ export default { |
227 | 220 | { |
228 | 221 | title: '更新日期', |
229 | 222 | align: "center", |
230 | - dataIndex: 'updateTime' | |
231 | - }, | |
232 | - { | |
233 | - title: '操作', | |
234 | - dataIndex: 'action', | |
235 | - align: "center", | |
236 | 223 | fixed: "right", |
224 | + dataIndex: 'updateTime', | |
237 | 225 | width: 147, |
238 | 226 | scopedSlots: {customRender: 'action'}, |
227 | + | |
239 | 228 | } |
240 | 229 | ], |
241 | 230 | url: { |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" |
105 | 105 | @change="handleImportExcel"> |
106 | 106 | <a-button type="primary" icon="import">导入</a-button> |
107 | - <a-button v-has="'receiptHeader:print'"@click="batchPrint()" type="primary">打印</a-button> | |
107 | + <a-button v-has="'receiptHeader:print'" @click="batchPrint()" type="primary">打印</a-button> | |
108 | 108 | </a-upload> |
109 | 109 | <!-- 高级查询区域 --> |
110 | 110 | <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"--> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/operation/service/impl/OperationLogServiceImpl.java
... | ... | @@ -7,6 +7,7 @@ import org.jeecg.modules.wms.monitor.operation.entity.OperationLog; |
7 | 7 | import org.jeecg.modules.wms.monitor.operation.mapper.OperationLogMapper; |
8 | 8 | import org.jeecg.modules.wms.monitor.operation.service.IOperationLogService; |
9 | 9 | import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerDetail; |
10 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; | |
10 | 11 | import org.jeecg.utils.StringUtils; |
11 | 12 | import org.springframework.stereotype.Service; |
12 | 13 | import org.springframework.util.CollectionUtils; |
... | ... | @@ -44,7 +45,7 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope |
44 | 45 | if (receiptContainerDetail == null || receiptContainerDetail.getUniqueCode() == null) { |
45 | 46 | continue; |
46 | 47 | } |
47 | - String msg = StrUtil.format("上游单号:{},入库单据号:{},仓库编码:{},托盘编码:{},物料编码:{},入库数量:{}", receiptContainerDetail.getReferCode(), | |
48 | + String msg = StrUtil.format("上游单号:{},入库单据号:{},仓库编码:{},托盘编码:{},物料编码:{},数量:{}", receiptContainerDetail.getReferCode(), | |
48 | 49 | receiptContainerDetail.getReceiptCode(), receiptContainerDetail.getWarehouseCode(), receiptContainerDetail.getContainerCode(), |
49 | 50 | receiptContainerDetail.getMaterialCode(), receiptContainerDetail.getQty()); |
50 | 51 | OperationLog operationLog = new OperationLog(); |
... | ... | @@ -61,16 +62,40 @@ public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, Ope |
61 | 62 | operationLogList.add(operationLog); |
62 | 63 | } |
63 | 64 | } |
65 | + if (logDTO.getBizType().equals("入库单追踪")) { | |
66 | + List<ReceiptDetail> receiptDetailList = JSON.parseArray(logDTO.getExtra(), ReceiptDetail.class); | |
67 | + if (CollectionUtils.isEmpty(receiptDetailList)) { | |
68 | + return true; | |
69 | + } | |
70 | + for (ReceiptDetail receiptDetail : receiptDetailList) { | |
71 | + if (receiptDetail == null || receiptDetail.getReceiptCode() == null) { | |
72 | + continue; | |
73 | + } | |
74 | + String msg = StrUtil.format("物料编码:{},数量:{},已收数量:{}", receiptDetail.getMaterialCode(), receiptDetail.getQty(), receiptDetail.getTaskQty()); | |
75 | + OperationLog operationLog = new OperationLog(); | |
76 | + operationLog.setBizId(receiptDetail.getReceiptCode()); | |
77 | + operationLog.setOperationMsg(StringUtils.substring(msg, 0, 1000)); | |
78 | + operationLog.setBizType(logDTO.getBizType()); | |
79 | + operationLog.setBizTag(logDTO.getTag()); | |
80 | + operationLog.setContentException(StringUtils.substring(logDTO.getException(), 0, 1000)); | |
81 | + operationLog.setContentReturn(StringUtils.substring(logDTO.getReturnStr(), 0, 1000)); | |
82 | + operationLog.setOperationCostTime(logDTO.getExecutionTime()); | |
83 | + operationLog.setOperationStatus(logDTO.getSuccess().equals(true) ? 1 : 0); | |
84 | + operationLog.setOperationTime(logDTO.getOperateDate()); | |
85 | + operationLog.setOperatorName(logDTO.getOperatorId()); | |
86 | + operationLogList.add(operationLog); | |
87 | + } | |
88 | + } | |
64 | 89 | } |
65 | 90 | if (!StringUtils.isEmpty(logDTO.getBizId())) { |
66 | 91 | OperationLog operationLog = new OperationLog(); |
67 | 92 | operationLog.setBizId(logDTO.getBizId()); |
93 | + operationLog.setOperationMsg(StringUtils.substring(logDTO.getMsg(), 0, 1000)); | |
68 | 94 | operationLog.setBizType(logDTO.getBizType()); |
69 | 95 | operationLog.setBizTag(logDTO.getTag()); |
70 | 96 | operationLog.setContentException(StringUtils.substring(logDTO.getException(), 0, 1000)); |
71 | 97 | operationLog.setContentReturn(StringUtils.substring(logDTO.getReturnStr(), 0, 1000)); |
72 | 98 | operationLog.setOperationCostTime(logDTO.getExecutionTime()); |
73 | - operationLog.setOperationMsg(StringUtils.substring(logDTO.getMsg(), 0, 1000)); | |
74 | 99 | operationLog.setOperationStatus(logDTO.getSuccess().equals(true) ? 1 : 0); |
75 | 100 | operationLog.setOperationTime(logDTO.getOperateDate()); |
76 | 101 | operationLog.setOperatorName(logDTO.getOperatorId()); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerDetail.java
... | ... | @@ -95,6 +95,7 @@ public class ReceiptContainerDetail implements Serializable { |
95 | 95 | @Excel(name = "项目号", width = 15) |
96 | 96 | @ApiModelProperty(value = "项目号") |
97 | 97 | private String project; |
98 | + @Excel(name = "唯一号", width = 15) | |
98 | 99 | @ApiModelProperty(value = "唯一号") |
99 | 100 | private String uniqueCode; |
100 | 101 | /** 备用字段1 */ |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptDetailServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.receipt.receiptHeader.service.impl; |
2 | 2 | |
3 | +import com.alibaba.fastjson.JSON; | |
3 | 4 | import com.aliyun.oss.ServiceException; |
4 | 5 | import org.jeecg.common.api.vo.Result; |
5 | 6 | import org.jeecg.modules.wms.config.material.entity.Material; |
... | ... | @@ -9,11 +10,18 @@ import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
9 | 10 | import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptDetailMapper; |
10 | 11 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; |
11 | 12 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
13 | +import org.jeecg.utils.HuahengJwtUtil; | |
12 | 14 | import org.jeecg.utils.StringUtils; |
13 | 15 | import org.jeecg.utils.constant.QuantityConstant; |
14 | 16 | import org.springframework.stereotype.Service; |
17 | + | |
18 | +import java.util.ArrayList; | |
15 | 19 | import java.util.List; |
16 | 20 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
21 | + | |
22 | +import cn.monitor4all.logRecord.annotation.OperationLog; | |
23 | +import cn.monitor4all.logRecord.context.LogRecordContext; | |
24 | + | |
17 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 26 | |
19 | 27 | import javax.annotation.Resource; |
... | ... | @@ -42,6 +50,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
42 | 50 | } |
43 | 51 | |
44 | 52 | @Override |
53 | + @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库详情添加'", extra = "#extraJsonString", msg = "''", operatorId = "#username", recordReturnValue = true) | |
45 | 54 | public Result saveReceiptDetail(ReceiptDetail receiptDetail) { |
46 | 55 | ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); |
47 | 56 | if (receiptHeader == null) { |
... | ... | @@ -79,6 +88,11 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
79 | 88 | if (!success) { |
80 | 89 | throw new ServiceException("添加失败, 保存入库单详失败"); |
81 | 90 | } |
91 | + // 操作日志收集 | |
92 | + List<ReceiptDetail> receiptDetailList = new ArrayList<ReceiptDetail>(); | |
93 | + receiptDetailList.add(receiptDetail); | |
94 | + LogRecordContext.putVariable("username", HuahengJwtUtil.getCurrentOperator()); | |
95 | + LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptDetailList)); | |
82 | 96 | return Result.OK("添加成功!"); |
83 | 97 | } |
84 | 98 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.receipt.receiptHeader.service.impl; |
2 | 2 | |
3 | -import java.io.Serializable; | |
4 | -import java.math.BigDecimal; | |
5 | -import java.text.SimpleDateFormat; | |
6 | -import java.util.Collection; | |
7 | -import java.util.Date; | |
8 | -import java.util.List; | |
9 | - | |
10 | -import javax.annotation.Resource; | |
11 | - | |
3 | +import com.aliyun.oss.ServiceException; | |
4 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
12 | 6 | import org.jeecg.common.api.vo.Result; |
7 | +import org.jeecg.common.util.DateUtils; | |
13 | 8 | import org.jeecg.modules.wms.config.receiptType.entity.ReceiptType; |
14 | 9 | import org.jeecg.modules.wms.config.receiptType.service.IReceiptTypeService; |
10 | +import org.jeecg.modules.wms.config.receiptType.service.impl.ReceiptTypeServiceImpl; | |
15 | 11 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; |
16 | 12 | import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; |
17 | 13 | import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptDetailMapper; |
... | ... | @@ -19,16 +15,27 @@ import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptHeaderMapper; |
19 | 15 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; |
20 | 16 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
21 | 17 | import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptHeaderHistoryService; |
18 | +import org.jeecg.utils.HuahengJwtUtil; | |
22 | 19 | import org.jeecg.utils.StringUtils; |
23 | 20 | import org.jeecg.utils.constant.QuantityConstant; |
24 | -import org.springframework.beans.factory.annotation.Autowired; | |
25 | 21 | import org.springframework.stereotype.Service; |
22 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
23 | +import org.springframework.beans.factory.annotation.Autowired; | |
24 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
25 | + | |
26 | +import cn.monitor4all.logRecord.annotation.OperationLog; | |
27 | +import cn.monitor4all.logRecord.context.LogRecordContext; | |
28 | + | |
29 | +import org.springframework.beans.factory.annotation.Autowired; | |
26 | 30 | import org.springframework.transaction.annotation.Transactional; |
27 | 31 | |
28 | -import com.aliyun.oss.ServiceException; | |
29 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
30 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
31 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
32 | +import javax.annotation.Resource; | |
33 | +import java.io.Serializable; | |
34 | +import java.math.BigDecimal; | |
35 | +import java.text.SimpleDateFormat; | |
36 | +import java.util.Date; | |
37 | +import java.util.List; | |
38 | +import java.util.Collection; | |
32 | 39 | |
33 | 40 | /** |
34 | 41 | * @Description: 入库表主表 |
... | ... | @@ -53,18 +60,18 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
53 | 60 | private IReceiptHeaderHistoryService receiptHeaderHistoryService; |
54 | 61 | |
55 | 62 | /** |
56 | - * @param id 入库单主表id | |
57 | - * @param reason 进入历史单据的原因 | |
63 | + * @param id 入库单主表id | |
64 | + * @param reason 进入历史单据的原因 | |
58 | 65 | * @return |
59 | 66 | */ |
60 | 67 | @Override |
61 | 68 | @Transactional |
62 | - public boolean delMain(String id, String reason) { | |
69 | + public boolean delMain(String id,String reason) { | |
63 | 70 | ReceiptHeader receiptHeader = getById(id); |
64 | 71 | if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { |
65 | 72 | throw new ServiceException("不能删除非新建状态单据"); |
66 | 73 | } |
67 | - receiptHeaderHistoryService.saveById(id, reason); | |
74 | + receiptHeaderHistoryService.saveById(id,reason); | |
68 | 75 | boolean success = receiptDetailMapper.deleteByMainId(id); |
69 | 76 | |
70 | 77 | if (!success) { |
... | ... | @@ -89,6 +96,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
89 | 96 | |
90 | 97 | @Override |
91 | 98 | @Transactional |
99 | + @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库单生成'", | |
100 | + msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", operatorId = "#username", recordReturnValue = true) | |
92 | 101 | public Result<ReceiptHeader> saveReceiptHeader(ReceiptHeader receiptHeader) { |
93 | 102 | LambdaQueryWrapper<ReceiptType> lambdaQueryWrapper = Wrappers.lambdaQuery(); |
94 | 103 | lambdaQueryWrapper.eq(ReceiptType::getCode, receiptHeader.getType()).eq(ReceiptType::getWarehouseCode, receiptHeader.getWarehouseCode()); |
... | ... | @@ -107,6 +116,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
107 | 116 | if (!success) { |
108 | 117 | return Result.OK("添加失败!"); |
109 | 118 | } |
119 | + LogRecordContext.putVariable("username", HuahengJwtUtil.getCurrentOperator()); | |
110 | 120 | return Result.OK("添加成功!", receiptHeader); |
111 | 121 | } |
112 | 122 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentDetail.java
... | ... | @@ -107,8 +107,7 @@ public class ShipmentDetail implements Serializable { |
107 | 107 | /** 上游行号 */ |
108 | 108 | @Excel(name = "上游行号", width = 15) |
109 | 109 | @ApiModelProperty(value = "上游行号") |
110 | - private String referLineNum; | |
111 | - /** 备用字段1 */ | |
110 | + private String referLineNum; /** 备用字段1 */ | |
112 | 111 | @Excel(name = "备用字段1", width = 15) |
113 | 112 | @ApiModelProperty(value = "备用字段1") |
114 | 113 | private String userdef1; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskDetail.java
... | ... | @@ -115,6 +115,7 @@ public class TaskDetail implements Serializable { |
115 | 115 | @Excel(name = "入库的库存详情id", width = 15) |
116 | 116 | @ApiModelProperty(value = "入库的库存详情id") |
117 | 117 | private Integer toInventoryDetailId; |
118 | + @Excel(name = "唯一号", width = 15) | |
118 | 119 | @ApiModelProperty(value = "唯一号") |
119 | 120 | private String uniqueCode; |
120 | 121 | /** 备用字段1 */ |
... | ... |