Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
03f7efa2c9
|
|
@ -449,6 +449,12 @@ public class SISchemeBiz {
|
|||
public int checkBeforeDeleteSocialscheme(Map<String, Object> params){
|
||||
return getSIAccountUtilMapper().checkBeforeDeleteSocialscheme((Collection<Long>)params.get("ids")).get(0).getNum();
|
||||
}
|
||||
public int checkBeforeDeleteAccumulationfund(Map<String, Object> params){
|
||||
return getSIAccountUtilMapper().checkBeforeDeleteAccumulationfund((Collection<Long>)params.get("ids")).get(0).getNum();
|
||||
}
|
||||
public int checkBeforeDeleteOtherscheme(Map<String, Object> params){
|
||||
return getSIAccountUtilMapper().checkBeforeDeleteOtherscheme((Collection<Long>)params.get("ids")).get(0).getNum();
|
||||
}
|
||||
|
||||
public void deleteSocialscheme(Map<String, Object> params){
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
|
|
|
|||
|
|
@ -42,7 +42,15 @@ public class SISchemeDeleteCmd extends AbstractCommonCommand<Map<String, Object>
|
|||
SISchemeBiz siSchemeBiz = new SISchemeBiz();
|
||||
int num = siSchemeBiz.checkBeforeDeleteSocialscheme(params);
|
||||
if (num > 0){
|
||||
throw new SalaryRunTimeException("该社保福利方案已被使用");
|
||||
throw new SalaryRunTimeException("该社保方案已被使用");
|
||||
}
|
||||
int accumulationfundNum = siSchemeBiz.checkBeforeDeleteAccumulationfund(params);
|
||||
if (accumulationfundNum > 0){
|
||||
throw new SalaryRunTimeException("该公积金方案已被使用");
|
||||
}
|
||||
int otherschemeNum = siSchemeBiz.checkBeforeDeleteOtherscheme(params);
|
||||
if (otherschemeNum > 0){
|
||||
throw new SalaryRunTimeException("该其他福利方案已被使用");
|
||||
}
|
||||
siSchemeBiz.deleteSocialscheme(params);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,5 +10,22 @@ public interface SIAccountUtilMapper {
|
|||
|
||||
List<SIAccountUtilDTO> checkIfBusinessaccounting(Long id);
|
||||
|
||||
/**
|
||||
* 删除社保前校验是否已经被使用
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<SIAccountUtilDTO> checkBeforeDeleteSocialscheme(@Param("ids") Collection<Long> id);
|
||||
/**
|
||||
* 删除公积金前校验是否已经被使用
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<SIAccountUtilDTO> checkBeforeDeleteAccumulationfund(@Param("ids") Collection<Long> id);
|
||||
/**
|
||||
* 删除其他福利方案前校验是否已经被使用
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
List<SIAccountUtilDTO> checkBeforeDeleteOtherscheme(@Param("ids") Collection<Long> id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,4 +34,29 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="checkBeforeDeleteAccumulationfund" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
COUNT(0) num
|
||||
FROM
|
||||
hrsa_bill_detail
|
||||
WHERE
|
||||
delete_type = 0
|
||||
AND fund_scheme_id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="checkBeforeDeleteOtherscheme" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
COUNT(0) num
|
||||
FROM
|
||||
hrsa_bill_detail
|
||||
WHERE
|
||||
delete_type = 0
|
||||
AND other_scheme_id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue