diff --git a/src/com/engine/salary/entity/taxagent/po/TaxAgentExtRangePO.java b/src/com/engine/salary/entity/taxagent/po/TaxAgentExtRangePO.java
index b5d3a4ad4..071380108 100644
--- a/src/com/engine/salary/entity/taxagent/po/TaxAgentExtRangePO.java
+++ b/src/com/engine/salary/entity/taxagent/po/TaxAgentExtRangePO.java
@@ -1,5 +1,6 @@
package com.engine.salary.entity.taxagent.po;
+import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -61,6 +62,7 @@ public class TaxAgentExtRangePO {
/**
* 名字
*/
+ @TableTitle(title = "姓名",key = "targetName",dataIndex = "targetName")
private String targetName;
diff --git a/src/com/engine/salary/mapper/salarysob/SalarySobExtRangeMapper.xml b/src/com/engine/salary/mapper/salarysob/SalarySobExtRangeMapper.xml
index 2265cfab2..066bf3d61 100644
--- a/src/com/engine/salary/mapper/salarysob/SalarySobExtRangeMapper.xml
+++ b/src/com/engine/salary/mapper/salarysob/SalarySobExtRangeMapper.xml
@@ -240,10 +240,11 @@
UPDATE hrsa_salary_sob_ext_range
SET delete_type=1
- WHERE id IN and delete_type=0
+ WHERE id IN
#{id}
+ and delete_type=0
\ No newline at end of file
diff --git a/src/com/engine/salary/mapper/taxagent/TaxAgentExtRangeMapper.xml b/src/com/engine/salary/mapper/taxagent/TaxAgentExtRangeMapper.xml
index 149d63984..9483e76a0 100644
--- a/src/com/engine/salary/mapper/taxagent/TaxAgentExtRangeMapper.xml
+++ b/src/com/engine/salary/mapper/taxagent/TaxAgentExtRangeMapper.xml
@@ -95,26 +95,26 @@
,e.username as targetName
FROM hrsa_tax_agent_ext_range t
left join hrsa_external_employee e on t.target_id = e.id
- WHERE delete_type = 0
+ WHERE t.delete_type = 0
- AND id = #{id}
+ AND t.id = #{id}
- AND target_id = #{targetId}
+ AND t.target_id = #{targetId}
- AND target_type = #{targetType}
+ AND t.target_type = #{targetType}
- AND tax_agent_id = #{taxAgentId}
+ AND t.tax_agent_id = #{taxAgentId}
- AND id IN
+ AND t.id IN
#{id}
- ORDER BY id DESC
+ ORDER BY t.id DESC
diff --git a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java
index 8484e2f9e..8417f11d1 100644
--- a/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java
+++ b/src/com/engine/salary/service/impl/TaxAgentManageRangeServiceImpl.java
@@ -392,7 +392,7 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
}
Date now = new Date();
- List oldPO = listExtByIds(targetIds);
+ List oldPO = listAllExtBytaxAgentId(taxAgentId);
List oldIds = SalaryEntityUtil.properties(oldPO, TaxAgentExtRangePO::getTargetId, Collectors.toList());
targetIds.stream().filter(targetId -> !oldIds.contains(targetId)).forEach(targetId -> {
TaxAgentExtRangePO po = TaxAgentExtRangePO.builder()
@@ -422,9 +422,18 @@ public class TaxAgentManageRangeServiceImpl extends Service implements TaxAgentM
}
}
+ private List listAllExtBytaxAgentId(Long taxAgentId) {
+ if(taxAgentId ==null){
+ return new ArrayList<>();
+ }
+ return getTaxAgentExtRangeMapper().listSome(TaxAgentExtRangePO.builder().taxAgentId(taxAgentId).build());
+ }
+
private List listExtByIds(Collection targetIds) {
- List oldPO = getTaxAgentExtRangeMapper().listSome(TaxAgentExtRangePO.builder().ids(targetIds).build());
- return oldPO;
+ if(CollectionUtils.isEmpty(targetIds)){
+ return new ArrayList<>();
+ }
+ return getTaxAgentExtRangeMapper().listSome(TaxAgentExtRangePO.builder().ids(targetIds).build());
}
@Override
diff --git a/src/com/engine/salary/web/SalarySobController.java b/src/com/engine/salary/web/SalarySobController.java
index bb50f41af..430181e92 100644
--- a/src/com/engine/salary/web/SalarySobController.java
+++ b/src/com/engine/salary/web/SalarySobController.java
@@ -194,22 +194,6 @@ public class SalarySobController {
return new ResponseResult(user).run(getSalarySobRangeWrapper(user)::save, saveParam);
}
- @POST
- @Path("/ext/save")
- @Produces(MediaType.APPLICATION_JSON)
- public String saveSalarySobExtRange(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobRangeExtSaveParam saveParam) {
- User user = HrmUserVarify.getUser(request, response);
- return new ResponseResult(user).run(getSalarySobRangeWrapper(user)::saveExtRange, saveParam);
- }
-
- @POST
- @Path("/range/ext/list")
- @Produces(MediaType.APPLICATION_JSON)
- public String listPage4Ext(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobRangeQueryParam queryParam) {
- User user = HrmUserVarify.getUser(request, response);
- return new ResponseResult>(user).run(getSalarySobRangeWrapper(user)::listPage4Ext, queryParam);
- }
-
/**
* 删除薪资账套人员范围
*/
@@ -221,6 +205,24 @@ public class SalarySobController {
return new ResponseResult, String>(user).run(getSalarySobRangeWrapper(user)::delete, ids);
}
+ @POST
+ @Path("/range/ext/list")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String listPage4Ext(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobRangeQueryParam queryParam) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult>(user).run(getSalarySobRangeWrapper(user)::listPage4Ext, queryParam);
+ }
+
+
+ @POST
+ @Path("/ext/save")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String saveSalarySobExtRange(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySobRangeExtSaveParam saveParam) {
+ User user = HrmUserVarify.getUser(request, response);
+ return new ResponseResult(user).run(getSalarySobRangeWrapper(user)::saveExtRange, saveParam);
+ }
+
+
/**
* 删除薪资账套人员范围
*/
diff --git a/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java b/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java
index 710d21b56..c5484135a 100644
--- a/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java
+++ b/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java
@@ -79,7 +79,7 @@ public class SalarySobRangeWrapper extends Service {
getSalarySobRangeService(user).saveExtRange(saveParam);
}
- public PageInfo listPage4Ext(SalarySobRangeQueryParam param) {
+ public PageInfo listPage4Ext(SalarySobRangeQueryParam param) {
return getSalarySobRangeService(user).listPage4Ext(param);
}
@@ -107,8 +107,8 @@ public class SalarySobRangeWrapper extends Service {
}
/**
- * @description 薪资账套人员范围导入预览
* @return void
+ * @description 薪资账套人员范围导入预览
* @author Harryxzy
* @date 2023/1/9 13:37
*/
@@ -117,8 +117,8 @@ public class SalarySobRangeWrapper extends Service {
}
/**
+ * @return Map
* @description 导入薪资账套人员范围
- * @return Map
* @author Harryxzy
* @date 2023/1/9 14:10
*/