Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cdeeab88bc
|
|
@ -120,6 +120,8 @@ public class BackApplyInfoController extends BaseController {
|
|||
if (!result.isSuccess()) {
|
||||
return AjaxResult.error("SysFile文件服务上传失败:" + result.get("msg"));
|
||||
}
|
||||
//电子档案工程同步,第一次执行时间较长
|
||||
syncProject();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> jsonObject = (Map<String, Object>) result.get("data");
|
||||
|
|
@ -559,6 +561,7 @@ public class BackApplyInfoController extends BaseController {
|
|||
} catch (Exception e) {
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, new ArrayList<>()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -573,4 +576,27 @@ public class BackApplyInfoController extends BaseController {
|
|||
}
|
||||
|
||||
/** -------出门证结束------- */
|
||||
|
||||
|
||||
/**
|
||||
* 电子档案工程同步
|
||||
*/
|
||||
public void syncProject() {
|
||||
//1、查询未同步的工程信息
|
||||
List<BackApplyInfo> list = backApplyInfoService.selectNotSyncProject();
|
||||
if (list.size()>0){
|
||||
for (BackApplyInfo backApplyInfo : list){
|
||||
//2、将所有工程信息插入archives_record_info,并返回id
|
||||
backApplyInfoService.syncProject(backApplyInfo);
|
||||
if (backApplyInfo.getId()!=null){
|
||||
//3、将返回的每个id插入archives_record_details
|
||||
backApplyInfoService.syncProjectDetails(backApplyInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -507,4 +507,10 @@ public interface BackApplyInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
int delHandlingOrder(HandlingOrder bean);
|
||||
|
||||
List<BackApplyInfo> selectNotSyncProject();
|
||||
|
||||
int syncProject(BackApplyInfo backApplyInfo);
|
||||
|
||||
int syncProjectDetails(BackApplyInfo backApplyInfo2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,5 +242,12 @@ public interface IBackApplyInfoService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult delHandlingOrder(HandlingOrder bean);
|
||||
|
||||
|
||||
List<BackApplyInfo> selectNotSyncProject();
|
||||
|
||||
int syncProject(BackApplyInfo backApplyInfo);
|
||||
|
||||
int syncProjectDetails(BackApplyInfo backApplyInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2294,6 +2294,29 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BackApplyInfo> selectNotSyncProject() {
|
||||
return backApplyInfoMapper.selectNotSyncProject();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int syncProject(BackApplyInfo backApplyInfo) {
|
||||
return backApplyInfoMapper.syncProject(backApplyInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int syncProjectDetails(BackApplyInfo backApplyInfo) {
|
||||
BackApplyInfo backApplyInfo2 = new BackApplyInfo();
|
||||
backApplyInfo2.setId(backApplyInfo.getId());
|
||||
backApplyInfo2.setTypeName("领料单");
|
||||
backApplyInfoMapper.syncProjectDetails(backApplyInfo2);
|
||||
backApplyInfo2.setTypeName("退料单");
|
||||
backApplyInfoMapper.syncProjectDetails(backApplyInfo2);
|
||||
backApplyInfo2.setTypeName("业务联系单");
|
||||
backApplyInfoMapper.syncProjectDetails(backApplyInfo2);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理班组退料结算协议
|
||||
* @param record
|
||||
|
|
|
|||
|
|
@ -172,11 +172,7 @@ public class MachineController extends BaseController {
|
|||
@ApiOperation(value = "电子标签查询")
|
||||
@GetMapping("/getElectronicLabel")
|
||||
public AjaxResult getElectronicLabel(Machine machine) {
|
||||
try {
|
||||
return success(machineService.getElectronicLabel(machine));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
return machineService.getElectronicLabel(machine);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public interface IMachineService
|
|||
* @param machine
|
||||
* @return
|
||||
*/
|
||||
List<Machine> getElectronicLabel(Machine machine);
|
||||
AjaxResult getElectronicLabel(Machine machine);
|
||||
|
||||
/**
|
||||
* 根据标签信息查询出库单
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.material.ma.service.impl;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -207,8 +209,9 @@ public class MachineServiceImpl implements IMachineService
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Machine> getElectronicLabel(Machine machine) {
|
||||
public AjaxResult getElectronicLabel(Machine machine) {
|
||||
List<Machine> list = new ArrayList<>();
|
||||
int type = 0;
|
||||
try {
|
||||
if (machine.getDevType()==1){
|
||||
//查询ws_ma_info,工器具
|
||||
|
|
@ -217,6 +220,18 @@ public class MachineServiceImpl implements IMachineService
|
|||
//查询ma_machine表,安全工器具
|
||||
list = machineMapper.getElectronicLabel(machine);
|
||||
}
|
||||
for (Machine dto : list){
|
||||
Date nextCheckTime = dto.getNextCheckTime();
|
||||
Date todayStart = new Date(); // 获取当前时间
|
||||
// 将 todayStart 设置为当天的开始时间(00:00:00)
|
||||
todayStart = Date.from(todayStart.toInstant().atZone(ZoneId.systemDefault())
|
||||
.withHour(0).withMinute(0).withSecond(0).withNano(0)
|
||||
.toInstant());
|
||||
if (nextCheckTime != null && nextCheckTime.before(todayStart)) {
|
||||
type=1;
|
||||
throw new RuntimeException("该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!");
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (Machine dto : list) {
|
||||
|
|
@ -237,9 +252,13 @@ public class MachineServiceImpl implements IMachineService
|
|||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
return AjaxResult.success(list);
|
||||
} catch (Exception e){
|
||||
return new ArrayList<>();
|
||||
if (type==1){
|
||||
return AjaxResult.error("该工器具已临近下次检验时间,请及时退还至机具(物流)分公司!");
|
||||
} else {
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ public interface RepairApplyDetailsMapper {
|
|||
*/
|
||||
public int deleteRepairApplyDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量根据维修ID数组查询维修任务单号
|
||||
*/
|
||||
List<RepairAuditDetails> selectRepairCodeByIds(@Param("list") List<Long> list);
|
||||
|
||||
/**
|
||||
* 根据维修ID查询维修任务单号
|
||||
* @param repairId
|
||||
|
|
@ -102,6 +107,11 @@ public interface RepairApplyDetailsMapper {
|
|||
*/
|
||||
int updateRepairApplyDetailsAfterAudit(RepairAuditDetails dto);
|
||||
|
||||
/**
|
||||
* 批量修改repair_apply_record维修任务详情状态
|
||||
*/
|
||||
int updateRepairApplyDetailsAfterAuditBatch(@Param("list") List<RepairAuditDetails> list);
|
||||
|
||||
/**
|
||||
* 根据back_id获取最大level
|
||||
* @param backId
|
||||
|
|
|
|||
|
|
@ -603,21 +603,10 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
level = details.getLevel();
|
||||
}
|
||||
}
|
||||
/*if (Objects.nonNull(preTmTaskInfo) && Objects.nonNull(preTmTaskInfo.getPreTaskId())) {
|
||||
taskMapper.updateTaskStatus(String.valueOf(preTmTaskInfo.getPreTaskId()), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());
|
||||
}*/
|
||||
// 根据taskId查询维修审核明细
|
||||
final List<RepairAuditDetails> repairAuditDetailsByTaskId = repairAuditDetailsMapper.selectRepairAuditDetailsByTaskId(auditDetails.getTaskId());
|
||||
if (!CollectionUtils.isEmpty(repairAuditDetailsByTaskId)) {
|
||||
for (RepairAuditDetails repairAuditDetail : repairAuditDetailsByTaskId) {
|
||||
/*if ("1".equals(repairAuditDetail.getStatus()) || "2".equals(repairAuditDetail.getStatus())) {
|
||||
continue;
|
||||
}
|
||||
// 根据查询详情获取的维修ID,更新scrap_apply_details维修数量
|
||||
repairApplyDetailsMapper.updateRepairApplyDetailsAfterReject(
|
||||
ObjectUtils.defaultIfNull(repairAuditDetail.getRepairedNum(),0).longValue(),
|
||||
ObjectUtils.defaultIfNull(repairAuditDetail.getScrapNum(),0).longValue(), repairAuditDetail.getRepairId());
|
||||
repairApplyDetailsMapper.updateStatus(repairAuditDetail.getRepairId(), RepairTaskStatusEnum.TASK_STATUS_PROCESSING.getStatus());*/
|
||||
RepairTaskDetails repairTaskDetails = new RepairTaskDetails();
|
||||
repairTaskDetails.setNewTaskId(newTaskId);
|
||||
repairTaskDetails.setMaId(repairAuditDetail.getMaId() == null ? null : repairAuditDetail.getMaId().toString());
|
||||
|
|
@ -785,6 +774,12 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量插入维修明细
|
||||
* @param scrapApplyDetailList 报废明细
|
||||
* @param repairAuditDetailsByQuery 维修明细by查询
|
||||
* @param agreementId 协议ID
|
||||
*/
|
||||
private void batchInsertRepairInputDetails(List<ScrapApplyDetails> scrapApplyDetailList, List<RepairAuditDetails> repairAuditDetailsByQuery, Long agreementId) {
|
||||
boolean inputFlag = false;
|
||||
boolean scrapFlag = false;
|
||||
|
|
@ -803,7 +798,9 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
//插入修饰审核入库任务表
|
||||
Long newTaskId = null;
|
||||
if (inputFlag) {
|
||||
// 插入任务表
|
||||
newTaskId = insertTt();
|
||||
// 插入任务协议关联表
|
||||
insertTta(newTaskId, agreementId);
|
||||
}
|
||||
//插入报废任务表
|
||||
|
|
@ -813,11 +810,37 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
insertScrapTta(newScrapTaskId, agreementId);
|
||||
}
|
||||
final List<RepairInputDetails> inputList = new ArrayList<>();
|
||||
|
||||
List<RepairAuditDetails> dtoArray = new ArrayList<>();
|
||||
List<ScrapApplyDetails> listAll = new ArrayList<>();
|
||||
if (CollectionUtil.isNotEmpty(repairAuditDetailsByQuery)) {
|
||||
dtoArray = repairApplyDetailsMapper.selectRepairCodeByIds(repairAuditDetailsByQuery.stream().map(RepairAuditDetails::getRepairId).collect(Collectors.toList()));
|
||||
repairApplyDetailsMapper.updateRepairApplyDetailsAfterAuditBatch(repairAuditDetailsByQuery);
|
||||
listAll = scrapApplyDetailsMapper.selectScrapByTaskIdList(repairAuditDetailsByQuery);
|
||||
}
|
||||
|
||||
for (final RepairAuditDetails details : repairAuditDetailsByQuery) {
|
||||
RepairAuditDetails dto = repairApplyDetailsMapper.selectById(details.getRepairId());
|
||||
RepairAuditDetails dto;
|
||||
if (CollectionUtil.isEmpty(dtoArray)) {
|
||||
dto = repairApplyDetailsMapper.selectById(details.getRepairId());
|
||||
// 根据taskId修改repair_apply_record的status状态为已审核1
|
||||
repairApplyDetailsMapper.updateRepairApplyDetailsAfterAudit(dto);
|
||||
List<ScrapApplyDetails> list = scrapApplyDetailsMapper.selectScrapByTaskId(dto);
|
||||
} else {
|
||||
dto = dtoArray.stream().filter(dto1 -> dto1.getRepairId().equals(details.getRepairId())).findFirst().orElse(null);
|
||||
}
|
||||
|
||||
List<ScrapApplyDetails> list;
|
||||
if (CollectionUtil.isNotEmpty(listAll)) {
|
||||
list = listAll.stream().filter(item -> {
|
||||
if (dto != null) {
|
||||
return item.getTaskId().equals(dto.getTaskId());
|
||||
}
|
||||
return false;
|
||||
}).collect(Collectors.toList());
|
||||
} else {
|
||||
list = scrapApplyDetailsMapper.selectScrapByTaskId(dto);
|
||||
}
|
||||
|
||||
if (details.getRepairedNum().compareTo(BigDecimal.ZERO) > 0) {
|
||||
//修改机具状态为修试后待入库
|
||||
if (null != details.getMaId()) {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ public interface ScrapApplyDetailsMapper {
|
|||
*/
|
||||
List<ScrapApplyDetails> selectScrapByTaskId(RepairAuditDetails dto);
|
||||
|
||||
/**
|
||||
* 批量根据任务id数组查询报废详情
|
||||
*/
|
||||
List<ScrapApplyDetails> selectScrapByTaskIdList(@Param("list") List<RepairAuditDetails> list);
|
||||
|
||||
/**
|
||||
* 台账审核
|
||||
* @param scrapApplyDetails
|
||||
|
|
|
|||
|
|
@ -1445,9 +1445,6 @@ public class SltAgreementInfoController extends BaseController {
|
|||
@ApiOperation(value = "未结算报表list查询")
|
||||
@GetMapping("/getSltReportList")
|
||||
public TableDataInfo getSltReportList(SltAgreementInfo query) {
|
||||
// ----------- 定义返回集合 ------------
|
||||
List<SltInfoVo> resultList = new ArrayList<>();
|
||||
|
||||
try {
|
||||
// ----------- 查询列表 ---------------
|
||||
List<SltAgreementInfo> list = sltAgreementInfoService.getSltReportList(query);
|
||||
|
|
@ -1457,12 +1454,14 @@ public class SltAgreementInfoController extends BaseController {
|
|||
// 设置结算权限,控制展示
|
||||
list.forEach(info -> info.setSettlementType(settlementType));
|
||||
|
||||
// --------- 定义返回集合 ------------------
|
||||
List<SltInfoVo> dataList = new ArrayList<>();
|
||||
SltInfoVo bean = new SltInfoVo();
|
||||
// --------- 拿到list中所有的agreementId存成集合,给每个info赋值 ------------------
|
||||
List<Long> AgreementIdsArray = list.stream().map(SltAgreementInfo::getAgreementId).collect(Collectors.toList());
|
||||
|
||||
// 把每个对象的agreementId设置成集合,避免重复查询
|
||||
list.forEach(info -> {
|
||||
info.setAgreementIds(list.stream().map(SltAgreementInfo::getAgreementId).collect(Collectors.toList()));
|
||||
info.setAgreementIds(AgreementIdsArray);
|
||||
SltInfoVo vo = sltAgreementInfoService.getSltInfoReportBatch(info);
|
||||
if (vo != null && !ObjectUtil.isEmpty(vo)) {
|
||||
vo.setAgreementId(info.getAgreementId());
|
||||
|
|
|
|||
|
|
@ -796,6 +796,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time)
|
||||
values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now())
|
||||
</insert>
|
||||
<insert id="syncProject" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO archives_record_info
|
||||
(
|
||||
parent_id,`level`,archives_value,archives_name,del_flag,create_time
|
||||
) VALUES (
|
||||
'22','2',#{proId},#{proName},'0',NOW()
|
||||
)
|
||||
</insert>
|
||||
<insert id="syncProjectDetails">
|
||||
INSERT INTO archives_record_details
|
||||
(
|
||||
info_id,parent_id,`level`,doc_name,doc_type,del_flag,create_time
|
||||
) VALUES (
|
||||
#{id},'0','1',#{typeName},'文件夹','0',NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="deleteBackApply">
|
||||
delete from back_apply_info where id = #{id}
|
||||
|
|
@ -1558,4 +1574,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_user su
|
||||
where su.user_id = 474 and su.del_flag = 0
|
||||
</select>
|
||||
<select id="selectNotSyncProject" resultType="com.bonus.material.back.domain.BackApplyInfo">
|
||||
SELECT
|
||||
pro_id as proId,
|
||||
pro_name as proName
|
||||
FROM
|
||||
bm_project
|
||||
WHERE
|
||||
del_flag='0'
|
||||
and pro_id not in (
|
||||
SELECT
|
||||
archives_value
|
||||
FROM
|
||||
archives_record_info
|
||||
WHERE
|
||||
parent_id='22'
|
||||
and archives_value is not null
|
||||
)
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -490,8 +490,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mi.ma_name as materialName,
|
||||
mi.ma_model as materialModel,
|
||||
mi.ma_code as maCode,
|
||||
mi.this_check_time as thisCheckTime,
|
||||
mi.next_check_time as nextCheckTime,
|
||||
LEFT(mi.this_check_time, 10) AS thisCheckTime,
|
||||
LEFT(mi.next_check_time, 10) AS nextCheckTime,
|
||||
mi.repair_man as repairMan,
|
||||
mi.check_man as checkMan,
|
||||
mi.phone,
|
||||
|
|
@ -500,15 +500,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
'1' as devType
|
||||
FROM
|
||||
ws_ma_info mi
|
||||
WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1 and DATEDIFF(mi.next_check_time,NOW()) > 0
|
||||
WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1
|
||||
UNION
|
||||
SELECT
|
||||
mm.ma_id AS id,
|
||||
mt2.type_name as maName,
|
||||
mt.type_name as maModel,
|
||||
mm.ma_code as maCode,
|
||||
mm.this_check_time as thisCheckTime,
|
||||
mm.next_check_time as nextCheckTime,
|
||||
LEFT(mm.this_check_time, 10) AS thisCheckTime,
|
||||
LEFT(mm.next_check_time, 10) AS nextCheckTime,
|
||||
mm.check_man as repairMan,
|
||||
ifnull(mm.inspect_man,"高民") as checkMan,
|
||||
"0551-63703966" as phone,
|
||||
|
|
@ -518,7 +518,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM ma_machine mm
|
||||
LEFT JOIN ma_type mt on mm.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||
WHERE mm.ma_code LIKE CONCAT('%',#{maCode},'%') and mt.MANAGE_TYPE =0 and DATEDIFF(mm.next_check_time,NOW()) > 0
|
||||
WHERE mm.ma_code LIKE CONCAT('%',#{maCode},'%') and mt.MANAGE_TYPE =0
|
||||
</select>
|
||||
|
||||
<delete id="deleteMachineByMaCodeAndTypeId">
|
||||
|
|
|
|||
|
|
@ -260,4 +260,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectRepairCodeByIds" resultType="com.bonus.material.repair.domain.RepairAuditDetails">
|
||||
select
|
||||
id as repairId,
|
||||
task_id as taskId,
|
||||
type_id as typeId,
|
||||
ma_id as maId,
|
||||
level as level
|
||||
from repair_apply_details
|
||||
where id in
|
||||
<foreach item="id" collection="list" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<update id="updateRepairApplyDetailsAfterAuditBatch">
|
||||
update repair_apply_record
|
||||
set status = 1,
|
||||
update_time = NOW()
|
||||
where task_id in
|
||||
<foreach item="obj" collection="list" open="(" separator="," close=")">
|
||||
#{obj.taskId}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -579,4 +579,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND m.type_id = #{typeId}
|
||||
</select>
|
||||
|
||||
<select id="selectScrapByTaskIdList" resultType="com.bonus.material.scrap.domain.ScrapApplyDetails">
|
||||
SELECT
|
||||
task_id AS taskId,
|
||||
ma_id AS maId,
|
||||
type_id AS typeId,
|
||||
GROUP_CONCAT(DISTINCT scrap_reason) AS scrapReason,
|
||||
GROUP_CONCAT(DISTINCT scrap_type) AS scrapType,
|
||||
GROUP_CONCAT(DISTINCT create_by) AS createBy
|
||||
FROM repair_apply_record rc
|
||||
WHERE rc.repair_type = '3'
|
||||
<if test="list != null and list.size > 0">
|
||||
AND (
|
||||
<foreach collection="list" item="t" separator=" OR ">
|
||||
(
|
||||
rc.task_id = #{t.taskId}
|
||||
AND rc.type_id = #{t.typeId}
|
||||
<if test="t.maId != null">
|
||||
AND rc.ma_id = #{t.maId}
|
||||
</if>
|
||||
<if test="t.maId == null">
|
||||
AND rc.ma_id IS NULL
|
||||
</if>
|
||||
)
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
GROUP BY rc.task_id, rc.ma_id, rc.type_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -197,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id
|
||||
LEFT JOIN slt_agreement_apply saa on saa.agreement_id = bai.agreement_id
|
||||
where bai.status = '1' AND bui.type_id != '1731'
|
||||
<if test="unitIds != null">
|
||||
<if test="unitIds != null and unitIds.size() > 0">
|
||||
and bui.unit_id in
|
||||
<foreach item="item" index="index" collection="unitIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
|
|
@ -209,6 +209,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="sltStatus != null">
|
||||
and bai.is_slt = #{sltStatus}
|
||||
</if>
|
||||
<if test="agreementCode != null">
|
||||
and bai.agreement_code like concat('%',#{agreementCode},'%')
|
||||
</if>
|
||||
GROUP BY bai.agreement_id
|
||||
ORDER BY bai.create_time desc
|
||||
<!-- <choose>-->
|
||||
|
|
@ -855,6 +858,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="sltStatus != null">
|
||||
and bai.is_slt = #{sltStatus}
|
||||
</if>
|
||||
<if test="agreementCode != null and agreementCode != ''">
|
||||
and bai.agreement_code = #{agreementCode}
|
||||
</if>
|
||||
GROUP BY bai.agreement_id
|
||||
ORDER BY bai.create_time desc
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue