Commit 480eb074 authored by zhangwanglin's avatar zhangwanglin

分配控制

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