协议合并修改
This commit is contained in:
parent
2e50eb1ad0
commit
6ca23d9fc9
|
|
@ -0,0 +1,53 @@
|
|||
package com.bonus.material.basic.controller;
|
||||
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.material.basic.domain.BmAgreementCombine;
|
||||
import com.bonus.material.basic.domain.BmProjectCombine;
|
||||
import com.bonus.material.basic.service.IBmAgreementCombineService;
|
||||
import com.bonus.material.basic.service.IBmProjectCombineService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 合并协议管理Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-10
|
||||
*/
|
||||
@Api(tags = "合并协议管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/bm_agreement_combine")
|
||||
public class BmAgreementCombineController extends BaseController
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private IBmAgreementCombineService agreementService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询标段工程管理列表
|
||||
*/
|
||||
@ApiOperation(value = "查询协议管理列表")
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BmAgreementCombine bmAgreement)
|
||||
{
|
||||
startPage();
|
||||
List<BmAgreementCombine> list = agreementService.selectBmAgreementList(bmAgreement);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "合并协议接口")
|
||||
@PostMapping("/combineAgreement")
|
||||
public AjaxResult combineAgreement(@RequestBody BmAgreementCombine bmAgreement) {
|
||||
int result = agreementService.combineProject(bmAgreement);
|
||||
return result > 0 ? success("合并成功") : error("合并失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.material.basic.domain;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 合并协议实体 bm_agreement
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class BmAgreementCombine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
private String tableName;
|
||||
|
||||
private String tableId;
|
||||
|
||||
private String proName;
|
||||
|
||||
private String unitName;
|
||||
|
||||
private String proId;
|
||||
|
||||
private String unitId;
|
||||
|
||||
private String agreementId;
|
||||
|
||||
private String agreementCode;
|
||||
|
||||
private String createBy;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private String oldProId;
|
||||
|
||||
private String oldUnitId;
|
||||
|
||||
private String newUnitId;
|
||||
|
||||
private String newProId;
|
||||
|
||||
private String oldAgreementId;
|
||||
|
||||
private String newAgreementId;
|
||||
|
||||
private List<String> oldAgreementIds;
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.bonus.material.basic.mapper;
|
||||
|
||||
import com.bonus.material.basic.domain.BmAgreementCombine;
|
||||
import com.bonus.material.basic.domain.BmProjectCombine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 合并协议管理Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
public interface BmAgreementCombineMapper
|
||||
{
|
||||
|
||||
|
||||
List<BmAgreementCombine> selectBmAgreementList(BmAgreementCombine bmAgreement);
|
||||
|
||||
List<BmAgreementCombine> selectBAIList(BmAgreementCombine bmAgreement);
|
||||
|
||||
void updateLAI(BmAgreementCombine bai);
|
||||
|
||||
void insertCombine(BmAgreementCombine bai);
|
||||
|
||||
List<BmAgreementCombine> selectLAIList(BmAgreementCombine bmAgreement);
|
||||
|
||||
List<BmAgreementCombine> selectLPDList(BmAgreementCombine bmAgreement);
|
||||
|
||||
void updateLPD(BmAgreementCombine bai);
|
||||
|
||||
List<BmAgreementCombine> selectTTAList(BmAgreementCombine bmAgreement);
|
||||
|
||||
void updateTTA(BmAgreementCombine bai);
|
||||
|
||||
void updateSAI(BmAgreementCombine bai);
|
||||
|
||||
List<BmAgreementCombine> selectSAIList(BmAgreementCombine bmAgreement);
|
||||
|
||||
List<BmAgreementCombine> selectPMCList(BmAgreementCombine bmAgreement);
|
||||
|
||||
void updatePMC(BmAgreementCombine bai);
|
||||
|
||||
List<BmAgreementCombine> selectPMIList(BmAgreementCombine bmAgreement);
|
||||
|
||||
void updatePMI(BmAgreementCombine bai);
|
||||
|
||||
void deleteBAI(BmAgreementCombine bai);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.bonus.material.basic.service;
|
||||
|
||||
import com.bonus.material.basic.domain.BmAgreementCombine;
|
||||
import com.bonus.material.basic.domain.BmProjectCombine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 标段工程管理Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
public interface IBmAgreementCombineService
|
||||
{
|
||||
|
||||
|
||||
List<BmAgreementCombine> selectBmAgreementList(BmAgreementCombine bmAgreement);
|
||||
|
||||
int combineProject(BmAgreementCombine bmAgreement);
|
||||
}
|
||||
|
|
@ -0,0 +1,204 @@
|
|||
package com.bonus.material.basic.service.impl;
|
||||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.domain.BmAgreementCombine;
|
||||
import com.bonus.material.basic.domain.BmProjectCombine;
|
||||
import com.bonus.material.basic.mapper.BmAgreementCombineMapper;
|
||||
import com.bonus.material.basic.mapper.BmProjectCombineMapper;
|
||||
import com.bonus.material.basic.service.IBmAgreementCombineService;
|
||||
import com.bonus.material.basic.service.IBmProjectCombineService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* 合并协议管理Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BmAgreementCombineServiceImpl implements IBmAgreementCombineService
|
||||
{
|
||||
@Resource
|
||||
private BmAgreementCombineMapper acMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<BmAgreementCombine> selectBmAgreementList(BmAgreementCombine bmAgreement) {
|
||||
return acMapper.selectBmAgreementList(bmAgreement);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int combineProject(BmAgreementCombine bmAgreement) {
|
||||
int res = 0;
|
||||
try {
|
||||
String createBy = SecurityUtils.getLoginUser().getUsername();
|
||||
|
||||
List<String> oldAgreementIds = bmAgreement.getOldAgreementIds();
|
||||
if(CollectionUtils.isEmpty(oldAgreementIds)){
|
||||
|
||||
}else{
|
||||
|
||||
//业务办理领料申请:lease_apply_info,修改oldProId-->newProId,oldUnitId--> newUnitId记录修改信息
|
||||
res= updateLAI(bmAgreement,createBy);
|
||||
//业务办理领料发布:lease_publish_details,修改oldProId-->newProId,oldUnitId--> newUnitId记录修改信息
|
||||
res= updateLPD(bmAgreement,createBy);
|
||||
//协议任务表tm_task_agreement修改oldAgreementId-->newAgreementId 记录修改信息
|
||||
res= updateTTA(bmAgreement,createBy);
|
||||
//协议领退明细表slt_agreement_info修改oldAgreementId-->newAgreementId 记录修改信息
|
||||
res= updateSAI(bmAgreement,createBy);
|
||||
//费用推送表project_month_costs 修改oldAgreementId-->newAgreementId 记录修改信息
|
||||
res= updatePMC(bmAgreement,createBy);
|
||||
//费用推送表project_month_info 修改oldAgreementId-->newAgreementId 记录修改信息
|
||||
res= updatePMI(bmAgreement,createBy);
|
||||
//查询协议表:bm_agreement_info,记录协议信息,删除需要合并的协议
|
||||
res= delBAI(bmAgreement,createBy);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("合并标段工程异常",e);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private int delBAI(BmAgreementCombine bmAgreement, String createBy) {
|
||||
List<BmAgreementCombine> baiList = acMapper.selectBAIList(bmAgreement);
|
||||
|
||||
|
||||
if (CollectionUtils.isNotEmpty(baiList)) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setOldAgreementId(bai.getAgreementId());
|
||||
bai.setNewAgreementId(bmAgreement.getAgreementId());
|
||||
acMapper.deleteBAI(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("bm_agreement_info");
|
||||
log.info("修改表:bm_agreement_info,删除AgreementId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private int updatePMI(BmAgreementCombine bmAgreement, String createBy) {
|
||||
List<BmAgreementCombine> baiList = acMapper.selectPMIList(bmAgreement);
|
||||
|
||||
|
||||
if (CollectionUtils.isNotEmpty(baiList)) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setNewAgreementId(bmAgreement.getAgreementId());
|
||||
acMapper.updatePMI(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("project_month_info");
|
||||
log.info("修改表:project_month_info,修改oldAgreementId-->newAgreementId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private int updatePMC(BmAgreementCombine bmAgreement, String createBy) {
|
||||
List<BmAgreementCombine> baiList = acMapper.selectPMCList(bmAgreement);
|
||||
|
||||
|
||||
if (CollectionUtils.isNotEmpty(baiList)) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setNewAgreementId(bmAgreement.getAgreementId());
|
||||
acMapper.updatePMC(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("project_month_costs");
|
||||
log.info("修改表:project_month_costs,修改oldAgreementId-->newAgreementId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private int updateSAI(BmAgreementCombine bmAgreement, String createBy) {
|
||||
List<BmAgreementCombine> baiList = acMapper.selectSAIList(bmAgreement);
|
||||
|
||||
|
||||
if (CollectionUtils.isNotEmpty(baiList)) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setNewAgreementId(bmAgreement.getAgreementId());
|
||||
acMapper.updateSAI(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("slt_agreement_info");
|
||||
log.info("修改表:slt_agreement_info,修改oldAgreementId-->newAgreementId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private int updateTTA(BmAgreementCombine bmAgreement, String createBy) {
|
||||
List<BmAgreementCombine> baiList = acMapper.selectTTAList(bmAgreement);
|
||||
|
||||
|
||||
if (CollectionUtils.isNotEmpty(baiList)) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setNewAgreementId(bmAgreement.getAgreementId());
|
||||
acMapper.updateTTA(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("tm_task_agreement");
|
||||
log.info("修改表:tm_task_agreement,修改oldAgreementId-->newAgreementId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private int updateLPD(BmAgreementCombine bmAgreement, String createBy) {
|
||||
List<BmAgreementCombine> baiList = acMapper.selectLPDList(bmAgreement);
|
||||
|
||||
baiList.removeIf(Objects::isNull);
|
||||
if (CollectionUtils.isNotEmpty(baiList) && baiList.size()>0) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setNewProId(bmAgreement.getProId());
|
||||
bai.setNewUnitId(bmAgreement.getUnitId());
|
||||
acMapper.updateLPD(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("lease_publish_details");
|
||||
log.info("修改表:lease_publish_details,修改oldProId-->newProId,oldUnitId-->newUnitId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
private int updateLAI(BmAgreementCombine bmAgreement, String createBy) {
|
||||
|
||||
List<BmAgreementCombine> baiList = acMapper.selectLAIList(bmAgreement);
|
||||
|
||||
baiList.removeIf(Objects::isNull);
|
||||
if (CollectionUtils.isNotEmpty(baiList) && baiList.size()>0) {
|
||||
for (BmAgreementCombine bai : baiList){
|
||||
bai.setNewProId(bmAgreement.getProId());
|
||||
bai.setNewUnitId(bmAgreement.getUnitId());
|
||||
acMapper.updateLAI(bai);
|
||||
bai.setCreateBy(createBy);
|
||||
bai.setTableId(bai.getId()+"");
|
||||
bai.setTableName("lease_apply_info");
|
||||
log.info("修改表:lease_apply_info,修改oldProId-->newProId,oldUnitId-->newUnitId,记录修改信息");
|
||||
acMapper.insertCombine(bai);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
|
|||
res= updateLAI(project,createBy);
|
||||
//业务办理领料申请:材料站领料申请:clz_lease_apply_info,修改oldProId-->newProId,记录修改信息
|
||||
res= updateCLAI(project,createBy);
|
||||
|
||||
//删除工程,记录修改信息
|
||||
res= updateDelFlag(project,createBy);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,202 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.basic.mapper.BmAgreementCombineMapper">
|
||||
<resultMap type="com.bonus.material.basic.domain.BmAgreementCombine" id="BmAcResult">
|
||||
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertCombine">
|
||||
insert into sys_combine_agreement
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="tableName != null">tab_name,</if>
|
||||
<if test="tableId != null and tableId != ''">tab_id,</if>
|
||||
<if test="oldProId != null">pre_pro_id,</if>
|
||||
<if test="newProId != null">new_pro_id,</if>
|
||||
<if test="oldUnitId != null">pre_unit_id,</if>
|
||||
<if test="newUnitId != null">new_unit_id,</if>
|
||||
<if test="oldAgreementId != null">pre_agreement_id,</if>
|
||||
<if test="newAgreementId != null">new_agreement_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
create_time,
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="tableName != null">#{tableName},</if>
|
||||
<if test="tableId != null">#{tableId},</if>
|
||||
<if test="oldProId != null and oldProId != ''">#{oldProId},</if>
|
||||
<if test="newProId != null">#{newProId},</if>
|
||||
<if test="oldUnitId != null">#{oldUnitId},</if>
|
||||
<if test="newUnitId != null">#{newUnitId},</if>
|
||||
<if test="oldAgreementId != null">#{oldAgreementId},</if>
|
||||
<if test="newAgreementId != null">#{newAgreementId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
now(),
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateLAI">
|
||||
update lease_apply_info set unit_id = #{newUnitId}, project_id = #{newProId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateLPD">
|
||||
update lease_publish_details set unit_id = #{newUnitId}, project_id = #{newProId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateTTA">
|
||||
update tm_task_agreement set agreement_id = #{newAgreementId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateSAI">
|
||||
update slt_agreement_info set agreement_id = #{newAgreementId} where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updatePMC">
|
||||
update project_month_costs set agreement_id = #{newAgreementId} where id = #{id}
|
||||
</update>
|
||||
<update id="updatePMI">
|
||||
update project_month_info set agreementId = #{newAgreementId} where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteBAI">
|
||||
delete from bm_agreement_info where agreement_id = #{oldAgreementId}
|
||||
|
||||
</delete>
|
||||
|
||||
<select id="selectBmAgreementList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
SELECT
|
||||
bai.agreement_id as agreementId,
|
||||
bai.agreement_code AS agreementCode,
|
||||
bai.unit_id as unitId,
|
||||
bai.project_id as proId,
|
||||
bu.unit_name as unitName,
|
||||
bp.pro_name as proName,
|
||||
bai.is_slt
|
||||
FROM
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN bm_unit bu on bai.unit_id = bu.unit_id
|
||||
LEFT JOIN bm_project bp on bai.project_id = bp.pro_id
|
||||
where 1 = 1
|
||||
<if test="proName != null and proName != ''"> and bp.pro_name like concat('%', #{proName}, '%')</if>
|
||||
<if test="unitName != null and unitName != ''"> and bu.unit_name like concat('%', #{unitName}, '%')</if>
|
||||
<if test="agreementCode != null and agreementCode != ''"> and bai.agreement_code = #{agreementCode}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBAIList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
select
|
||||
agreement_id as id,
|
||||
agreement_id as agreementId,
|
||||
project_id as oldProId,
|
||||
unit_id as unitId
|
||||
from
|
||||
bm_agreement_info
|
||||
where agreement_id in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectLAIList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
SELECT
|
||||
lai.id,
|
||||
lai.unit_id as oldUnitId,
|
||||
lai.project_id as oldProjectId
|
||||
FROM
|
||||
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN lease_apply_info lai on bai.unit_id = lai.unit_id and bai.project_id = lai.project_id
|
||||
|
||||
where bai.agreement_id in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY lai.id
|
||||
</select>
|
||||
|
||||
<select id="selectLPDList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
SELECT
|
||||
lpd.id,
|
||||
lpd.unit_id as oldUnitId,
|
||||
lpd.project_id as oldProjectId
|
||||
FROM
|
||||
|
||||
bm_agreement_info bai
|
||||
LEFT JOIN lease_publish_details lpd on bai.unit_id = lpd.unit_id and bai.project_id = lpd.project_id
|
||||
|
||||
where bai.agreement_id in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
GROUP BY lpd.id
|
||||
</select>
|
||||
|
||||
<select id="selectTTAList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
SELECT
|
||||
tta.id,
|
||||
tta.agreement_id as oldAgreementId
|
||||
FROM
|
||||
|
||||
tm_task_agreement tta
|
||||
|
||||
where tta.agreement_id in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectSAIList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
SELECT
|
||||
sai.id,
|
||||
sai.agreement_id as oldAgreementId
|
||||
FROM
|
||||
|
||||
slt_agreement_info sai
|
||||
|
||||
where sai.agreement_id in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectPMCList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
|
||||
|
||||
SELECT
|
||||
pmc.id,
|
||||
pmc.agreement_id as oldAgreementId
|
||||
FROM
|
||||
|
||||
project_month_costs pmc
|
||||
|
||||
where pmc.agreement_id in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectPMIList" resultType="com.bonus.material.basic.domain.BmAgreementCombine">
|
||||
SELECT
|
||||
pmi.id,
|
||||
pmi.agreementId as oldAgreementId
|
||||
FROM
|
||||
|
||||
project_month_info pmi
|
||||
|
||||
where pmi.agreementId in
|
||||
|
||||
<foreach item="item" collection="oldAgreementIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -2409,7 +2409,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
AND bp.external_id IS NOT NULL
|
||||
AND bu.type_id = 32
|
||||
AND bu.type_id in(32,33)
|
||||
<if test="impUnitName != null and impUnitName != ''">
|
||||
AND sd.dept_name like concat('%',#{impUnitName},'%')
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue