Commit 6055ab302d31e2d94ce46c7775cd9dbcdb39a02a

Authored by 谭毅彬
2 parents c062b7a1 43dfeb09

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

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: {
... ...
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&lt;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,41 @@ public class OperationLogServiceImpl extends ServiceImpl&lt;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.getReferCode(),
  75 + receiptDetail.getWarehouseCode(), receiptDetail.getMaterialCode(), receiptDetail.getQty(), receiptDetail.getTaskQty());
  76 + OperationLog operationLog = new OperationLog();
  77 + operationLog.setBizId(receiptDetail.getReceiptCode());
  78 + operationLog.setOperationMsg(StringUtils.substring(msg, 0, 1000));
  79 + operationLog.setBizType(logDTO.getBizType());
  80 + operationLog.setBizTag(logDTO.getTag());
  81 + operationLog.setContentException(StringUtils.substring(logDTO.getException(), 0, 1000));
  82 + operationLog.setContentReturn(StringUtils.substring(logDTO.getReturnStr(), 0, 1000));
  83 + operationLog.setOperationCostTime(logDTO.getExecutionTime());
  84 + operationLog.setOperationStatus(logDTO.getSuccess().equals(true) ? 1 : 0);
  85 + operationLog.setOperationTime(logDTO.getOperateDate());
  86 + operationLog.setOperatorName(logDTO.getOperatorId());
  87 + operationLogList.add(operationLog);
  88 + }
  89 + }
64 90 }
65 91 if (!StringUtils.isEmpty(logDTO.getBizId())) {
66 92 OperationLog operationLog = new OperationLog();
67 93 operationLog.setBizId(logDTO.getBizId());
  94 + operationLog.setOperationMsg(StringUtils.substring(logDTO.getMsg(), 0, 1000));
68 95 operationLog.setBizType(logDTO.getBizType());
69 96 operationLog.setBizTag(logDTO.getTag());
70 97 operationLog.setContentException(StringUtils.substring(logDTO.getException(), 0, 1000));
71 98 operationLog.setContentReturn(StringUtils.substring(logDTO.getReturnStr(), 0, 1000));
72 99 operationLog.setOperationCostTime(logDTO.getExecutionTime());
73   - operationLog.setOperationMsg(StringUtils.substring(logDTO.getMsg(), 0, 1000));
74 100 operationLog.setOperationStatus(logDTO.getSuccess().equals(true) ? 1 : 0);
75 101 operationLog.setOperationTime(logDTO.getOperateDate());
76 102 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&lt;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&lt;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
... ... @@ -15,10 +15,15 @@ import org.jeecg.modules.wms.receipt.receiptHeader.mapper.ReceiptHeaderMapper;
15 15 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService;
16 16 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService;
17 17 import org.jeecg.modules.wms.receipt.receiptHeaderHistory.service.IReceiptHeaderHistoryService;
  18 +import org.jeecg.utils.HuahengJwtUtil;
18 19 import org.jeecg.utils.StringUtils;
19 20 import org.jeecg.utils.constant.QuantityConstant;
20 21 import org.springframework.stereotype.Service;
21 22 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  23 +
  24 +import cn.monitor4all.logRecord.annotation.OperationLog;
  25 +import cn.monitor4all.logRecord.context.LogRecordContext;
  26 +
22 27 import org.springframework.beans.factory.annotation.Autowired;
23 28 import org.springframework.transaction.annotation.Transactional;
24 29  
... ... @@ -89,6 +94,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
89 94  
90 95 @Override
91 96 @Transactional
  97 + @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单据追踪'", tag = "'入库单生成'",
  98 + msg = "'上游单号:['+ #receiptHeader.getReferCode() + '],仓库编码:[' + #receiptHeader.getWarehouseCode() + ']'", operatorId = "#username", recordReturnValue = true)
92 99 public Result<ReceiptHeader> saveReceiptHeader(ReceiptHeader receiptHeader) {
93 100 LambdaQueryWrapper<ReceiptType> lambdaQueryWrapper = Wrappers.lambdaQuery();
94 101 lambdaQueryWrapper.eq(ReceiptType::getCode, receiptHeader.getType()).eq(ReceiptType::getWarehouseCode, receiptHeader.getWarehouseCode());
... ... @@ -107,13 +114,13 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
107 114 if (!success) {
108 115 return Result.OK("添加失败!");
109 116 }
  117 + LogRecordContext.putVariable("username", HuahengJwtUtil.getCurrentOperator());
110 118 return Result.OK("添加成功!", receiptHeader);
111 119 }
112 120  
113 121 @Override
114 122 @Transactional
115 123 public String createCode(String receiptType) {
116   - int i = 0;
117 124 String code = null;
118 125 Date now = new Date();
119 126 SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentDetail.java
... ... @@ -108,6 +108,7 @@ public class ShipmentDetail implements Serializable {
108 108 @Excel(name = "上游行号", width = 15)
109 109 @ApiModelProperty(value = "上游行号")
110 110 private String referLineNum;
  111 + @Excel(name = "唯一号", width = 15)
111 112 @ApiModelProperty(value = "唯一号")
112 113 private String uniqueCode;
113 114 /** 备用字段1 */
... ...
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 */
... ...