工程合并及结算维修单号修改

This commit is contained in:
bonus 2025-09-23 19:16:54 +08:00
parent b2d7d082f0
commit 5f4d9a9226
12 changed files with 106 additions and 26 deletions

View File

@ -46,13 +46,16 @@ public class BmProjectCombineController extends BaseController
/**
* 查询工程列表
* 查询标段工程管理列表
*/
@ApiOperation(value = "查询工程列表")
@ApiOperation(value = "查询标段工程管理列表")
@GetMapping("/list")
public AjaxResult list(BmProjectCombine project) {
List<BmProjectCombine> list = bmProjectService.selectProInfoList(project);
return AjaxResult.success(list);
public TableDataInfo list(BmProjectCombine bmProject)
{
startPage();
List<BmProjectCombine> list = bmProjectService.selectBmProjectList(bmProject);
return getDataTable(list);
}
@ApiOperation(value = "合并工程接口")

View File

@ -33,4 +33,6 @@ public interface BmProjectCombineMapper
List<BmProjectCombine> selectCLAIList(BmProjectCombine oldProject);
void updateCLAI(BmProjectCombine bai);
void updateDelFlag(BmProjectCombine bai);
}

View File

@ -15,7 +15,8 @@ import java.util.List;
public interface IBmProjectCombineService
{
List<BmProjectCombine> selectProInfoList(BmProjectCombine project);
int combineProject(BmProjectCombine project);
List<BmProjectCombine> selectBmProjectList(BmProjectCombine bmProject);
}

View File

@ -27,7 +27,7 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
@Override
public List<BmProjectCombine> selectProInfoList(BmProjectCombine project) {
public List<BmProjectCombine> selectBmProjectList(BmProjectCombine project) {
return projectMapper.selectProInfoList(project);
}
@ -49,6 +49,10 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
res= updateLAI(project,createBy);
//业务办理领料申请材料站领料申请clz_lease_apply_info修改oldProId-->newProId,记录修改信息
res= updateCLAI(project,createBy);
res= updateDelFlag(project,createBy);
}
}catch (Exception e){
@ -57,6 +61,18 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
return res;
}
private int updateDelFlag(BmProjectCombine project, String createBy) {
List<String> oldProIds = project.getOldProIds();
for (String oldProId : oldProIds){
BmProjectCombine bai = new BmProjectCombine();
bai.setOldProId(Long.valueOf(oldProId));
projectMapper.updateDelFlag(bai);
}
return 1;
}
private int updateCLAI(BmProjectCombine oldProject, String createBy) {
List<BmProjectCombine> baiList = projectMapper.selectCLAIList(oldProject);
if (CollectionUtils.isNotEmpty(baiList)) {
@ -64,9 +80,11 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
bai.setNewProId(oldProject.getNewProId());
projectMapper.updateCLAI(bai);
bai.setCreateBy(createBy);
bai.setTableId(bai.getId());
bai.setTableName("clz_lease_apply_info");
log.info("修改表clz_lease_apply_info修改oldProId-->newProId,记录修改信息");
projectMapper.insertCombine(bai);
}
}
return 1;
@ -79,6 +97,7 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
bai.setNewProId(oldProject.getNewProId());
projectMapper.updateLAI(bai);
bai.setCreateBy(createBy);
bai.setTableId(bai.getId());
bai.setTableName("lease_apply_info");
log.info("修改表lease_apply_info修改oldProId-->newProId,记录修改信息");
projectMapper.insertCombine(bai);
@ -94,6 +113,7 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
bai.setNewProId(oldProject.getNewProId());
projectMapper.updateCBAI(bai);
bai.setCreateBy(createBy);
bai.setTableId(bai.getId());
bai.setTableName("clz_bm_agreement_info");
log.info("修改表clz_bm_agreement_info修改oldProId-->newProId,记录修改信息");
projectMapper.insertCombine(bai);
@ -109,6 +129,7 @@ public class BmProjectCombineServiceImpl implements IBmProjectCombineService
bai.setNewProId(oldProject.getNewProId());
projectMapper.updateBAI(bai);
bai.setCreateBy(createBy);
bai.setTableId(bai.getId());
bai.setTableName("bm_agreement_info");
log.info("修改表bm_agreement_info修改oldProId-->newProId,记录修改信息");
projectMapper.insertCombine(bai);

View File

