Commit 2cb57cdb authored by 韩桐桐's avatar 韩桐桐

fix(jg):单位变更列表查询修改

parent 8af3eaac
......@@ -146,6 +146,15 @@ public class JgChangeRegistrationUnitDto extends BaseDto {
@ApiModelProperty(value = "分类")
private String equList;
@ApiModelProperty(value = "设备类别")
private String equCategory;
@ApiModelProperty(value = "设备品种")
private String equDefine;
@ApiModelProperty(value = "96333识别码")
private String code96333;
@ApiModelProperty(value = "转办人")
private String transferToUserIds;
......
......@@ -215,11 +215,29 @@ public class JgChangeRegistrationUnit extends BaseEntity {
@TableField("equ_address")
private String equAddress;
/**
* 设备详细地址
*/
@TableField(exist = false)
private String detailedAddress;
@TableField(exist = false)
private String supervisoryCode;
/**
* 96333识别码
*/
@TableField(exist = false)
private String code96333;
@TableField(exist = false)
private String equList;
/**
* 设备品种
*/
@TableField(exist = false)
private String equDefine;
/**
*工作流下一节点任务id
*/
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationUnit;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
......@@ -28,7 +29,13 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表
*/
Page<JgChangeRegistrationUnit> queryForPage(Page<JgChangeRegistrationUnit> page, @Param("param") JgChangeRegistrationUnitDto model, @Param("type") String type, @Param("orgCode") String orgCode , @Param("roleIds") List<String> roleIds , @Param("currentUserId") String currentUserId);
Page<JgChangeRegistrationUnit> queryForPage(Page<JgChangeRegistrationUnit> page,
@Param("sort") SortVo sortMap,
@Param("param") JgChangeRegistrationUnitDto model,
@Param("type") String type,
@Param("orgCode") String orgCode ,
@Param("roleIds") List<String> roleIds ,
@Param("currentUserId") String currentUserId);
/**
* 根据安装告知编号查询设备、设计、制造等信息
......
......@@ -43,7 +43,11 @@ public interface IJgChangeRegistrationUnitService {
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表
*/
Page<JgChangeRegistrationUnitDto> queryForJgChangeRegistrationUnitPage(Page<JgChangeRegistrationUnit> page, JgChangeRegistrationUnitDto model, String type, ReginParams reginParams);
Page<JgChangeRegistrationUnitDto> queryForJgChangeRegistrationUnitPage(Page<JgChangeRegistrationUnit> page,
String sort,
JgChangeRegistrationUnitDto model,
String type,
ReginParams reginParams);
/**
* 批量删除
......
......@@ -10,12 +10,10 @@
isn.use_unit_name AS useUnitName,
isn.receive_org_name AS receiveOrgName,
isn.new_use_unit_name AS newUseUnitName,
isn.equ_address AS equAddress,
isn.product_name_b AS productNameB,
isn.equ_code_b AS equCodeB,
isn.use_inner_code AS useInnerCode,
isn.use_regist_code AS useRegistCode,
isn.apply_date AS applyDate,
isn.status AS status,
isn.instance_id AS instanceId,
isn.promoter,
......@@ -25,9 +23,19 @@
isn.equ_type AS equType,
isn.next_execute_user_ids as nextExecuteUserIds,
isn.next_task_id as nextTaskId,
isn.create_user_id as createUserId
isn.create_user_id as createUserId,
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.CODE96333 as code96333,
ibjui."ADDRESS" as detailedAddress,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equList,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") AS equAddress
FROM
tzs_jg_change_registration_unit isn
LEFT JOIN tzs_jg_change_registration_unit re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_other_info oi ON oi.RECORD = re.equ_id
<where>
isn.is_delete = false
<if test="param != null ">
......@@ -43,8 +51,46 @@
<if test="param.status != null and param.status != ''">
AND isn.status = #{param.status}
</if>
<if test="param.useUnitCreditCode != null and param.useUnitCreditCode != ''">
AND isn.use_unit_credit_code = #{param.useUnitCreditCode}
</if>
<if test="param.newUseUnitCreditCode != null and param.newUseUnitCreditCode != ''">
AND isn.new_use_unit_credit_code = #{param.newUseUnitCreditCode}
</if>
<if test="param.equCodeB != null and param.equCodeB != ''">
AND isn.equ_code_b = #{param.equCodeB}
AND isn.equ_code_b like concat('%',#{param.equCodeB},'%')
</if>
<if test="param.receiveCompanyCode != null and param.receiveCompanyCode != ''">
AND isn.receive_company_code = #{param.receiveCompanyCode}
</if>
<if test="param.applyDate != null and param.applyDate != ''">
AND isn.apply_date like concat('%',DATE_FORMAT(#{param.applyDate},'%Y-%m-%d'),'%')
</if>
<if test="param.useRegistCode != null and param.useRegistCode != ''">
AND isn.use_regist_code like concat('%',#{param.useRegistCode},'%')
</if>
<if test="param.equList != null and param.equList != ''">
AND ri.EQU_LIST = #{param.equList}
</if>
<if test="param.equCategory != null and param.equCategory != ''">
AND ri.EQU_CATEGORY = #{param.equCategory}
</if>
<if test="param.equDefine != null and param.equDefine != ''">
AND ri.EQU_DEFINE = #{param.equDefine}
</if>
<if test="param.code96333 != null and param.code96333 != ''">
AND oi.CODE96333 like concat('%',#{param.code96333},'%')
</if>
<if test="param.supervisoryCode != null and param.supervisoryCode != ''">
AND oi.SUPERVISORY_CODE like concat('%',#{param.supervisoryCode},'%')
</if>
<if test="param.equAddress != null and param.equAddress != ''">
AND (
ibjui."PROVINCE_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."CITY_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."COUNTY_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."STREET_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
)
</if>
</if>
<if test="type == 'supervision'">
......@@ -61,6 +107,9 @@
</if>
</where>
ORDER BY
<if test="sort != null">
isn.${sort.field} ${sort.sortType},
</if>
isn.create_date DESC, isn.apply_no DESC
</select>
......
......@@ -149,6 +149,7 @@ public class JgChangeRegistrationUnitController extends BaseController {
@ApiParam(value = "当前页码", required = true) @RequestParam(value = "current", defaultValue = "1") int current,
@ApiParam(value = "每页大小", required = true) @RequestParam(value = "size", defaultValue = "20") int size,
@ApiParam(value = "类型:enterprise-企业端、supervision-监管端", required = true) @RequestParam(value = "type", defaultValue = "enterprise") String type,
@ApiParam(value = "排序字段",required = false) @RequestParam(value = "sort",required = false) String sort,
@RequestBody(required = false) JgChangeRegistrationUnitDto model
) {
Page<JgChangeRegistrationUnit> page = new Page<>(current, size);
......@@ -159,7 +160,7 @@ public class JgChangeRegistrationUnitController extends BaseController {
}else {
type = "supervision";
}
return ResponseHelper.buildResponse(jgChangeRegistrationUnitServiceImpl.queryForJgChangeRegistrationUnitPage(page, model, type, reginParams));
return ResponseHelper.buildResponse(jgChangeRegistrationUnitServiceImpl.queryForJgChangeRegistrationUnitPage(page,sort, model, type, reginParams));
}
/**
......
......@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationUnitService;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
......@@ -337,13 +338,18 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
* @return 单位变更列表
*/
@Override
public Page<JgChangeRegistrationUnitDto> queryForJgChangeRegistrationUnitPage(Page<JgChangeRegistrationUnit> page, JgChangeRegistrationUnitDto model, String type, ReginParams reginParams) {
public Page<JgChangeRegistrationUnitDto> queryForJgChangeRegistrationUnitPage(Page<JgChangeRegistrationUnit> page,
String sort,
JgChangeRegistrationUnitDto model,
String type,
ReginParams reginParams) {
String orgCode;
orgCode = reginParams.getCompany().getCompanyCode();
String companyType = reginParams.getCompany().getCompanyType();
String currentUserId = reginParams.getUserModel().getUserId();
Page<JgChangeRegistrationUnit> noticePage = JgChangeRegistrationUnitMapper.queryForPage(page, model, type, orgCode, model.getRoleIds(),currentUserId);
SortVo sortMap = commonServiceImpl.sortFieldConversion(sort);
Page<JgChangeRegistrationUnit> noticePage = JgChangeRegistrationUnitMapper.queryForPage(page,sortMap, model, type, orgCode, model.getRoleIds(),currentUserId);
Page<JgChangeRegistrationUnitDto> noticeDtoPage = new Page<>();
BeanUtils.copyProperties(noticePage, noticeDtoPage, "records");
......
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