Commit da933ee4 by jianan

薪资单查询本年问题

parent 9ccef704
...@@ -392,14 +392,14 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -392,14 +392,14 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
List<PayScaleInfo> resultList = new ArrayList<>(); List<PayScaleInfo> resultList = new ArrayList<>();
//如果是预览薪资单,则跳过权限校验 //如果是预览薪资单,则跳过权限校验
if(!"AGMS".equals(requestVO.getPreFlag())){ // if(!"AGMS".equals(requestVO.getPreFlag())){
//等保调整 // //等保调整
List<AclCustomer> findByObjSortable = aclPractitionerDALService.getAclCustomers(requestVO.getPractitionerId(),null); // List<AclCustomer> findByObjSortable = aclPractitionerDALService.getAclCustomers(requestVO.getPractitionerId(),null);
if(null == findByObjSortable ){ // if(null == findByObjSortable ){
responseVO.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("630028"))); // responseVO.setCommonResult(new CommonResult(false,ZHBErrorConfig.getErrorInfo("630028")));
return responseVO; // return responseVO;
} // }
} // }
try { try {
if ("0".equals(isHistory)) { if ("0".equals(isHistory)) {
// 查询本年 // 查询本年
...@@ -422,9 +422,12 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe ...@@ -422,9 +422,12 @@ public class PractitionerBasicInfoServiceImpl implements PractitionerBasicInfoSe
} }
private List<PayScaleInfo> queryNew(PayScaleQueryRequestVO requestVO) throws Exception { private List<PayScaleInfo> queryNew(PayScaleQueryRequestVO requestVO) throws Exception {
Long practitionerId = requestVO.getPractitionerId();
Integer isActive = requestVO.getIsActive();
String isHistory = requestVO.getIsHistory();
// 1.先查本地新基本法的薪资 // 1.先查本地新基本法的薪资
List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerIdAndIsbasic(requestVO.getPractitionerId(), 1,requestVO.getIsActive()); List<AgAclLifePractitionerSalary> list = practitionerSalaryMapper.queryListByPractitionerIdAndIsbasic(practitionerId, 1, isActive, isHistory);
List<PayScaleInfo> salaryList = this.translateAgAclLifePractitionerSalaryToPayScaleInfo(list,requestVO.getPreFlag()); List<PayScaleInfo> salaryList = this.translateAgAclLifePractitionerSalaryToPayScaleInfo(list,requestVO.getPreFlag());
// 2.再查N22 // 2.再查N22
......
...@@ -20,7 +20,8 @@ public interface AgAclLifePractitionerSalaryMapper { ...@@ -20,7 +20,8 @@ public interface AgAclLifePractitionerSalaryMapper {
List<AgAclLifePractitionerSalary> queryListByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("isActive") Integer isActive); List<AgAclLifePractitionerSalary> queryListByPractitionerId(@Param("practitionerId") Long practitionerId,@Param("isActive") Integer isActive);
List<AgAclLifePractitionerSalary> queryListByPractitionerIdAndIsbasic(@Param("practitionerId") Long practitionerId, @Param("isBasic") Integer isBasic,@Param("isActive") Integer isActive); List<AgAclLifePractitionerSalary> queryListByPractitionerIdAndIsbasic(@Param("practitionerId") Long practitionerId, @Param("isBasic") Integer isBasic,
@Param("isActive") Integer isActive, @Param("isHistory") String isHistory);
List<AgAclLifePractitionerSalary> queryByRecord(AgAclLifePractitionerSalary lifePractitionerSalary); List<AgAclLifePractitionerSalary> queryByRecord(AgAclLifePractitionerSalary lifePractitionerSalary);
} }
...@@ -134,14 +134,22 @@ ...@@ -134,14 +134,22 @@
</select> </select>
<select id="queryListByPractitionerIdAndIsbasic" resultMap="BaseResultMap"> <select id="queryListByPractitionerIdAndIsbasic" resultMap="BaseResultMap">
select <include refid="Base_Column_List" /> select
from ag_acl_life_practitioner_salary <include refid="Base_Column_List"/>
from ag_acl_life_practitioner_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT} where practitioner_id = #{practitionerId,jdbcType=BIGINT}
and is_basic = #{isBasic,jdbcType=BIGINT} and is_basic = #{isBasic,jdbcType=BIGINT}
<if test="isActive != null "> <if test="isActive != null ">
and is_active = #{isActive,jdbcType=BIGINT} and is_active = #{isActive,jdbcType=BIGINT}
</if> </if>
<if test="isHistory != null and 0==isHistory">
and left(`year_month`, 4) = left(NOW(), 4)
</if>
<if test="isHistory != null and 1==isHistory">
and left(`year_month`, 4) &lt; left(NOW(), 4)
</if>
</select> </select>
<select id="queryByRecord" resultMap="BaseResultMap"> <select id="queryByRecord" resultMap="BaseResultMap">
......
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