Commit 4c067a75 authored by huyuchen's avatar huyuchen

申报对象修改

parent a091e940
......@@ -196,7 +196,7 @@ public class TStatisticsDeclarerServiceImpl extends ServiceImpl<TStatisticsDecla
R<TEmployeeInfo> res;
for (TStatisticsDeclarer declarer : stdvoYearList) {
if (CommonConstants.TWO_STRING.equals(declarer.getIsZeroDeclare())) {
res = archivesDaprUtil.getTEmployeeInfoById(declarer.getEmpIdcard());
res = archivesDaprUtil.getTEmployeeInfoByIdcard(declarer.getEmpIdcard());
if (Common.isNotNull(res) && Common.isNotNull(res.getData())
&& (CommonConstants.ZERO_INT == res.getData().getFileStatus())) {
declarer.setIsZeroDeclare(CommonConstants.ZERO_STRING);
......
......@@ -113,26 +113,24 @@
FROM t_salary_account a WHERE a.DELETE_FLAG = '0' AND a.SETTLEMENT_MONTH = #{lastMonth}
GROUP BY a.EMP_IDCARD,a.INVOICE_TITLE,CUPATION_TYPE,a.SETTLEMENT_MONTH) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE AND s.FORM_TYPE = b.FORM_TYPE
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,c.SETTLEMENT_MONTH,OCCUPATION_TYPE
</select>
<select id="doStatisticsTaxDeclarerYear" resultMap="tStatisticsDeclarerMap">
select b.DECLARE_MONTH,b.EMP_NAME,b.EMP_IDCARD,b.EMP_PHONE,b.DECLARE_UNIT,
b.OCCUPATION_TYPE,
b.IS_ZERO_DECLARE,
b.IS_ZERO_FLAG from (
SELECT
#{nowMonth} DECLARE_MONTH,c.EMP_NAME,c.EMP_IDCARD,c.EMP_PHONE,c.INVOICE_TITLE DECLARE_UNIT,
if(c.FORM_TYPE=0,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE,
if(c.FORM_TYPE=0 or c.FORM_TYPE=1 or c.FORM_TYPE=2,'0',if(c.FORM_TYPE=3 or c.FORM_TYPE=4,'1','-')) OCCUPATION_TYPE,
'2' IS_ZERO_DECLARE,
if(DATE_FORMAT(c.CREATE_TIME,"%Y%m")>=DATE_FORMAT(DATE_SUB(CURDATE(),INTERVAL 3 MONTH),"%Y%m"),'1','0') IS_ZERO_FLAG
FROM
(SELECT s.* FROM t_salary_account s,
(SELECT EMP_NAME,EMP_IDCARD,EMP_PHONE,a.INVOICE_TITLE,a.FORM_TYPE,a.SETTLEMENT_MONTH,
if(a.FORM_TYPE=0,'0',if(a.FORM_TYPE=3 or a.FORM_TYPE=4,'1','-')) CUPATION_TYPE
FROM t_salary_account a WHERE a.DELETE_FLAG = '0'
GROUP BY EMP_IDCARD,INVOICE_TITLE,CUPATION_TYPE
having a.SETTLEMENT_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%') and DATE_FORMAT(DATE_SUB(CURDATE(),INTERVAL 1 MONTH),"%Y%m")
>DATE_FORMAT(max(a.CREATE_TIME),"%Y%m")) b
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE AND s.FORM_TYPE = b.FORM_TYPE) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,OCCUPATION_TYPE
if(DATE_FORMAT(max(c.CREATE_TIME),"%Y%m")>=DATE_FORMAT(DATE_SUB(CURDATE(),INTERVAL 3 MONTH),"%Y%m"),'1','0') IS_ZERO_FLAG
FROM t_salary_account c WHERE c.DELETE_FLAG = '0' and c.SETTLEMENT_MONTH like concat(DATE_FORMAT(NOW(), '%Y'), '%')
GROUP BY c.EMP_IDCARD
having DATE_FORMAT(DATE_SUB(CURDATE(),INTERVAL 1 MONTH),"%Y%m")
>DATE_FORMAT(max(c.CREATE_TIME),"%Y%m")) b
group by b.EMP_IDCARD,b.DECLARE_UNIT,b.OCCUPATION_TYPE
</select>
</mapper>
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