Commit 1ee4d61e authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 1e5459b0 395c40b5
......@@ -84,4 +84,7 @@ public class UseUnitDto extends BaseDto {
@ApiModelProperty(value = "人员信息")
List<DutyPersonDto> dutyPersonList;
@ApiModelProperty(value = "值班电话,前端取的固定key为dutyPhone和维保块一样")
private String dutyPhone;
}
......@@ -28,8 +28,16 @@
) AS distance
from tz_dispatch_task ta
left JOIN tz_alert_called al on al.sequence_nbr = ta.alert_id
left JOIN tcb_elevator el on el.sequence_nbr = al.equipment_id
left JOIN (SELECT
jui.RECORD AS sequenceNbr,
ifnull ( jui."LONGITUDE_LATITUDE"::json->> 'latitude', null ) AS latitude,
ifnull ( jui."LONGITUDE_LATITUDE"::json->> 'longitude', null ) AS longitude
FROM
idx_biz_jg_use_info jui
LEFT JOIN idx_biz_jg_other_info joi ON jui.RECORD = joi.RECORD
LEFT JOIN idx_biz_jg_register_info jri ON jri.RECORD = jui.RECORD
WHERE
jri.EQU_LIST = '3000') el on el.sequenceNbr = al.equipment_id
where ta.sequence_nbr = #{taskId}
</select>
......@@ -83,7 +91,16 @@
p.feedback_finish_time as finishTime
from tz_dispatch_task t
LEFT JOIN tz_alert_called a on a.sequence_nbr = t.alert_id
LEFT JOIN tcb_elevator e on e.sequence_nbr = a.equipment_id
LEFT JOIN
(SELECT
jui.RECORD AS sequenceNbr,
ifnull ( jui.ADDRESS, null ) AS address
FROM
idx_biz_jg_use_info jui
LEFT JOIN idx_biz_jg_other_info joi ON jui.RECORD = joi.RECORD
LEFT JOIN idx_biz_jg_register_info jri ON jri.RECORD = jui.RECORD
WHERE
jri.EQU_LIST = '3000') e on e.sequenceNbr = a.equipment_id
LEFT JOIN tz_dispatch_paper p on p.sequence_nbr = t.paper_id
where t.response_user_tel =#{phone}
and a.alarm_type_code = #{typeCode}
......
......@@ -310,16 +310,16 @@
1) as maintainPeriodName,
(SELECT ME_UNIT_NAME FROM idx_biz_jg_maintenance_record_info WHERE RECORD = jui.RECORD ORDER BY REC_DATE DESC
limit 1) as maintainUnit,
(SELECT ME_MASTER FROM idx_biz_jg_maintenance_record_info WHERE RECORD = jui.RECORD ORDER BY REC_DATE DESC limit
1) as maintainLeader,
tbei.contact_phone as contactPhone,
jui.RECORD AS sequenceNbr
FROM idx_biz_jg_use_info jui
LEFT JOIN idx_biz_jg_other_info joi ON jui.RECORD = joi.RECORD
LEFT JOIN idx_biz_jg_register_info jri ON jri.RECORD = jui.RECORD
LEFT JOIN idx_biz_jg_factory_info jfi ON jui.RECORD = jfi.RECORD
LEFT JOIN idx_biz_jg_tech_params_elevator tpe ON tpe.RECORD = jui.RECORD
LEFT JOIN tz_base_enterprise_info tbei ON jui.USE_UNIT_CREDIT_CODE = tbei.use_code
WHERE jui.RECORD = #{record}
</select>
<select id="selectFiles" resultType="java.util.Map">
......@@ -517,16 +517,18 @@
<select id="selectMtByAlertId" resultType="java.util.Map">
SELECT
SEQUENCE_NBR AS sequenceNbr,
ibjmri.SEQUENCE_NBR AS sequenceNbr,
ME_MASTER AS userName1,
ME_MASTER_PHONE AS phone1,
ME_MASTER1 AS userName2,
ME_MASTER1_PHONE AS phone2,
'' AS address,
ME_UNIT_NAME AS unitName,
ME_UNIT_CREDIT_CODE AS useCode
ME_UNIT_CREDIT_CODE AS useCode,
tbei.address,
tbei.contact_phone as dutyPhone
FROM
idx_biz_jg_maintenance_record_info ibjmri
left join tz_base_enterprise_info tbei ON ibjmri.ME_UNIT_CREDIT_CODE = tbei.use_code
where
ibjmri.RECORD = #{sequenceNbr}
order by ibjmri.INFORM_START desc
......@@ -539,10 +541,14 @@
ibjui.PHONE AS managerPhone,
ibjui.USE_UNIT_NAME as useUnitName,
tbei.address AS address,
tbei.sequence_nbr AS unitId
tbei.sequence_nbr AS unitId,
tbei.contact_phone as dutyPhone,
u."name" as mainChargePersonName,
u.phone as mainChargePhone
FROM
idx_biz_jg_use_info ibjui
LEFT JOIN tz_base_enterprise_info tbei ON ibjui.USE_UNIT_CREDIT_CODE = tbei.use_code
LEFT JOIN (SELECT name, phone, unit_code FROM "amos_tzs_biz"."tzs_user_info" WHERE "post" LIKE '%6548%' AND "is_delete" = 'f' ORDER BY "rec_date"DESC LIMIT 1 ) u on u.unit_code = ibjui.USE_UNIT_CREDIT_CODE
WHERE
RECORD = #{sequenceNbr}
</select>
......
......@@ -399,6 +399,7 @@ public class MaintenanceUnitController extends BaseController {
maintenanceUnitVo.setAddress(ObjectUtils.isEmpty(list.get(0).get("address")) ? null : String.valueOf(list.get(0).get("address")));
maintenanceUnitVo.setId(ObjectUtils.isEmpty(list.get(0).get("sequenceNbr")) ? null : String.valueOf(list.get(0).get("sequenceNbr")));
maintenanceUnitVo.setSocialCreditCode(ObjectUtils.isEmpty(list.get(0).get("useCode")) ? null : String.valueOf(list.get(0).get("useCode")));
maintenanceUnitVo.setDutyPhone(ObjectUtils.isEmpty(list.get(0).get("dutyPhone")) ? null : String.valueOf(list.get(0).get("dutyPhone")));
List<DutyPersonDto> dutyPersonList = new ArrayList<DutyPersonDto>();
DutyPersonDto principal = new DutyPersonDto();
principal.setDeptName("主要负责人1");
......
......@@ -230,6 +230,7 @@ public class UseUnitController extends BaseController {
throw new BadRequest("使用单位未找到");
}
UseUnitDto useUnitVo = new UseUnitDto();
useUnitVo.setDutyPhone(ObjectUtils.isEmpty(useUnitMap.get("dutyPhone")) ? null : String.valueOf(useUnitMap.get("dutyPhone")));
useUnitVo.setUseUnitName(ObjectUtils.isEmpty(useUnitMap.get("useUnitName")) ? null : String.valueOf(useUnitMap.get("useUnitName")));
useUnitVo.setAddress(ObjectUtils.isEmpty(useUnitMap.get("address")) ? null : String.valueOf(useUnitMap.get("address")));
useUnitVo.setSequenceNbr(ObjectUtils.isEmpty(useUnitMap.get("unitId")) ? null : Long.valueOf(useUnitMap.get(
......@@ -237,10 +238,8 @@ public class UseUnitController extends BaseController {
List<DutyPersonDto> dutyPersonList = new ArrayList<DutyPersonDto>();
DutyPersonDto principal = new DutyPersonDto();
principal.setDeptName("主要负责人");
// todo 暂时置空
principal.setPhone(null);
principal.setUserId(null);
principal.setUserName(null);
principal.setPhone(ObjectUtils.isEmpty(useUnitMap.get("mainChargePhone")) ? null : String.valueOf(useUnitMap.get("mainChargePhone")));
principal.setUserName(ObjectUtils.isEmpty(useUnitMap.get("mainChargePersonName")) ? null : String.valueOf(useUnitMap.get("mainChargePersonName")));
dutyPersonList.add(principal);
DutyPersonDto manager = new DutyPersonDto();
manager.setDeptName("电梯安全管理员");
......
......@@ -127,4 +127,7 @@ public class JgUseRegistrationManageDto extends BaseDto {
@ApiModelProperty("补证日期")
private Date reissueDate;
@ApiModelProperty("是否在流程中,值:true / false ")
private String certInBusinessFlag;
}
......@@ -141,6 +141,9 @@
<if test="dto.carNumber != null and dto.carNumber != ''">
and tjurm.car_number LIKE CONCAT('%', #{dto.carNumber}, '%')
</if>
<if test="dto.certInBusinessFlag != null and dto.certInBusinessFlag != '' and dto.certInBusinessFlag == 'false'">
and NOT EXISTS ( <include refid="useRegCertInBusiness"/> )
</if>
ORDER BY
<if test="sort != null">
tjurm.${sort.field} ${sort.sortType},
......@@ -148,6 +151,52 @@
tjurm.rec_date DESC
</where>
</select>
<sql id="useRegCertInBusiness">
SELECT 1
FROM (SELECT use_registration_code
FROM tzs_jg_certificate_replenish
WHERE is_delete = 0
AND apply_status NOT IN ('6610', '6614', '6615', '6617', '6616')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_change_registration_reform
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_change_registration_transfer
WHERE is_delete = 0
AND audit_status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_enable_disable
WHERE is_delete = 0
AND audit_status NOT IN ('待提交', '已驳回', '已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_over_design_service_life
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_scrap_cancel
WHERE is_delete = 0
AND audit_status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_use_registration
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')
UNION ALL
SELECT use_registration_code
FROM tzs_jg_vehicle_information
WHERE is_delete = 0
AND status NOT IN ('使用单位待提交', '一级受理已驳回', '使用单位已撤回', '已作废', '已完成')) A
WHERE tjurm.use_registration_code = A.use_registration_code
</sql>
<select id="countCertificateByReginCode" resultType="java.lang.Long">
select
count(1)
......
......@@ -204,8 +204,8 @@ public class SafetyProblemTracingGenServiceImpl{
}
}
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock(name = "executeOverDesignLifeCheck", lockAtMostFor = "PT5H", lockAtLeastFor = "PT10M")
// @Scheduled(cron = "0 0 1 * * ?")
// @SchedulerLock(name = "executeOverDesignLifeCheck", lockAtMostFor = "PT5H", lockAtLeastFor = "PT10M")
public void executeOverDesignLife() {
executeOverDesignLifeCheck();
}
......
......@@ -41,11 +41,6 @@
"image": "upload/tzs/common/image/使用登记.png"
},
{
"name": "补证登记",
"code": "DJ_BZ",
"image": "upload/tzs/common/image/补证登记.png"
},
{
"name": "改造变更登记",
"code": "DJ_GZ",
"image": "upload/tzs/common/image/改造变更登记.png"
......@@ -67,9 +62,9 @@
"image": "upload/tzs/common/image/更名变更登记.png"
},
{
"name": "超设计使用年限变更",
"code": "DJ_CSJ",
"image": "upload/tzs/common/image/超设计使用年限.png"
"name": "补证登记",
"code": "DJ_BZ",
"image": "upload/tzs/common/image/补证登记.png"
}
],
"WBBA": [
......
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