winter 11 месяцев назад
Родитель
Сommit
5b53c595b8
2 измененных файлов: 13 добавлений и 3 удалений
  1. +9
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxAgileContractController.java
  2. +4
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxAgileContractServiceImpl.java

+ 9
- 0
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxAgileContractController.java Просмотреть файл

@@ -155,6 +155,15 @@ public class WxAgileContractController extends WxContractBaseController {
@PostMapping("saveCustomer")
public ResultData saveCustomer(@RequestBody WxRentContract record) {
record.updateTenantInfo(this.getTenantInfo());
if (null == record.getCustomerType()) {
return new ResultData(Result.ERROR,"请选择主体类型");
}
if (StringUtils.isBlank(record.getCustomerName())) {
return new ResultData(Result.ERROR,"请输入名称");
}
if (StringUtils.isBlank(record.getCustomerPhone())) {
return new ResultData(Result.ERROR,"请输入电话");
}
try {
wxAgileContractService.setCustomers(record,EnumContractCustomersStatus.FORMUL);
}catch(Exception e) {


+ 4
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxAgileContractServiceImpl.java Просмотреть файл

@@ -263,7 +263,7 @@ public class WxAgileContractServiceImpl implements WxAgileContractService {
List<Long> shopList = record.shopIdsByRentInfo();
setShops(record,shopList);
//关联客户
setCustomers(record,EnumContractCustomersStatus.TEMP);
//setCustomers(record,EnumContractCustomersStatus.TEMP);
try {
record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode());
record.setStatus(EnumRentContractStatus.DRAFT.getCode());
@@ -1236,17 +1236,18 @@ public class WxAgileContractServiceImpl implements WxAgileContractService {
@Transactional(rollbackFor = {Exception.class})
@Override
public void transfer(WxRentContract rentContract,MallUserInfo user) {
this.setCustomers(rentContract,EnumContractCustomersStatus.TEMP);
//this.setCustomers(rentContract,EnumContractCustomersStatus.TEMP);
rentContract.setUpdatetime(new Date());
rentContract.setUpdateBy(user.getId());
rentContract.setUpdateByName(user.getName());
wxRentContractMapper.updateById(rentContract);
WxContractCustomers customers = wxContractCustomersMapper.selectById(rentContract.getCustomersId(),rentContract.getTenantId());
//更新账单归属
WxAllBill bill = new WxAllBill();
bill.updateTenantInfo(rentContract);
bill.setRentContractId(rentContract.getId());
bill.setCusName(rentContract.getCustomerName());
bill.setCusName(customers.getName());
wxAllBillMapper.transferCusName(bill);
}


Загрузка…
Отмена
Сохранить