|
|
@@ -4,6 +4,7 @@ import com.dk.common.infrastructure.annotaiton.Pagination;
|
|
|
import com.dk.common.infrastructure.constant.Constant;
|
|
|
import com.dk.common.infrastructure.enums.ErrorCodeEnum;
|
|
|
import com.dk.common.model.pojo.PageList;
|
|
|
+import com.dk.common.model.vo.core.StaffEntity;
|
|
|
import com.dk.common.response.ResponseCodeEnum;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
import com.dk.common.response.ResponseResultVO;
|
|
|
@@ -55,6 +56,9 @@ public class DictionaryDataService extends BaseService<DictionaryData> {
|
|
|
private MoneyAccountService moneyAccountService;
|
|
|
|
|
|
@Autowired
|
|
|
+ private MoneyAccountMapper moneyAccountMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private AuthUtils authUtils;
|
|
|
|
|
|
/**
|
|
|
@@ -146,10 +150,6 @@ public class DictionaryDataService extends BaseService<DictionaryData> {
|
|
|
.setBalance(new BigDecimal(0)).setInitBalance(new BigDecimal(0))
|
|
|
.setMacName(dictionaryDataVO.getDataValue()).setMacType(dictionaryData.getDataId()).setMacId(moneyAccountResponse.getMacId()));
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
super.updateByUuid(dictionaryData);
|
|
|
return ResponseResultUtil.success();
|
|
|
@@ -170,7 +170,14 @@ public class DictionaryDataService extends BaseService<DictionaryData> {
|
|
|
return ResponseResultUtil.error(ResponseCodeEnum.OPERATE_FAIL.getCode(), ErrorCodeEnum.SYSTEM_PRESET_DATA_UNABLE_TO_OPERATE.getMessage());
|
|
|
}
|
|
|
super.disable(id);
|
|
|
-
|
|
|
+ StaffEntity staff = authUtils.getStaff();
|
|
|
+ if (dictionaryDataItem.getDictCode().equals("基础资料-账户") && Constant.GradeCode.STD.getName().equals(staff.getGradeCode())) {
|
|
|
+ // 停用资金账户
|
|
|
+ List<MoneyAccountResponse> moneyAccountResponses = moneyAccountMapper.selectByCond(new MoneyAccountQuery().setMacType(dictionaryDataItem.getDataId()).setCpId(authUtils.getStaff().getCpId()));
|
|
|
+ if(moneyAccountResponses != null && moneyAccountResponses.size() > 0){
|
|
|
+ moneyAccountService.disable(moneyAccountResponses.get(0).getMacId());
|
|
|
+ }
|
|
|
+ }
|
|
|
return ResponseResultUtil.success();
|
|
|
}
|
|
|
|