Commit 011ac4a4 authored by suhuiguang's avatar suhuiguang

fix(jg):bug处理

1.历史有证登记创建日期没写 2.业务办理时效统计,使用的开始日期不对
parent 548485ce
...@@ -773,10 +773,10 @@ ...@@ -773,10 +773,10 @@
and n.is_delete = 0 and n.is_delete = 0
and (n.manage_type is null or n.manage_type = '' or n.manage_type = 'set') and (n.manage_type is null or n.manage_type = '' or n.manage_type = 'set')
<if test="param.beginDate != null"> <if test="param.beginDate != null">
and CAST(n.reg_date as date) <![CDATA[>=]]> #{param.beginDate} and CAST(n.create_date as date) <![CDATA[>=]]> #{param.beginDate}
</if> </if>
<if test="param.endDate != null"> <if test="param.endDate != null">
and CAST(n.reg_date as date) <![CDATA[<=]]> #{param.endDate} and CAST(n.create_date as date) <![CDATA[<=]]> #{param.endDate}
</if> </if>
<if test="param.receiveOrgCode != null"> <if test="param.receiveOrgCode != null">
and n.receive_company_org_code like concat(#{param.receiveOrgCode}, '%') and n.receive_company_org_code like concat(#{param.receiveOrgCode}, '%')
...@@ -1429,10 +1429,10 @@ ...@@ -1429,10 +1429,10 @@
</otherwise> </otherwise>
</choose> </choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_ge(CAST(create_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate}) and date_le(CAST(create_date as date),#{dto.endDate})
</if> </if>
union all union all
SELECT count(1) as num FROM "tzs_jg_vehicle_information" where status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' SELECT count(1) as num FROM "tzs_jg_vehicle_information" where status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
...@@ -1812,10 +1812,10 @@ ...@@ -1812,10 +1812,10 @@
</otherwise> </otherwise>
</choose> </choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_ge(CAST(create_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate}) and date_le(CAST(create_date as date),#{dto.endDate})
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
...@@ -2572,10 +2572,10 @@ ...@@ -2572,10 +2572,10 @@
</otherwise> </otherwise>
</choose> </choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_ge(CAST(create_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate}) and date_le(CAST(create_date as date),#{dto.endDate})
</if> </if>
union all union all
SELECT count(1) as num FROM "tzs_jg_vehicle_information" where status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成' SELECT count(1) as num FROM "tzs_jg_vehicle_information" where status != '使用单位待提交' and status != '使用单位已撤回' and status != '已作废' and status != '已完成'
...@@ -2957,10 +2957,10 @@ ...@@ -2957,10 +2957,10 @@
</otherwise> </otherwise>
</choose> </choose>
<if test="dto.beginDate != null and dto.beginDate != ''"> <if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(reg_date as date),#{dto.beginDate}) and date_ge(CAST(create_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate != null and dto.endDate != ''"> <if test="dto.endDate != null and dto.endDate != ''">
and date_le(CAST(reg_date as date),#{dto.endDate}) and date_le(CAST(create_date as date),#{dto.endDate})
</if> </if>
<if test="dto.companyName != null and dto.companyName != ''"> <if test="dto.companyName != null and dto.companyName != ''">
and use_unit_name like CONCAT('%', #{dto.companyName}, '%') and use_unit_name like CONCAT('%', #{dto.companyName}, '%')
......
...@@ -4259,7 +4259,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -4259,7 +4259,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
CompanyBo company = reginParams.getCompany(); CompanyBo company = reginParams.getCompany();
String sequenceNbr = Objects.toString(map.get("sequenceNbr"),null); String sequenceNbr = Objects.toString(map.get("sequenceNbr"),null);
JgUseRegistration jgUseRegistration = ValidationUtil.isEmpty(sequenceNbr) ? new JgUseRegistration() : this.getBaseMapper().selectById(Long.valueOf(sequenceNbr)); JgUseRegistration jgUseRegistration = ValidationUtil.isEmpty(sequenceNbr) ? new JgUseRegistration() : this.getBaseMapper().selectById(Long.valueOf(sequenceNbr));
jgUseRegistration.setCreateDate(new Date());
jgUseRegistration.setRegDate(ValidationUtil.isEmpty(map.get("oRegDate")) ? new Date() : jgUseRegistration.setRegDate(ValidationUtil.isEmpty(map.get("oRegDate")) ? new Date() :
DateUtils.dateParse((String) map.get("oRegDate"), DateUtils.DATE_PATTERN)); DateUtils.dateParse((String) map.get("oRegDate"), DateUtils.DATE_PATTERN));
jgUseRegistration.setInputUnitNo(Objects.toString(map.get("oRegUnit"))); jgUseRegistration.setInputUnitNo(Objects.toString(map.get("oRegUnit")));
......
...@@ -688,7 +688,7 @@ ...@@ -688,7 +688,7 @@
</select> </select>
<select id="queryUseAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto"> <select id="queryUseAvgDayByReceiveCompany" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT SELECT
round(avg(T.audit_pass_date::date - T.reg_date::date + 1),1) as strValue, round(avg(T.audit_pass_date::date - T.create_date::date + 1),1) as strValue,
T.receive_company_code AS keyStr T.receive_company_code AS keyStr
FROM FROM
tzs_jg_use_registration T tzs_jg_use_registration T
...@@ -711,10 +711,10 @@ ...@@ -711,10 +711,10 @@
</otherwise> </otherwise>
</choose> </choose>
<if test="dto.beginDate !=null and dto.beginDate !=''"> <if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(T.reg_date as date),#{dto.beginDate}) and date_ge(CAST(T.audit_pass_date as date),#{dto.beginDate})
</if> </if>
<if test="dto.endDate !=null and dto.endDate !=''"> <if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(T.reg_date as date),#{dto.endDate}) and date_le(CAST(T.audit_pass_date as date),#{dto.endDate})
</if> </if>
GROUP BY T.receive_company_code GROUP BY T.receive_company_code
union all union all
......
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