|
@@ -35,13 +35,16 @@ import lombok.AllArgsConstructor;
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
|
|
|
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
|
+import org.springblade.client.entity.CorpsBank;
|
|
|
import org.springblade.client.entity.CorpsDesc;
|
|
import org.springblade.client.entity.CorpsDesc;
|
|
|
import org.springblade.client.feign.ICorpsDescClient;
|
|
import org.springblade.client.feign.ICorpsDescClient;
|
|
|
|
|
+import org.springblade.client.feign.IFeesDescClient;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.secure.utils.SecureUtil;
|
|
import org.springblade.core.secure.utils.SecureUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
|
|
+import org.springblade.system.user.feign.IUserClient;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
@@ -65,7 +68,11 @@ public class SettlementController extends BladeController {
|
|
|
|
|
|
|
|
private final IItemsService itemsService;
|
|
private final IItemsService itemsService;
|
|
|
|
|
|
|
|
- private ICorpsDescClient corpsDescClient;//获取客户信息
|
|
|
|
|
|
|
+ private final ICorpsDescClient corpsDescClient;//获取客户信息
|
|
|
|
|
+
|
|
|
|
|
+ private final IUserClient iUserClient;
|
|
|
|
|
+
|
|
|
|
|
+ private final IFeesDescClient iFeesDescClient;
|
|
|
/**
|
|
/**
|
|
|
* 详情
|
|
* 详情
|
|
|
*/
|
|
*/
|
|
@@ -77,6 +84,20 @@ public class SettlementController extends BladeController {
|
|
|
LambdaQueryWrapper<Items> itemsLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<Items> itemsLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
|
|
itemsLambdaQueryWrapper.eq(Items::getPid,detail.getId());
|
|
itemsLambdaQueryWrapper.eq(Items::getPid,detail.getId());
|
|
|
List<Items> list = itemsService.list(itemsLambdaQueryWrapper);
|
|
List<Items> list = itemsService.list(itemsLambdaQueryWrapper);
|
|
|
|
|
+
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(list))
|
|
|
|
|
+ {
|
|
|
|
|
+ list.forEach(e->{
|
|
|
|
|
+ //录入人
|
|
|
|
|
+ e.setCreateUserName(iUserClient.userInfoById(e.getCreateUser()).getData().getRealName());
|
|
|
|
|
+ //客户名称
|
|
|
|
|
+ e.setCorpName(corpsDescClient.getCorpMessage(e.getCorpId()).getData().getCname());
|
|
|
|
|
+ //费用名称
|
|
|
|
|
+ e.setItemName(iFeesDescClient.detail(Long.valueOf(e.getCostType())).getData().getCname());
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
detail.setItemsList(list);
|
|
detail.setItemsList(list);
|
|
|
//获取客户中文名
|
|
//获取客户中文名
|
|
|
if (detail.getCorpId() != null){
|
|
if (detail.getCorpId() != null){
|
|
@@ -85,6 +106,12 @@ public class SettlementController extends BladeController {
|
|
|
detail.setCustomerModel(corpMessage.getData());
|
|
detail.setCustomerModel(corpMessage.getData());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ List<CorpsBank> corpsBanks = corpsDescClient.listBankByCorpId(detail.getCorpId());
|
|
|
|
|
+ detail.setBankList(corpsBanks);
|
|
|
|
|
+ //制单人
|
|
|
|
|
+ detail.setCreateUserName(iUserClient.userInfoById(detail.getCreateUser()).getData().getRealName());
|
|
|
|
|
+
|
|
|
return R.data(detail);
|
|
return R.data(detail);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -184,7 +211,6 @@ public class SettlementController extends BladeController {
|
|
|
{
|
|
{
|
|
|
throw new SecurityException("传入数据不能为空");
|
|
throw new SecurityException("传入数据不能为空");
|
|
|
}
|
|
}
|
|
|
- ;
|
|
|
|
|
return R.data(settlementService.apply(dto.getItemsList(),dto.getBillType()));
|
|
return R.data(settlementService.apply(dto.getItemsList(),dto.getBillType()));
|
|
|
}
|
|
}
|
|
|
|
|
|