feat(oa): 更新仓库主表remark修改接口及关联需求字段

- 修改 updateRemark 接口,增加 requirementId 和 masterNum 参数
- 在 SysOaWarehouseMaster 实体中新增 requirementId 字段- 在 SysOaWarehouseMasterBo 业务对象中新增 requirementId 字段
- 在 SysOaWarehouseMasterVo 视图对象中新增 requirementId 和 requirementName 字段- 更新 Mapper XML 文件,增加 requirement_id 和 requirementName 的映射
- 在查询条件中增加对 requirementId 的过滤支持
- 关联 oa_requirements 表以获取 requirementName 数据
This commit is contained in:
2025-10-18 15:11:09 +08:00
parent b53839e677
commit 2ff35f6283
7 changed files with 21 additions and 8 deletions

View File

@@ -173,7 +173,10 @@ public class SysOaWarehouseMasterController extends BaseController {
* 单独修改remark * 单独修改remark
*/ */
@PutMapping("/updateRemark") @PutMapping("/updateRemark")
public R<Void> updateRemark(@RequestParam Long masterId, @RequestParam(required = false) String remark) { public R<Void> updateRemark(@RequestParam Long masterId,
return toAjax(iSysOaWarehouseMasterService.updateRemark(masterId, remark)); @RequestParam(required = false) String remark,
@RequestParam(required = false) Long requirementId,
@RequestParam(required = false) String masterNum) {
return toAjax(iSysOaWarehouseMasterService.updateRemark(masterId, remark, requirementId, masterNum));
} }
} }

View File

@@ -62,4 +62,5 @@ public class SysOaWarehouseMaster extends BaseEntity {
private Integer returnType; private Integer returnType;
private Integer withdrawLock; private Integer withdrawLock;
private Long requirementId;
} }

View File

@@ -78,4 +78,6 @@ public class SysOaWarehouseMasterBo extends BaseEntity {
private Integer withdrawLock; private Integer withdrawLock;
private Long requirementId;
} }

View File

@@ -88,6 +88,7 @@ public class SysOaWarehouseMasterVo {
*/ */
private Integer logCount; private Integer logCount;
private Integer withdrawLock; private Integer withdrawLock;
private Long requirementId;
private String requirementName;
} }

View File

@@ -85,7 +85,7 @@ public interface ISysOaWarehouseMasterService {
/** /**
* 单独修改remark * 单独修改remark
*/ */
Boolean updateRemark(Long masterId, String remark); Boolean updateRemark(Long masterId, String remark, Long requirementId,String masterNum);
int updateReturnType(Long masterId, Integer returnType); int updateReturnType(Long masterId, Integer returnType);

View File

@@ -89,6 +89,7 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
.eq(bo.getProjectId()!= null, "sowm.project_id", bo.getProjectId()) .eq(bo.getProjectId()!= null, "sowm.project_id", bo.getProjectId())
.eq(bo.getReturnType() != null, "sowm.return_type", bo.getReturnType()) .eq(bo.getReturnType() != null, "sowm.return_type", bo.getReturnType())
.eq(bo.getWithdrawLock()!= null, "sowm.withdraw_lock", bo.getWithdrawLock()) .eq(bo.getWithdrawLock()!= null, "sowm.withdraw_lock", bo.getWithdrawLock())
.eq(bo.getRequirementId() != null, "sowm.requirement_id", bo.getRequirementId())
// 其他过滤…… // 其他过滤……
.eq("sowm.del_flag",0) .eq("sowm.del_flag",0)
.orderByDesc("sowm.update_time"); .orderByDesc("sowm.update_time");
@@ -317,11 +318,13 @@ public class SysOaWarehouseMasterServiceImpl implements ISysOaWarehouseMasterSer
} }
@Override @Override
public Boolean updateRemark(Long masterId, String remark) { public Boolean updateRemark(Long masterId, String remark,Long requirementId,String masterNum) {
if (masterId == null) return false; if (masterId == null) return false;
SysOaWarehouseMaster update = new SysOaWarehouseMaster(); SysOaWarehouseMaster update = new SysOaWarehouseMaster();
update.setMasterId(masterId); update.setMasterId(masterId);
update.setRemark(remark); update.setRemark(remark);
update.setRequirementId(requirementId);
update.setMasterNum(masterNum);
return baseMapper.updateById(update) > 0; return baseMapper.updateById(update) > 0;
} }
// 2. 修改returnType // 2. 修改returnType

View File

@@ -24,6 +24,8 @@
<result property="logCount" column="logCount"/> <result property="logCount" column="logCount"/>
<result property="returnType" column="return_type"/> <result property="returnType" column="return_type"/>
<result property="withdrawLock" column="withdraw_lock"/> <result property="withdrawLock" column="withdraw_lock"/>
<result property="requirementId" column="requirement_id"/>
<result property="requirementName" column="requirementName"/>
<collection property="warehouseList" <collection property="warehouseList"
column="master_id" column="master_id"
@@ -54,10 +56,11 @@
sowm.status, sowm.status,
sowm.is_like, sowm.is_like,
${ew.sqlSelect}, ${ew.sqlSelect},
sop.project_name sop.project_name,
or.title AS requirementName,
FROM sys_oa_warehouse_master sowm FROM sys_oa_warehouse_master sowm
LEFT JOIN sys_oa_project sop LEFT JOIN sys_oa_project sop ON sop.project_id = sowm.project_id
ON sop.project_id = sowm.project_id LEFT JOIN oa_requirements or ON or.requirement_id = sowm.requirement_id
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>