Commit 29801619 authored by tianyiming's avatar tianyiming

两员配备-企业两员配备情况查询更新

parent 7ff006e3
...@@ -14,11 +14,17 @@ ...@@ -14,11 +14,17 @@
and unit_type like concat('%',#{companyDto.unitType},'%') and unit_type like concat('%',#{companyDto.unitType},'%')
</if> </if>
<if test="companyDto.useUnit != '' and companyDto.useUnit != null"> <if test="companyDto.useUnit != '' and companyDto.useUnit != null">
and unit_unit like concat('%',#{companyDto.useUnit},'%') and use_unit like concat('%',#{companyDto.useUnit},'%')
</if> </if>
<if test="companyDto.useCode != '' and companyDto.useCode != null"> <if test="companyDto.useCode != '' and companyDto.useCode != null">
and use_code like concat('%',#{companyDto.useCode},'%') and use_code like concat('%',#{companyDto.useCode},'%')
</if> </if>
<if test="companyDto.completeNormal != '' and companyDto.completeNormal == 1 ">
and (useDone = '1' or productDone = '1')
</if>
<if test="companyDto.completeNormal != '' and companyDto.completeNormal == 0 ">
and useDone = '0' and productDone = '0'
</if>
</select> </select>
<select id="getListByOrgCode" resultType="com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing"> <select id="getListByOrgCode" resultType="com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing">
......
...@@ -75,29 +75,31 @@ public class TzsTwoStaffingServiceImpl extends BaseService<TzsTwoStaffingDto, Tz ...@@ -75,29 +75,31 @@ public class TzsTwoStaffingServiceImpl extends BaseService<TzsTwoStaffingDto, Tz
Page<TzsTwoStaffingCompanyDto> companyList = tzsTwoStaffingMapper.getCompanyList(page, companyDto, orgCode); Page<TzsTwoStaffingCompanyDto> companyList = tzsTwoStaffingMapper.getCompanyList(page, companyDto, orgCode);
companyList.getRecords().stream().map(item -> { if(!ObjectUtils.isEmpty(companyList.getRecords())){
for (TzsTwoStaffingCompanyDto item : companyList.getRecords()) {
if (item.getUnitType().contains("使用单位") && (item.getUnitType().contains("充装单位")
|| item.getUnitType().contains("安装改造维修单位")
|| item.getUnitType().contains("制造单位")
|| item.getUnitType().contains("设计单位"))) {
item.setCompleteNormal(Integer.valueOf(item.getAllDone()) == 1 ? "是" : "否");
continue;
}
if (item.getUnitType().contains("使用单位")) { if (item.getUnitType().contains("使用单位")) {
item.setCompleteNormal(Integer.valueOf(item.getUseDone()) > 1 ? "是" : "否"); item.setCompleteNormal(Integer.valueOf(item.getUseDone()) == 1 ? "是" : "否");
continue;
} }
if (item.getUnitType().contains("充装单位") if (item.getUnitType().contains("充装单位")
|| item.getUnitType().contains("安装改造维修单位") || item.getUnitType().contains("安装改造维修单位")
|| item.getUnitType().contains("制造单位") || item.getUnitType().contains("制造单位")
|| item.getUnitType().contains("设计单位")) { || item.getUnitType().contains("设计单位")) {
item.setCompleteNormal(Integer.valueOf(item.getProductDone()) > 1 ? "是" : "否"); item.setCompleteNormal(Integer.valueOf(item.getProductDone()) == 1 ? "是" : "否");
continue;
}
} }
if (item.getUnitType().contains("使用单位") && (item.getUnitType().contains("充装单位")
|| item.getUnitType().contains("安装改造维修单位")
|| item.getUnitType().contains("制造单位")
|| item.getUnitType().contains("设计单位"))) {
item.setCompleteNormal(Integer.valueOf(item.getAllDone()) > 1 ? "是" : "否");
} }
return item;
});
return companyList; return companyList;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment