库存日志

This commit is contained in:
sxu 2024-08-06 13:27:30 +08:00
parent 892399bbce
commit 57d566e2be
8 changed files with 38 additions and 16 deletions

View File

@ -1,4 +1,4 @@
package com.bonus.sgzb.material.domain;
package com.bonus.sgzb.base.api.domain;
import com.bonus.sgzb.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;

View File

@ -3,7 +3,6 @@ package com.bonus.sgzb.common.log.aspect;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.bonus.sgzb.base.api.domain.*;
import com.bonus.sgzb.common.core.constant.SecurityConstants;
import com.bonus.sgzb.common.core.domain.R;
@ -12,7 +11,6 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
import com.bonus.sgzb.common.log.filter.PropertyPreExcludeFilter;
import com.bonus.sgzb.common.log.service.AsyncLogService;
import com.bonus.sgzb.system.api.RemoteUserService;
import com.bonus.sgzb.system.api.domain.BmNumLogs;
import com.bonus.sgzb.system.api.domain.BmStorageLog;
import com.bonus.sgzb.system.api.model.LoginUser;
import com.fasterxml.jackson.databind.ObjectMapper;
@ -274,7 +272,7 @@ public class LogAspect
bmStorageLogList.add(bmStorageLog);
}
}
// 新购验收任务,暂时未加"新购配件入库审核"相关日志 PurchaseAccessoryController.checkInput
// 新购验收任务 PurchaseMacodeInfoController.modifyManageStatus
if (joinPoint.getArgs()[0] instanceof MaInputVO) {
MaInputVO maInputVO = (MaInputVO) joinPoint.getArgs()[0];
for (MaInputRecord maInputRecord : maInputVO.getInputRecordList()) {
@ -288,6 +286,20 @@ public class LogAspect
bmStorageLogList.add(bmStorageLog);
}
}
// 新购配件入库审核 PurchaseAccessoryController.checkInput, 因为没有出入库闭环暂时不加库存监控日志
// if (joinPoint.getArgs()[0] instanceof MaInputVO) {
// MaInputVO maInputVO = (MaInputVO) joinPoint.getArgs()[0];
// for (MaInputRecord maInputRecord : maInputVO.getInputRecordList()) {
// BmStorageLog bmStorageLog = new BmStorageLog();
// bmStorageLog.setTypeId(Objects.isNull(maInputRecord.getTypeId()) ? 0 : maInputRecord.getTypeId().intValue());
// bmStorageLog.setTypeName(maInputRecord.getMaCode());
// bmStorageLog.setPreStoreNum(Objects.isNull(maInputRecord.getNum()) ? 0: maInputRecord.getNum().intValue());
// bmStorageLog.setInNum(Objects.isNull(maInputRecord.getInputNum()) ? 0: maInputRecord.getInputNum().intValue());
// bmStorageLog.setPostStoreNum(bmStorageLog.getPreStoreNum() + bmStorageLog.getInNum());
// bmStorageLog.setTaskId(String.valueOf(maInputRecord.getTaskId()));
// bmStorageLogList.add(bmStorageLog);
// }
// }
// 领料出库
if (joinPoint.getArgs()[0] instanceof List &&
((List) joinPoint.getArgs()[0]).stream().noneMatch((o -> !(o instanceof LeaseOutDetails)))) {
@ -329,9 +341,17 @@ public class LogAspect
bmStorageLog.setPostStoreNum(bai.getPostStoreNum());
bmStorageLogList.add(bmStorageLog);
}
// 二级库出入库
// 二级库出入库, 不影响ma_type库存变化暂时不加库存监控日志
// if (joinPoint.getArgs()[0] instanceof TeamLeaseInfo) {
//
// TeamLeaseInfo tli = (TeamLeaseInfo)joinPoint.getArgs()[0];
// BmStorageLog bmStorageLog = new BmStorageLog();
// bmStorageLog.setAgreementId(Integer.parseInt(tli.getAgreementId()));
// bmStorageLog.setTypeId(Integer.parseInt(tli.getTypeId()));
// bmStorageLog.setTypeName(tli.getTypeName());
// bmStorageLog.setPreStoreNum(1);
// bmStorageLog.setPreStoreNum(Integer.parseInt(tli.getNum())); //出入库数量,type=1出库,type=2退库
// bmStorageLog.setPostStoreNum(1);
// bmStorageLogList.add(bmStorageLog);
// }
}
}