@ -19,6 +19,8 @@ import com.bonus.material.clz.domain.BmTeam;
import com.bonus.material.clz.domain.machine.MaterialStorageInfo;
import com.bonus.material.clz.mapper.MaterialMachineMapper;
import com.bonus.material.clz.service.MaterialMachineService;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.model.LoginUser;
import lombok.extern.slf4j.Slf4j;
import org.hibernate.validator.internal.util.StringHelper;
import org.springframework.stereotype.Service;
@ -310,6 +312,8 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
return list;
}
/**
* 班组预警详情查询
* @param bean

View File

@ -58,7 +58,7 @@ import java.util.ArrayList;
/**
* 结算信息Controller
*
*
* @author xsheng
* @date 2024-10-16
*/
@ -1458,6 +1458,17 @@ public class SltAgreementInfoController extends BaseController {
public AjaxResult submitCosts(@RequestBody SltInfoVo sltInfoVo) {
return toAjax(sltAgreementInfoService.submitCosts(sltInfoVo));
}
/**
* 维修单据查询
*/
@ApiOperation(value = "维修报表list查询")
@GetMapping("/viewRepairCode")
public TableDataInfo viewRepairCode(SltAgreementInfo bean) {
startPage();
List<SltAgreementInfo> list = sltAgreementInfoService.getRepairCodeList(bean);
return getDataTable(list);
}
/**
* 结算审批列表

View File

@ -248,4 +248,8 @@ public class SltAgreementInfo extends BaseEntity {
private String leaseStyle;
private String source;
private String repairCode;
}

View File

@ -18,14 +18,14 @@ import org.apache.ibatis.annotations.Param;
/**
* 结算信息Mapper接口
*
*
* @author xsheng
* @date 2024-10-16
*/
public interface SltAgreementInfoMapper {
/**
* 查询结算信息
*
*
* @param id 结算信息主键
* @return 结算信息
*/
@ -41,7 +41,7 @@ public interface SltAgreementInfoMapper {
/**
* 查询结算信息列表
*
*
* @param sltAgreementInfo 结算信息
* @return 结算信息集合
*/
@ -49,7 +49,7 @@ public interface SltAgreementInfoMapper {
/**
* 新增结算信息
*
*
* @param sltAgreementInfo 结算信息
* @return 结果
*/
@ -57,7 +57,7 @@ public interface SltAgreementInfoMapper {
/**
* 修改结算信息
*
*
* @param sltAgreementInfo 结算信息
* @return 结果
*/
@ -65,7 +65,7 @@ public interface SltAgreementInfoMapper {
/**
* 删除结算信息
*
*
* @param id 结算信息主键
* @return 结果
*/
@ -73,7 +73,7 @@ public interface SltAgreementInfoMapper {
/**
* 批量删除结算信息
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
@ -293,4 +293,6 @@ public interface SltAgreementInfoMapper {
* @return 冲账记录
*/
List<PeriodCostResultVo> selectPeriodCostListForCharge(PeriodCostQueryDto queryDto);
List<SltAgreementInfo> getRepairCodeList(SltAgreementInfo bean);
}

View File

@ -15,14 +15,14 @@ import com.bonus.material.settlement.domain.vo.PeriodCostSummaryVo;
/**
* 结算信息Service接口
*
*
* @author xsheng
* @date 2024-10-16
*/
public interface ISltAgreementInfoService {
/**
* 查询结算信息
*
*
* @param id 结算信息主键
* @return 结算信息
*/
@ -30,7 +30,7 @@ public interface ISltAgreementInfoService {
/**
* 查询结算信息列表
*
*
* @param sltAgreementInfo 结算信息
* @return 结算信息集合
*/
@ -59,7 +59,7 @@ public interface ISltAgreementInfoService {
/**
* 新增结算信息
*
*
* @param sltAgreementInfo 结算信息
* @return 结果
*/
@ -67,7 +67,7 @@ public interface ISltAgreementInfoService {
/**
* 修改结算信息
*
*
* @param sltAgreementInfo 结算信息
* @return 结果
*/
@ -75,7 +75,7 @@ public interface ISltAgreementInfoService {
/**
* 批量删除结算信息
*
*
* @param ids 需要删除的结算信息主键集合
* @return 结果
*/
@ -83,7 +83,7 @@ public interface ISltAgreementInfoService {
/**
* 删除结算信息信息
*
*
* @param id 结算信息主键
* @return 结果
*/
@ -177,4 +177,7 @@ public interface ISltAgreementInfoService {
* @return 区间费用汇总结果列表
*/
List<PeriodCostSummaryVo> selectPeriodCostSummary(PeriodCostQueryDto queryDto);
List<SltAgreementInfo> getRepairCodeList(SltAgreementInfo bean);
}

View File

@ -1532,6 +1532,13 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
}
}
@Override
public List<SltAgreementInfo> getRepairCodeList(SltAgreementInfo bean) {
return sltAgreementInfoMapper.getRepairCodeList(bean);
}
/**
* 按协议汇总费用数据
*

View File

@ -13,8 +13,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bp.external_id AS extendId ,
bp.pro_code as proCode
from bm_project bp
WHERE 1=1
WHERE
bp.del_flag = 0
<if test="proName != null and proName != ''"> and pro_name like concat('%', #{proName}, '%')</if>
<if test="proCode != null and proName != ''"> and pro_code like concat('%', #{proCode}, '%')</if>
<if test="extendId != null and extendId != ''"> and external_id = #{extendId}</if>
</select>
@ -38,8 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertCombine">
insert into sys_combine_project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tableName != null">table_name,</if>
<if test="tableId != null and tableId != ''">table_id,</if>
<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="createBy != null">create_by,</if>
@ -103,4 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateCLAI">
update clz_lease_apply_info set project_id = #{newProId} where id = #{id}
</update>
<update id="updateDelFlag">
update bm_project set del_flag = 1 where pro_id = #{oldProId}
</update>
</mapper>

View File

@ -1347,4 +1347,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="getRepairCodeList" resultType="com.bonus.material.settlement.domain.SltAgreementInfo">
select
tt.task_id as taskId,
tt.code as repairCode,
tt.task_type as taskType,
sdd.dict_label as repairStatus
from tm_task tt
left join tm_task_agreement tta on tta.task_id = tt.task_id
left join sys_dict_data sdd on sdd.dict_value = tt.task_status and sdd.dict_type = 'repair_task_status'
where tta.agreement_id = #{agreementId} and tt.task_type = 4 and tt.task_status != 1
<if test="repairCode != null">
and tt.code like concat('%', #{repairCode}, '%')
</if>
</select>
</mapper>