Commit 8a45bb77 authored by 刘林's avatar 刘林

fix(jg):使用登记暂存分页查询

parent 89455d24
......@@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.dto.ReminderItemDto;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.RegistrationVo;
......@@ -132,4 +129,6 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
List<ReminderItemDto> queryForUnitVehiclePageForReminder(@Param("records") List<String> records);
Page<JgNoticeToBeSubmitDto> queryRegistrationToBeSubmitPage(@Param("page") Page<JgNoticeToBeSubmitDto> page, @Param("companyCode")String companyCode);
}
......@@ -1535,4 +1535,130 @@
#{record}
</foreach>
</select>
<select id="queryRegistrationToBeSubmitPage"
resultType="com.yeejoin.amos.boot.module.jg.api.dto.JgNoticeToBeSubmitDto">
SELECT
ur.sequence_nbr AS sequenceNbr,
'使用登记' AS businessType,
ur.apply_no AS applyNo,
ec1. NAME AS equListName,
ur.receive_org_name AS receiveOrgName,
CASE ur.status WHEN '6610' THEN '待提交' ELSE ur.status END AS status,
DATE_FORMAT (ur.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq ure ON ur.sequence_nbr = ure.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON ri."RECORD" = ure.equ_id
LEFT JOIN tz_equipment_category ec1 ON ec1.code = ri."EQU_LIST"
LEFT JOIN tz_equipment_category ec2 ON ec2.code = ri."EQU_CATEGORY"
WHERE
ur.is_delete = FALSE
AND ur.status = '使用单位待提交'
AND ur.use_unit_credit_code = #{companyCode}
UNION ALL
SELECT
cru.sequence_nbr AS sequenceNbr,
'单位变更登记' AS businessType,
cru.apply_no AS applyNo,
cru.equ_list AS equListName,
cru.receive_org_name AS receiveOrgName,
CASE cru.status WHEN '6610' THEN '待提交' ELSE cru.status END AS status,
DATE_FORMAT (cru.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_change_registration_unit cru
WHERE
cru.is_delete = FALSE
AND cru.status = '使用单位待提交'
AND cru.use_unit_credit_code = #{companyCode}
UNION ALL
SELECT
crr.sequence_nbr AS sequenceNbr,
'改造变更登记' AS businessType,
crr.apply_no AS applyNo,
crr.equip_list_name AS equListName,
crr.receive_org_name AS receiveOrgName,
CASE crr.status WHEN '6610' THEN '待提交' ELSE crr.status END AS status,
DATE_FORMAT (crr.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_change_registration_reform crr
WHERE
crr.is_delete = FALSE
AND crr.status = '使用单位待提交'
AND crr.use_unit_credit_code = #{companyCode}
UNION ALL
SELECT
crt.sequence_nbr AS sequenceNbr,
'移装变更登记' AS businessType,
crt.apply_no AS applyNo,
crt.equip_list_name AS equListName,
crt.receive_org_name AS receiveOrgName,
CASE crt.status WHEN '6610' THEN '待提交' ELSE crt.status END AS status,
DATE_FORMAT (crt.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_change_registration_transfer crt
WHERE
crt.is_delete = FALSE
AND crt.status = '使用单位待提交'
AND crt.use_unit_credit_code = #{companyCode}
UNION ALL
SELECT
cr.sequence_nbr AS sequenceNbr,
'补证登记' AS businessType,
cr.apply_no AS applyNo,
cr.equ_list AS equListName,
cr.receive_org_name AS receiveOrgName,
CASE cr.apply_status WHEN '6610' THEN '待提交' ELSE cr.apply_status END AS status,
DATE_FORMAT (cr.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_certificate_replenish cr
WHERE
cr.is_delete = FALSE
AND cr.apply_status = '6610'
AND cr.use_unit_code = #{companyCode}
UNION ALL
SELECT
vi.sequence_nbr AS sequenceNbr,
'车用气瓶登记' AS businessType,
vi.apply_no AS applyNo,
'车用气瓶' AS equListName,
vi.receive_org_name AS receiveOrgName,
CASE vi.status WHEN '6610' THEN '待提交' ELSE vi.status END AS status,
DATE_FORMAT (vi.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_vehicle_information vi
WHERE
vi.is_delete = FALSE
AND vi.status = '使用单位待提交'
AND vi.use_unit_credit_code = #{companyCode}
UNION ALL
SELECT
vru.sequence_nbr AS sequenceNbr,
'车用气瓶变更登记' AS businessType,
vru.apply_no AS applyNo,
'车用气瓶' AS equListName,
vru.receive_org_name AS receiveOrgName,
CASE vru.status WHEN '6610' THEN '待提交' ELSE vru.status END AS status,
DATE_FORMAT (vru.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_change_vehicle_registration_unit vru
WHERE
vru.status = '使用单位待提交'
AND vru.use_unit_credit_code = #{companyCode}
UNION ALL
SELECT
rn.sequence_nbr AS sequenceNbr,
'更名变更登记' AS businessType,
rn.apply_no AS applyNo,
'' AS equListName,
rn.receive_org_name AS receiveOrgName,
CASE rn.audit_status WHEN '6610' THEN '待提交' ELSE rn.audit_status END AS status,
DATE_FORMAT (rn.create_date, '%Y-%m-%d') AS createDate
FROM
tzs_jg_change_registration_name rn
WHERE
rn.audit_status = '使用单位待提交'
AND rn.use_unit_credit_code = #{companyCode}
ORDER BY createDate DESC, applyNo DESC
</select>
</mapper>
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.dto.JgNoticeToBeSubmitDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
......@@ -29,7 +30,6 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
......@@ -397,4 +397,20 @@ public class JgUseRegistrationController extends BaseController {
@RequestParam("originProjectContraptionIds") String[] originProjectContraptionIds) {
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.getDeviceListByProjectContraption(projectContraptionSeq, originProjectContraptionIds));
}
/**
* 登记暂存列表分页查询
*
* @param current 当前页
* @param size 每页大小
* @return Page
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/queryRegistrationToBeSubmitPage")
@ApiOperation(httpMethod = "GET", value = "登记暂存列表分页查询", notes = "登记暂存列表分页查询")
public ResponseModel<Page<JgNoticeToBeSubmitDto>> queryRegistrationToBeSubmitPage(@RequestParam(value = "number") int current,
@RequestParam(value = "size") int size) {
Page<JgNoticeToBeSubmitDto> page = new Page<>(current, size);
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.queryRegistrationToBeSubmitPage(page,getSelectedOrgInfo()));
}
}
......@@ -4996,4 +4996,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
public Page<JgNoticeToBeSubmitDto> queryRegistrationToBeSubmitPage(Page<JgNoticeToBeSubmitDto> page, ReginParams reginParams) {
String companyCode = reginParams.getCompany().getCompanyCode();
return jgUseRegistrationMapper.queryRegistrationToBeSubmitPage(page, companyCode);
}
}
\ 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