Commit 480eb074 authored by zhangwanglin's avatar zhangwanglin

分配控制

parent cb71342b
...@@ -883,19 +883,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -883,19 +883,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override @Override
public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) { public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) {
int result = taskDetailMapper.placeOtherApply(disabInfoId,otherApplyTime);
Result result1 =Result.success(); Result result1 =Result.success();
if (result > 0) {
Date date = DateUtils.strToDate(otherApplyTime); Date date = DateUtils.strToDate(otherApplyTime);
boolean now = DateUtils.isNow(date); boolean now = DateUtils.isNow(date);
if (now) { if (now) {
result1 = placeFreeHandler(disabInfoId, otherApplyTime); result1 = placeFreeHandler(disabInfoId, otherApplyTime);
} }
if(result1.equals(Result.success())) {
int result = taskDetailMapper.placeOtherApply(disabInfoId, otherApplyTime);
if (result > 0) {
return result1; return result1;
}else { } else {
return Result.failed("申请失败"); return Result.failed("申请失败");
} }
} }
return result1;
}
private Result placeFreeHandler(Integer disabInfoId, String otherApplyTime) { private Result placeFreeHandler(Integer disabInfoId, String otherApplyTime) {
...@@ -931,6 +935,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -931,6 +935,11 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts.setDeductionAmountTotal(zero); chDisabAccounts.setDeductionAmountTotal(zero);
disabAccountsMapper.insert(chDisabAccounts); disabAccountsMapper.insert(chDisabAccounts);
}else { }else {
Short accountsStatus = chDisabAccounts.getAccountsStatus();
if(accountsStatus > 1){
log.info("{},已完成审核",chDisabAccounts.getAccountsId());
return Result.failed("提交月份已完成审核,请联系管理员");
}
BigDecimal allCost1 = chDisabAccounts.getAllCost(); BigDecimal allCost1 = chDisabAccounts.getAllCost();
BigDecimal overallCost1 = chDisabAccounts.getOverallCost(); BigDecimal overallCost1 = chDisabAccounts.getOverallCost();
allCost1 = allCost1.add(limit); allCost1 = allCost1.add(limit);
...@@ -945,13 +954,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -945,13 +954,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId()); chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts); chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
} else { } else {
Long accountsId = chDisabDetailAccountsDTO.getAccountsId();
ChDisabAccounts chDisabAccountDTO = disabAccountsMapper.selectById(accountsId);
Short accountsStatus = chDisabAccountDTO.getAccountsStatus();
if(accountsStatus > 1){
log.info("{},已完成审核",accountsId);
Result.failed("提交月份已完成审核,请联系管理员");;
}
BigDecimal accountsAllCost = chDisabDetailAccountsDTO.getAccountsAllCost(); BigDecimal accountsAllCost = chDisabDetailAccountsDTO.getAccountsAllCost();
BigDecimal accountsOverallCost = chDisabDetailAccountsDTO.getAccountsOverallCost(); BigDecimal accountsOverallCost = chDisabDetailAccountsDTO.getAccountsOverallCost();
chDisabDetailAccountsDTO.setAccountsAllCost(accountsAllCost.add(limit)); chDisabDetailAccountsDTO.setAccountsAllCost(accountsAllCost.add(limit));
......
...@@ -63,4 +63,6 @@ public class SrvSendVO extends PageInfo implements Serializable { ...@@ -63,4 +63,6 @@ public class SrvSendVO extends PageInfo implements Serializable {
private String applyStatus; private String applyStatus;
//分配状态 //分配状态
private String status; private String status;
private String exitReasonId;
} }
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<result column="birthday" jdbcType="DATE" property="birthday"/> <result column="birthday" jdbcType="DATE" property="birthday"/>
<result column="status" jdbcType="VARCHAR" property="status"/> <result column="status" jdbcType="VARCHAR" property="status"/>
<result column="stop_time" jdbcType="VARCHAR" property="stopTime"/> <result column="stop_time" jdbcType="VARCHAR" property="stopTime"/>
<result column="exit_reason_id" jdbcType="VARCHAR" property="exitReasonId"/>
</resultMap> </resultMap>
<!--查询服务分配信息列表--> <!--查询服务分配信息列表-->
...@@ -36,7 +37,8 @@ ...@@ -36,7 +37,8 @@
i.tel, i.tel,
s.stop_time, s.stop_time,
i.birthday, i.birthday,
s.status s.status,
i.exit_reason_id
FROM FROM
ch_disable_info i ch_disable_info i
LEFT JOIN ch_srv_send s ON s.disab_info_id = i.disab_info_id LEFT JOIN ch_srv_send s ON s.disab_info_id = i.disab_info_id
......
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