Browse Source

社保导入模块调整

dzx 1 month ago
parent
commit
68f75323ab

+ 1 - 0
src/main/java/com/xjrsoft/module/personnel/service/impl/BasePersonnelLabourCapitalServiceImpl.java

@@ -132,6 +132,7 @@ public class BasePersonnelLabourCapitalServiceImpl extends MPJBaseServiceImpl<Ba
         basePersonnelLabourCapital.setIdNumberColumn(1);
         basePersonnelLabourCapital.setJobNumberColumn(2);
         basePersonnelLabourCapital.setDateOfIssue(sdf.parse(dto.getDateOfIssue()));
+        basePersonnelLabourCapital.setYear(basePersonnelLabourCapital.getDateOfIssue().getYear());
 
         List<BasePersonnelLabourCapitalTitle> titleList = initTitleList(excelDataList.get(0), new LinkedHashMap<>(), basePersonnelLabourCapital);
         List<BasePersonnelLabourCapitalData> dataList = initDataList(dto, excelDataList, 1);

+ 5 - 1
src/main/resources/mapper/personnel/BasePersonnelLabourCapitalMapper.xml

@@ -20,11 +20,15 @@
                 LEFT JOIN xjr_user_dept_relation w ON u.id = w.user_id
                 LEFT JOIN xjr_department d ON w.dept_id = d.id
         WHERE t.delete_mark = 0 and t.category = #{dto.category}
-        <if test="dto.year != null and dto.month != null">
+        <if test="dto.category == 1 and dto.year != null and dto.month != null">
             and YEAR(t.date_of_issue) = #{dto.year}
             and MONTH(t.date_of_issue) = #{dto.month}
             and t1.job_number = #{dto.jobNumber}
         </if>
+        <if test="dto.category == 2 and dto.year != null">
+            and year = #{dto.year}
+            and t1.job_number = #{dto.jobNumber}
+        </if>
     </select>
 
     <select id="getYearPage" parameterType="com.xjrsoft.module.personnel.dto.BasePersonnelLabourCapitalYearPageDto" resultType="com.xjrsoft.module.personnel.vo.BasePersonnelLabourCapitalYearPageVo">