瀏覽代碼

移动端工资条查询调整

dzx 1 周之前
父節點
當前提交
16278b0367

+ 3 - 0
src/main/java/com/xjrsoft/module/personnel/dto/BasePersonnelLabourCapitalMonthPageDto.java

@@ -19,4 +19,7 @@ public class BasePersonnelLabourCapitalMonthPageDto extends PageInput {
 
     @ApiModelProperty("月份")
     public int month;
+
+    @ApiModelProperty("工号")
+    public String jobNumber;
 }

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

@@ -46,6 +46,9 @@ public class BasePersonnelLabourCapitalServiceImpl extends MPJBaseServiceImpl<Ba
 
     @Override
     public Page<BasePersonnelLabourCapitalMonthPageVo> getMonthPage(Page<BasePersonnelLabourCapitalMonthPageDto> page, BasePersonnelLabourCapitalMonthPageDto dto) {
+        long userId = StpUtil.getLoginIdAsLong();
+        User user = userService.getById(userId);
+        dto.setJobNumber(user.getUserName());
         Page<BasePersonnelLabourCapitalMonthPageVo> resultPage = labourCapitalMapper.getMonthPage(page, dto);
 
         for (BasePersonnelLabourCapitalMonthPageVo record : resultPage.getRecords()) {
@@ -70,7 +73,6 @@ public class BasePersonnelLabourCapitalServiceImpl extends MPJBaseServiceImpl<Ba
         long userId = StpUtil.getLoginIdAsLong();
         User user = userService.getById(userId);
         dto.setJobNumber(user.getUserName());
-        dto.setName(user.getName());
         return labourCapitalMapper.getYearPage(page, dto);
     }
 

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

@@ -22,6 +22,7 @@
         <if test="dto.year != null and dto.month != null">
             and YEAR(t.date_of_issue) = #{dto.year}
             and MONTH(t.date_of_issue) = #{dto.month}
+            and t.job_number = #{dto.jobNumber}
         </if>
     </select>