View File

@ -168,6 +168,7 @@ public class PurchaseAccessoryController extends BaseController
* 新购配件入库审核
*/
@ApiOperation(value = "新购配件入库审核")
//@Log(title = "新购配件入库审核", businessType = BusinessType.MATERIAL)
@PostMapping("/checkInput")
public AjaxResult checkInput(@RequestBody List<PurchasePartDetails> purchasePartDetails){
return toAjax(purchaseAccessoryService.checkInput(purchasePartDetails));

View File

@ -1,6 +1,7 @@
package com.bonus.sgzb.material.controller;
import cn.hutool.core.convert.Convert;
import com.bonus.sgzb.base.api.domain.TeamLeaseInfo;
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
@ -54,7 +55,7 @@ public class SecondaryWarehouseController extends BaseController {
*/
@ApiOperation(value = "出库/退库操作")
@PostMapping("/operate")
@Log(title = "二级库管理--出库退库操作", businessType = BusinessType.MATERIAL)
//@Log(title = "二级库管理--出库退库操作", businessType = BusinessType.MATERIAL)
public AjaxResult operate(TeamLeaseInfo bean){
return toAjax(service.addOperate(bean));
}

View File

@ -1,7 +1,7 @@
package com.bonus.sgzb.material.mapper;
import com.bonus.sgzb.material.domain.SecondaryWarehouse;
import com.bonus.sgzb.material.domain.TeamLeaseInfo;
import com.bonus.sgzb.base.api.domain.TeamLeaseInfo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

View File

@ -1,7 +1,7 @@
package com.bonus.sgzb.material.service;
import com.bonus.sgzb.material.domain.SecondaryWarehouse;
import com.bonus.sgzb.material.domain.TeamLeaseInfo;
import com.bonus.sgzb.base.api.domain.TeamLeaseInfo;
import java.util.List;

View File

@ -3,7 +3,7 @@ package com.bonus.sgzb.material.service.impl;
import com.bonus.sgzb.common.core.exception.ServiceException;
import com.bonus.sgzb.common.security.utils.SecurityUtils;
import com.bonus.sgzb.material.domain.SecondaryWarehouse;
import com.bonus.sgzb.material.domain.TeamLeaseInfo;
import com.bonus.sgzb.base.api.domain.TeamLeaseInfo;
import com.bonus.sgzb.material.mapper.SecondaryWarehouseMapper;
import com.bonus.sgzb.material.service.SecondaryWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.agreement_id,
sai.type_id
</select>
<select id="getOperateList" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
<select id="getOperateList" resultType="com.bonus.sgzb.base.api.domain.TeamLeaseInfo">
SELECT
bui.unit_name AS unitName,
bp.lot_name AS proName,
@ -99,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</if>
</select>
<select id="getRecordsOne" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
<select id="getRecordsOne" resultType="com.bonus.sgzb.base.api.domain.TeamLeaseInfo">
SELECT
mt1.type_name AS typeName,
mt.type_name AS modelName,
@ -116,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by sai.start_time desc
</select>
<select id="getRecordsTwo" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
<select id="getRecordsTwo" resultType="com.bonus.sgzb.base.api.domain.TeamLeaseInfo">
SELECT
mt1.type_name AS typeName,
mt.type_name AS modelName,
@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by sai.end_time desc
</select>
<select id="getRecordsThree" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
<select id="getRecordsThree" resultType="com.bonus.sgzb.base.api.domain.TeamLeaseInfo">
SELECT
mt1.type_name AS typeName,
mt.type_name AS modelName,
@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by sai.start_time desc
</select>
<select id="getRecordsFour" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
<select id="getRecordsFour" resultType="com.bonus.sgzb.base.api.domain.TeamLeaseInfo">
select tli.team_name as teamName,
mt1.type_name AS typeName,
mt.type_name AS modelName,
@ -166,7 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and DATE(tli.create_time) = #{startTime}
</if>
</select>
<select id="getRecordsFive" resultType="com.bonus.sgzb.material.domain.TeamLeaseInfo">
<select id="getRecordsFive" resultType="com.bonus.sgzb.base.api.domain.TeamLeaseInfo">
select tli.team_name as teamName,
mt1.type_name AS typeName,
mt.type_name AS modelName,