Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
yunuo970428 2 years ago
parent
commit
2966cdfca0
  1. 1
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusApplyVo.java
  2. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankMapper.xml
  3. 5
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationService.java
  4. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java
  5. 28
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/AddRetrievalApplyDto.java
  6. 6
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredFeign.java
  7. 5
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredFeignFallback.java
  8. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busadvanceginvoiceapply/BusAdvanceGinvoiceapplyMapper.xml
  9. 109
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busadvanceginvoiceapply/BusAdvanceGinvoiceapplyService.java
  10. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyMapper.xml
  11. 116
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java
  12. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredRest.java
  13. 8
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredService.java
  14. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.java
  15. 8
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml
  16. 6
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  17. 37
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/AddInvoicedApplyDto.java
  18. 2
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplication.java
  19. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeign.java
  20. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeignFallback.java
  21. 2
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecord.java
  22. 5
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordDto.java
  23. 2
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordVo.java
  24. 5
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationRest.java
  25. 21
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java
  26. 1
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordMapper.xml
  27. 213
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordService.java
  28. 1
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkinstock/STKInStockService.java
  29. 2917
      anrui-fin/anrui-fin-biz/src/main/resources/ftl/prePaymentApply.ftl

1
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/busvehicleapply/BusApplyVo.java

@ -14,4 +14,5 @@ public class BusApplyVo implements Vo {
private String name;
private String num;
private String code;
private String bankName;
}

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basemanufacturerbank/BaseManufacturerBankMapper.xml

@ -64,7 +64,7 @@
</select>
<select id="selectByApplySid" resultType="com.yxt.anrui.base.api.busvehicleapply.BusApplyVo">
select bmb.bankAccount num, bmb.accountName name
select bmb.bankAccount num, bmb.accountName name, bmb.depositBank bankName
from base_manufacturer_bank bmb
left join base_manufacturer bm on bm.sid = bmb.manufacturerSid
left join base_vehicle_brand bvb on bvb.manufacturerSid = bm.sid

5
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/baseoutsourcingapplication/BaseOutsourcingApplicationService.java

@ -684,6 +684,7 @@ public class BaseOutsourcingApplicationService extends MybatisBaseService<BaseOu
public void sendFinPaymentrecord(BusinessVariables bv, BaseOutsourcingApplication booad, String costTitleKey, String costTitleValue) {
FinPaymentrecordDto finPaymentrecordDto = new FinPaymentrecordDto();
finPaymentrecordDto.setApplySid(bv.getBusinessSid());
finPaymentrecordDto.setCreateBySid(booad.getCreateBySid());
//付款单位sid
finPaymentrecordDto.setPayCompanySid(booad.getUseOrgSid());
//"付款类别,1付款/2退款"
@ -701,10 +702,14 @@ public class BaseOutsourcingApplicationService extends MybatisBaseService<BaseOu
//收款银行账号和收款单位
if (costTitleKey.equals(ManPurOrderType.CostTitle.CK_COSTTITLE.getCode())) {
finPaymentrecordDto.setReceiveBankAccount(booad.getBankAccount());
finPaymentrecordDto.setReceiveBank(booad.getDepositBankName());
finPaymentrecordDto.setReceiveCompany(booad.getPurchasingUnitName());
finPaymentrecordDto.setRemarks("外采车款");
} else if (costTitleKey.equals(ManPurOrderType.CostTitle.DJ_COSTTITLE.getCode())) {
finPaymentrecordDto.setReceiveBankAccount(booad.getModelBankAccount());
finPaymentrecordDto.setReceiveBank(booad.getModelBankName());
finPaymentrecordDto.setReceiveCompany(booad.getModelAccountName());
finPaymentrecordDto.setRemarks("外采订金");
}
//金额
if (costTitleKey.equals(ManPurOrderType.CostTitle.CK_COSTTITLE.getCode())) {

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/busvehicleapply/BusVehicleApplyService.java

@ -560,6 +560,7 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
finPaymentrecordDto.setCostTypeValue(DictCommonEnum.costType.DJ_TYPE.getRemarks());
finPaymentrecordDto.setPayRemark(busVehicleApply.getPayRemarks());
finPaymentrecordDto.setCreateBySid(busVehicleApply.getCreateBySid());
finPaymentrecordDto.setRemarks("排产订金");
//查询收款单位和收款账号
List<BusVehicleApplyDetailVo> busVehicleApplyDetailList = busVehicleApplyDetailService.fetchByApplySid(busVehicleApply.getSid());
String modelSid = busVehicleApplyDetailList.get(0).getVehicleSid();
@ -568,6 +569,7 @@ public class BusVehicleApplyService extends MybatisBaseService<BusVehicleApplyMa
busApplyVo.removeAll(Collections.singleton(null));
if (!busApplyVo.isEmpty()) {
finPaymentrecordDto.setReceiveBankAccount(busApplyVo.get(0).getNum());
finPaymentrecordDto.setReceiveBank(busApplyVo.get(0).getBankName());
finPaymentrecordDto.setReceiveCompany(busApplyVo.get(0).getName());
}
BaseManufacturer baseManufacturer = baseManufacturerService.fetchBySid(busVehicleApply.getSupplierSid());

28
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/AddRetrievalApplyDto.java

@ -0,0 +1,28 @@
package com.yxt.anrui.buscenter.api.busdelivered;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AddRetrievalApplyDto implements Dto {
private static final long serialVersionUID = -8809397255849039931L;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")
private String name;
@ApiModelProperty("车架号")
private String vinNo;
@ApiModelProperty(value = "车型别名")
private String modelName;
@ApiModelProperty(value = "联系电话")
private String mobile;
@ApiModelProperty(value = "证件号码")
private String idNo;
@ApiModelProperty(value = "联系地址")
private String address;
@ApiModelProperty(value = "成交价")
private String price;
}

6
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredFeign.java

@ -33,6 +33,8 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* Project: anrui-buscenter(业务管理) <br/>
* File: BusDeliveredFeign.java <br/>
@ -89,4 +91,8 @@ public interface BusDeliveredFeign {
@ResponseBody
public ResultBean<AppDeliveredDetailsVo> getRetrievalApplyInfo(@RequestBody AppDeliveredDetailsQuery query);
@ApiOperation("移动端-欠款提车推送待出库")
@PostMapping("/addRetrievalApply")
@ResponseBody
public ResultBean addRetrievalApply(@Valid @RequestBody AddRetrievalApplyDto dto);
}

5
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDeliveredFeignFallback.java

@ -79,4 +79,9 @@ public class BusDeliveredFeignFallback implements BusDeliveredFeign {
public ResultBean<AppDeliveredDetailsVo> getRetrievalApplyInfo(AppDeliveredDetailsQuery query) {
return null;
}
@Override
public ResultBean addRetrievalApply(AddRetrievalApplyDto dto) {
return null;
}
}

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busadvanceginvoiceapply/BusAdvanceGinvoiceapplyMapper.xml

@ -62,7 +62,10 @@
<where>
${ew.sqlSegment}
<if test="name != null and name != ''">
and customerName,contractNo LIKE concat('%'
and concat(IFNULL(contractNo
, '')
, ifnull(customerName
, '')) LIKE concat('%'
, #{name}
, '%')
</if>

109
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busadvanceginvoiceapply/BusAdvanceGinvoiceapplyService.java

@ -49,6 +49,9 @@ import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService;
import com.yxt.anrui.buscenter.biz.flow.FlowableService;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.finbillapplication.AddInvoicedApplyDto;
import com.yxt.anrui.fin.api.finbillapplication.AppVinListDto;
import com.yxt.anrui.fin.api.finbillapplication.FinBillApplicationFeign;
import com.yxt.anrui.flowable.api.flow.FlowableFeign;
import com.yxt.anrui.flowable.api.flow.UpdateFlowFieldVo;
import com.yxt.anrui.flowable.api.flowtask.FlowTaskFeign;
@ -128,6 +131,8 @@ public class BusAdvanceGinvoiceapplyService extends MybatisBaseService<BusAdvanc
private CommonContractFeign commonContractFeign;
@Autowired
private CrmCustomerTempFeign crmCustomerTempFeign;
@Autowired
private FinBillApplicationFeign finBillApplicationFeign;
public PagerVo<BusAdvanceGinvoiceapply> listPage(PagerQuery<BusAdvanceGinvoiceapplyQuery> pq) {
BusAdvanceGinvoiceapplyQuery query = pq.getParams();
@ -717,6 +722,26 @@ public class BusAdvanceGinvoiceapplyService extends MybatisBaseService<BusAdvanc
appMaps.put("contractSid", busAdvanceGinvoiceapply.getSid());
List<String> recipientSidList = new ArrayList<>();
//推送开票申请
AddInvoicedApplyDto addInvoicedApplyDto = new AddInvoicedApplyDto();
addInvoicedApplyDto.setApplyDate(busAdvanceGinvoiceapply.getApplyDate());
addInvoicedApplyDto.setContractNo(busAdvanceGinvoiceapply.getContractNo());
addInvoicedApplyDto.setCustomerName(busAdvanceGinvoiceapply.getCustomerName());
addInvoicedApplyDto.setBillTypeKey("001");
addInvoicedApplyDto.setBillTypeValue("欠款开票");
addInvoicedApplyDto.setUseOrgSid(busAdvanceGinvoiceapply.getUseOrgSid());
addInvoicedApplyDto.setCreateBySid(bv.getUserSid());
List<AppVinListDto> vinList = new ArrayList<>();
List<BusGinvoiceapplyVehicleDetailsVo> busGinvoiceapplyVehicleDetailsVos = busGinvoiceapplyVehicleService.fetchByAdvGinSid(busAdvanceGinvoiceapply.getSid());
for (BusGinvoiceapplyVehicleDetailsVo vehicleDetailsVo : busGinvoiceapplyVehicleDetailsVos) {
AppVinListDto appVinListDto = new AppVinListDto();
appVinListDto.setVIN(vehicleDetailsVo.getVinNo());
vinList.add(appVinListDto);
}
addInvoicedApplyDto.setVinList(vinList);
finBillApplicationFeign.addInvoicedApply(addInvoicedApplyDto);
// 风控中心风控内勤
UserRoleQuery userRoleQuery = new UserRoleQuery();
userRoleQuery.setRoleSid("967e63b0-3b7a-49ed-b42a-d4f904ab84f4");
@ -766,6 +791,7 @@ public class BusAdvanceGinvoiceapplyService extends MybatisBaseService<BusAdvanc
public ResultBean InitiatorToAnswer(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
SysUserVo userVo = sysUserFeign.fetchBySid(bv.getUserSid()).getData();
BusAdvanceGinvoiceapply busAdvanceGinvoiceapply = fetchBySid(bv.getBusinessSid());
Map<String, Object> variables = new HashMap<>();
Map<String, Object> appMap = new HashMap<>();
@ -796,7 +822,90 @@ public class BusAdvanceGinvoiceapplyService extends MybatisBaseService<BusAdvanc
if (!resultBean1.getSuccess()) {
return rb.setMsg(resultBean1.getMsg());
}
UpdateFlowFieldVo ufVo = resultBean1.getData();
updateFlowFiled(BeanUtil.beanToMap(resultBean1.getData()));
if (!"Event_end".equals(ufVo.getTaskDefKey())) {
//极光推送
busAdvanceGinvoiceapply = fetchBySid(bv.getBusinessSid());
ufVo.setProcInsId(busAdvanceGinvoiceapply.getProcInstId());
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVo, messageFlowVo);
ufVo.setProcInsId(busAdvanceGinvoiceapply.getProcInstId());
messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(bv.getBusinessSid());
messageFlowableQuery.setModuleName("提前开票申请");
messageFlowableQuery.setMsgContent(busAdvanceGinvoiceapply.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("提前开票申请");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
} else {
AppScmMessageFlowableQuery query = new AppScmMessageFlowableQuery();
Map<String, Object> appMaps = new HashMap<>();
appMaps.put("contractSid", busAdvanceGinvoiceapply.getSid());
List<String> recipientSidList = new ArrayList<>();
//推送开票申请
AddInvoicedApplyDto addInvoicedApplyDto = new AddInvoicedApplyDto();
addInvoicedApplyDto.setApplyDate(busAdvanceGinvoiceapply.getApplyDate());
addInvoicedApplyDto.setContractNo(busAdvanceGinvoiceapply.getContractNo());
addInvoicedApplyDto.setCustomerName(busAdvanceGinvoiceapply.getCustomerName());
addInvoicedApplyDto.setBillTypeKey("001");
addInvoicedApplyDto.setBillTypeValue("欠款开票");
addInvoicedApplyDto.setUseOrgSid(busAdvanceGinvoiceapply.getUseOrgSid());
addInvoicedApplyDto.setCreateBySid(bv.getUserSid());
List<AppVinListDto> vinList = new ArrayList<>();
List<BusGinvoiceapplyVehicleDetailsVo> busGinvoiceapplyVehicleDetailsVos = busGinvoiceapplyVehicleService.fetchByAdvGinSid(busAdvanceGinvoiceapply.getSid());
for (BusGinvoiceapplyVehicleDetailsVo vehicleDetailsVo : busGinvoiceapplyVehicleDetailsVos) {
AppVinListDto appVinListDto = new AppVinListDto();
appVinListDto.setVIN(vehicleDetailsVo.getVinNo());
vinList.add(appVinListDto);
}
addInvoicedApplyDto.setVinList(vinList);
finBillApplicationFeign.addInvoicedApply(addInvoicedApplyDto);
// 风控中心风控内勤
UserRoleQuery userRoleQuery1 = new UserRoleQuery();
userRoleQuery1.setRoleSid("967e63b0-3b7a-49ed-b42a-d4f904ab84f4");
List<SysUserVo> list1 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery1).getData();
for (SysUserVo user : list1) {
recipientSidList.add(user.getSid());
}
// 分公司会计角色用户
UserQuery userQuery = new UserQuery();
userQuery.setRoleSid("94e3e298-e934-42d2-af02-50e93eee583a");
userQuery.setOrgSidPath(bv.getOrgSidPath());
List<SysUserVo> list = sysUserFeign.getUserByRole(userQuery).getData();
for (SysUserVo user : list) {
recipientSidList.add(user.getSid());
}
//财务中心总经理角色用户
UserRoleQuery userRoleQuery3 = new UserRoleQuery();
userRoleQuery3.setRoleSid("b2bcdfd6-ac51-408c-9c7a-7e9818d23155");
List<SysUserVo> list3 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery3).getData();
for (SysUserVo user : list3) {
recipientSidList.add(user.getSid());
}
//事业部运营经理角色用户
UserRoleQuery userRoleQuery2 = new UserRoleQuery();
userRoleQuery2.setRoleSid("f60b30b0-c7ad-4533-8367-b3ff95cbe725");
List<SysUserVo> list2 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery2).getData();
for (SysUserVo user : list2) {
recipientSidList.add(user.getSid());
}
query.setRecipientSidList(recipientSidList);
query.setAppMap(appMaps);
query.setMsgTitle("业务");
query.setMsgContent(userVo.getName() + "提交的提前开票申请,请查阅");
query.setMsgSource("业务");
query.setMsgTargetUri(MsgTargetUriEnum.TQKPSQTS.getUri());
query.setApp_type("2");
query.setModuleSid("e25e13b5-f2ed-421f-bdb3-6f2eca2a3028");
query.setName("业务");
// 消息推送
messageFeign.sendAutoserviceMessage(query);
}
return rb.success().setData(resultBean1.getData());
} else {
return rb.setMsg("操作失败!提交的数据不一致");

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyMapper.xml

@ -72,7 +72,10 @@
<where>
${ew.sqlSegment}
<if test="name != null and name != ''">
and customerName,contractNo LIKE concat('%'
and concat(IFNULL(contractNo
, '')
, ifnull(customerName
, '')) LIKE concat('%'
, #{name}
, '%')
</if>

116
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busarrearscarryvehicleapply/BusArrearsCarryVehicleApplyService.java

@ -20,8 +20,11 @@ import com.yxt.anrui.buscenter.api.busarrearscarryvehicleapply.flowable.*;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetails;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsDto;
import com.yxt.anrui.buscenter.api.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsVo;
import com.yxt.anrui.buscenter.api.busdelivered.AddRetrievalApplyDto;
import com.yxt.anrui.buscenter.api.busdelivered.BusDeliveredFeign;
import com.yxt.anrui.buscenter.api.bussalesorder.contract.AppRovalContractPageVo;
import com.yxt.anrui.buscenter.biz.busarrearscarryvehicledetails.BusArrearsCarryVehicleDetailsService;
import com.yxt.anrui.buscenter.biz.busdelivered.BusDeliveredService;
import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService;
import com.yxt.anrui.buscenter.biz.flow.FlowableService;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
@ -122,6 +125,9 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
@Autowired
private FlowTaskFeign flowTaskFeign;
@Autowired
private BusDeliveredService busDeliveredService;
/**
* 欠款提车分页列表查询条件
*
@ -763,9 +769,29 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
appMaps.put("contractSid", busArrearsCarryVehicleApply.getSid());
List<String> recipientSidList = new ArrayList<>();
// 风控中心总经理角色用户
//推送出库申请
List<BusArrearsCarryVehicleDetailsVo> vehicleDetailsVos = busArrearsCarryVehicleDetailsService.selByArrearsSid(busArrearsCarryVehicleApply.getSid());
if (vehicleDetailsVos.size() > 0) {
for (BusArrearsCarryVehicleDetailsVo vehicleDetailsVo : vehicleDetailsVos) {
AddRetrievalApplyDto addRetrievalApplyDto = new AddRetrievalApplyDto();
addRetrievalApplyDto.setVinNo(vehicleDetailsVo.getVinNo());
addRetrievalApplyDto.setPrice(String.valueOf(vehicleDetailsVo.getDealMoney()));
addRetrievalApplyDto.setContractNo(busArrearsCarryVehicleApply.getContractNo());
addRetrievalApplyDto.setName(busArrearsCarryVehicleApply.getCustomerName());
busDeliveredService.addRetrievalApply(addRetrievalApplyDto);
}
}
// 风控中心风控经理
UserRoleQuery userRoleQuery1 = new UserRoleQuery();
userRoleQuery1.setRoleSid("967e63b0-3b7a-49ed-b42a-d4f904ab84f4");
List<SysUserVo> list4 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery1).getData();
for (SysUserVo userVo : list4) {
recipientSidList.add(userVo.getSid());
}
// 风控中心风控内勤
UserRoleQuery userRoleQuery = new UserRoleQuery();
userRoleQuery.setRoleSid("537bea8f-75e8-430c-9a5f-3140bda41f39");
userRoleQuery.setRoleSid("967e63b0-3b7a-49ed-b42a-d4f904ab84f4");
List<SysUserVo> list1 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery).getData();
for (SysUserVo userVo : list1) {
recipientSidList.add(userVo.getSid());
@ -812,6 +838,7 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
public ResultBean InitiatorToAnswerInfo(BusinessVariables bv) {
ResultBean rb = ResultBean.fireFail();
SysUserVo userVos = sysUserFeign.fetchBySid(bv.getUserSid()).getData();
BusArrearsCarryVehicleApply busArrearsCarryVehicleApply = fetchBySid(bv.getBusinessSid());
Map<String, Object> variables = new HashMap<>();
Map<String, Object> appMap = new HashMap<>();
@ -842,7 +869,92 @@ public class BusArrearsCarryVehicleApplyService extends MybatisBaseService<BusAr
if (!resultBean1.getSuccess()) {
return rb.setMsg(resultBean1.getMsg());
}
UpdateFlowFieldVo ufVos = resultBean1.getData();
updateFlowFiled(BeanUtil.beanToMap(resultBean1.getData()));
if (!"Event_end".equals(ufVos.getTaskDefKey())) {
//极光推送
busArrearsCarryVehicleApply = fetchBySid(bv.getBusinessSid());
ufVos.setProcInsId(busArrearsCarryVehicleApply.getProcInstId());
MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery();
MessageFlowVo messageFlowVo = new MessageFlowVo();
BeanUtil.copyProperties(ufVos, messageFlowVo);
ufVos.setProcInsId(busArrearsCarryVehicleApply.getProcInstId());
messageFlowableQuery.setUfVo(messageFlowVo);
messageFlowableQuery.setAppMap(appMap);
messageFlowableQuery.setBusinessSid(bv.getBusinessSid());
messageFlowableQuery.setModuleName("欠款提车申请");
messageFlowableQuery.setMsgContent(busArrearsCarryVehicleApply.getApplyName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批");
messageFlowableQuery.setMsgTitle("欠款提车申请");
ResultBean<String> stringResultBean = messageFeign.pushMessage(messageFlowableQuery);
} else {
AppScmMessageFlowableQuery query = new AppScmMessageFlowableQuery();
Map<String, Object> appMaps = new HashMap<>();
appMaps.put("contractSid", busArrearsCarryVehicleApply.getSid());
List<String> recipientSidList = new ArrayList<>();
//推送出库申请
List<BusArrearsCarryVehicleDetailsVo> vehicleDetailsVos = busArrearsCarryVehicleDetailsService.selByArrearsSid(busArrearsCarryVehicleApply.getSid());
if (vehicleDetailsVos.size() > 0) {
for (BusArrearsCarryVehicleDetailsVo vehicleDetailsVo : vehicleDetailsVos) {
AddRetrievalApplyDto addRetrievalApplyDto = new AddRetrievalApplyDto();
addRetrievalApplyDto.setVinNo(vehicleDetailsVo.getVinNo());
addRetrievalApplyDto.setPrice(String.valueOf(vehicleDetailsVo.getDealMoney()));
addRetrievalApplyDto.setContractNo(busArrearsCarryVehicleApply.getContractNo());
addRetrievalApplyDto.setName(busArrearsCarryVehicleApply.getCustomerName());
busDeliveredService.addRetrievalApply(addRetrievalApplyDto);
}
}
// 风控中心风控经理
UserRoleQuery userRoleQuery1 = new UserRoleQuery();
userRoleQuery1.setRoleSid("242d52de-7df9-4fab-91ff-d6f07dc98341");
List<SysUserVo> list4 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery1).getData();
for (SysUserVo userVo : list4) {
recipientSidList.add(userVo.getSid());
}
// 风控中心风控内勤
UserRoleQuery userRoleQuery2 = new UserRoleQuery();
userRoleQuery2.setRoleSid("967e63b0-3b7a-49ed-b42a-d4f904ab84f4");
List<SysUserVo> list1 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery2).getData();
for (SysUserVo userVo : list1) {
recipientSidList.add(userVo.getSid());
}
// 分公司会计角色用户
UserQuery userQuery = new UserQuery();
userQuery.setRoleSid("94e3e298-e934-42d2-af02-50e93eee583a");
userQuery.setOrgSidPath(bv.getOrgSidPath());
List<SysUserVo> list = sysUserFeign.getUserByRole(userQuery).getData();
for (SysUserVo userVo : list) {
recipientSidList.add(userVo.getSid());
}
//财务中心总经理角色用户
UserRoleQuery userRoleQuery3 = new UserRoleQuery();
userRoleQuery3.setRoleSid("b2bcdfd6-ac51-408c-9c7a-7e9818d23155");
List<SysUserVo> list3 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery3).getData();
for (SysUserVo userVo : list3) {
recipientSidList.add(userVo.getSid());
}
//事业部运营经理角色用户
UserRoleQuery userRoleQuery4 = new UserRoleQuery();
userRoleQuery4.setRoleSid("f60b30b0-c7ad-4533-8367-b3ff95cbe725");
List<SysUserVo> list2 = sysUserFeign.getOtherOrgRoleUser(userRoleQuery4).getData();
for (SysUserVo userVo : list2) {
recipientSidList.add(userVo.getSid());
}
query.setRecipientSidList(recipientSidList);
query.setAppMap(appMaps);
query.setMsgTitle("业务");
query.setMsgContent(userVos.getName() + "提交的欠款提车申请,请查阅");
query.setMsgSource("业务");
query.setMsgTargetUri(MsgTargetUriEnum.TQKPSQTS.getUri());
query.setApp_type("2");
query.setModuleSid("e25e13b5-f2ed-421f-bdb3-6f2eca2a3028");
query.setName("业务");
// 消息推送
messageFeign.sendAutoserviceMessage(query);
}
return rb.success().setData(resultBean1.getData());
} else {
return rb.setMsg("操作失败!提交的数据不一致");

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredRest.java

@ -109,4 +109,9 @@ public class BusDeliveredRest implements BusDeliveredFeign {
ResultBean<AppDeliveredDetailsVo> resultBean = busDeliveredService.getRetrievalApplyInfo(query);
return rb.setData(resultBean.getData());
}
@Override
public ResultBean addRetrievalApply(AddRetrievalApplyDto dto) {
return busDeliveredService.addRetrievalApply(dto);
}
}

8
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdelivered/BusDeliveredService.java

@ -190,4 +190,12 @@ public class BusDeliveredService extends MybatisBaseService<BusDeliveredMapper,
vo.setCarList(appCarListVos);
return rb.success().setData(vo);
}
public ResultBean addRetrievalApply(AddRetrievalApplyDto dto) {
ResultBean rb = ResultBean.fireFail();
BusDelivered busDelivered = new BusDelivered();
BeanUtil.copyProperties(dto, busDelivered);
save(busDelivered);
return rb.success();
}
}

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.java

@ -175,7 +175,7 @@ public interface BusSalesOrderMapper extends BaseMapper<BusSalesOrder> {
List<String> getList(String saleOrderSid);
IPage<AppRovalContractPageVo> getApprovalContractList(IPage<AppRovalContractPageVo> page, @Param(Constants.WRAPPER) QueryWrapper<AppRovalContractPageVo> qw);
IPage<AppRovalContractPageVo> getApprovalContractList(IPage<AppRovalContractPageVo> page, @Param(Constants.WRAPPER) QueryWrapper<AppRovalContractPageVo> qw, @Param("name") String name);
List<AppRovalContractPageVo> selectByContractNo(@Param("contractNo") String contractNo);
}

8
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderMapper.xml

@ -242,6 +242,14 @@
LEFT JOIN bus_sales_order_vehicle bsov ON bsov.salesOrderSid = bo.sid
<where>
${ew.sqlSegment}
<if test="name != null and name != ''">
and concat(IFNULL(bo.contractNo
, '')
, ifnull(bo.customerName
, '')) LIKE concat('%'
, #{name}
, '%')
</if>
and length(bo.contractNo) > 1
</where>
</select>

6
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

@ -2075,8 +2075,8 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
//验证总订金是否正确
//结转金额是否超过订金合计、需补交金额是否是负数
BusSalesOrderDeposit busSalesOrderDeposit = busSalesOrderDepositService.selectByOrderSid(sid);
if(busSalesOrderDeposit.getMakeUpDeposit() != null){
if(busSalesOrderDeposit.getMakeUpDeposit().compareTo(new BigDecimal("0"))<0){
if (busSalesOrderDeposit.getMakeUpDeposit() != null) {
if (busSalesOrderDeposit.getMakeUpDeposit().compareTo(new BigDecimal("0")) < 0) {
return rb.setMsg("订金信息存在错误,请检查");
}
}
@ -2789,7 +2789,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
QueryWrapper<AppRovalContractPageVo> qw = new QueryWrapper<>();
qw.eq("bo.staffSid", sysUserVo.getStaffSid());
IPage<AppRovalContractPageVo> page = PagerUtil.queryToPage(pagerQuery);
IPage<AppRovalContractPageVo> iPage = baseMapper.getApprovalContractList(page, qw);
IPage<AppRovalContractPageVo> iPage = baseMapper.getApprovalContractList(page, qw, params.getName());
for (AppRovalContractPageVo record : iPage.getRecords()) {
String busSid = record.getBusSid();
CommonContractVo commonContract = commonContractFeign.getContractBySalesOrderSid(busSid).getData();

37
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/AddInvoicedApplyDto.java

@ -0,0 +1,37 @@
package com.yxt.anrui.fin.api.finbillapplication;
import com.yxt.common.core.dto.Dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class AddInvoicedApplyDto implements Dto {
private static final long serialVersionUID = -2942692578331132685L;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")
private String customerName;
@ApiModelProperty("申请日期")
private String applyDate;
@ApiModelProperty("开票类型key")
private String billTypeKey;
@ApiModelProperty("开票类型value")
private String billTypeValue;
@ApiModelProperty("分公司sid")
private String useOrgSid;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("车辆集合")
private List<AppVinListDto> vinList;
}

2
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplication.java

@ -54,6 +54,8 @@ public class FinBillApplication extends BaseEntity {
@ApiModelProperty("创建人接口")
private String createByName; // 创建人接口
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("分公司sid")
private String useOrgSid; // 分公司sid
@ApiModelProperty("合同sid")

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeign.java

@ -156,4 +156,9 @@ public interface FinBillApplicationFeign {
@ResponseBody
public ResultBean saveInvoicedApplyInfo(@Valid @RequestBody AppBillApplicationIInfoDto dto);
@ApiOperation("提前开票推送接口")
@PostMapping("/addInvoicedApply")
@ResponseBody
public ResultBean addInvoicedApply(@Valid @RequestBody AddInvoicedApplyDto dto);
}

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finbillapplication/FinBillApplicationFeignFallback.java

@ -125,4 +125,9 @@ public class FinBillApplicationFeignFallback implements FinBillApplicationFeign
public ResultBean saveInvoicedApplyInfo(AppBillApplicationIInfoDto dto) {
return null;
}
@Override
public ResultBean addInvoicedApply(AddInvoicedApplyDto dto) {
return null;
}
}

2
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecord.java

@ -91,6 +91,8 @@ public class FinPaymentrecord extends BaseEntity {
private String costTitleValue;
@ApiModelProperty("收款银行账号")
private String receiveBankAccount;
@ApiModelProperty("收款银行名称")
private String receiveBank;
@ApiModelProperty("收款单位名称")
private String receiveCompany;
@ApiModelProperty(value = "金额")

5
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordDto.java

@ -70,6 +70,8 @@ public class FinPaymentrecordDto implements Dto {
private String costTitleValue;
@ApiModelProperty("收款银行账号")
private String receiveBankAccount;
@ApiModelProperty("收款银行名称")
private String receiveBank;
@ApiModelProperty("收款单位名称")
private String receiveCompany;
@ApiModelProperty(value = "金额")
@ -83,5 +85,6 @@ public class FinPaymentrecordDto implements Dto {
private String payCode;
@ApiModelProperty("创建人sid")
private String createBySid;
@ApiModelProperty("备注信息")
private String remarks;
}

2
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finpaymentrecord/FinPaymentrecordVo.java

@ -70,6 +70,8 @@ public class FinPaymentrecordVo implements Vo {
private String costTypeValue;
@ApiModelProperty(value = "款项名称")
private String costTitleValue;
@ApiModelProperty("收款银行名称")
private String receiveBank;
@ApiModelProperty(value = "收款单位名称")
private String receiveCompany;
@ApiModelProperty(value = "收款账号")

5
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationRest.java

@ -155,4 +155,9 @@ public class FinBillApplicationRest implements FinBillApplicationFeign {
public ResultBean saveInvoicedApplyInfo(AppBillApplicationIInfoDto dto) {
return finBillApplicationService.saveInvoicedApplyInfo(dto);
}
@Override
public ResultBean addInvoicedApply(AddInvoicedApplyDto dto) {
return finBillApplicationService.addInvoicedApply(dto);
}
}

21
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finbillapplication/FinBillApplicationService.java

@ -78,6 +78,7 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.messagecenter.api.message.MessageFeign;
import com.yxt.messagecenter.api.message.MessageFlowVo;
import com.yxt.messagecenter.api.message.MessageFlowableQuery;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -968,8 +969,8 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
IPage<AppBillApplicationPageVo> iPage = baseMapper.getInvoicedApplyList(page, qw);
List<AppBillApplicationPageVo> records = iPage.getRecords();
for (AppBillApplicationPageVo record : records) {
String contractSid = record.getContractSid();
SysUserVo data = sysUserFeign.fetchBySid(contractSid).getData();
String createBySid = record.getCreateBySid();
SysUserVo data = sysUserFeign.fetchBySid(createBySid).getData();
record.setApplyName(data.getName());
}
return iPage;
@ -1118,6 +1119,22 @@ public class FinBillApplicationService extends MybatisBaseService<FinBillApplica
}
}
public ResultBean addInvoicedApply(AddInvoicedApplyDto dto) {
ResultBean rb = ResultBean.fireFail();
FinBillApplication finBillApplication = new FinBillApplication();
BeanUtil.copyProperties(dto, finBillApplication, "sid");
List<AppVinListDto> vinList = dto.getVinList();
for (AppVinListDto appVinListDto : vinList) {
FinBillVehicle finBillVehicle = new FinBillVehicle();
BeanUtil.copyProperties(appVinListDto, finBillVehicle, "sid");
finBillVehicle.setBillAppSid(finBillApplication.getSid());
finBillVehicleService.save(finBillVehicle);
}
finBillApplication.setNum(vinList.size());
save(finBillApplication);
return rb.success();
}
/* public ResultBean submitFinBillApplicationPageList(SubmitFinBillApplicationPageListDto dto) {
ResultBean rb = ResultBean.fireFail();

1
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordMapper.xml

@ -20,6 +20,7 @@
fp.costTypeValue,
fp.receiveCompany,
fp.receiveBankAccount,
fp.receiveBank,
fp.cost,
fp.payFile
FROM fin_paymentrecord fp

213
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finpaymentrecord/FinPaymentrecordService.java

@ -28,6 +28,7 @@ package com.yxt.anrui.fin.biz.finpaymentrecord;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.basemanufactorsubscription.BaseManufUpdateDto;
@ -59,9 +60,11 @@ import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.base.utils.WordConvertUtils;
import com.yxt.common.base.utils.WordUtils;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -72,6 +75,7 @@ import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.text.NumberFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -90,6 +94,7 @@ import static cn.hutool.core.util.ClassLoaderUtil.getClassLoader;
* @version 1.0
* @since 1.0
*/
@Slf4j
@Service
public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecordMapper, FinPaymentrecord> {
@ -343,61 +348,78 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
String createBySid = finPaymentrecord.getCreateBySid();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(createBySid).getData();
String createByName = sysStaffinfoFeign.fetchBySid(sysUserVo.getStaffSid()).getData().getName();
//获取分公司名称
SysOrganization sysOrganization = sysOrganizationFeign.selectBySid(finPaymentrecord.getCreateOrgSid()).getData();
String createOrgName = sysOrganization.getName();
//获取创建部门
List<SysStaffOrgVo> sysStaffOrgVos = sysStaffOrgFeign.getSysStaffOrgListByStaffSid(sysUserVo.getStaffSid()).getData();
StringBuilder deptName = new StringBuilder();
for (SysStaffOrgVo sysStaffOrgVo : sysStaffOrgVos) {
String orgName = sysStaffOrgVo.getOrgName();
deptName.append(orgName).append(" ");
//部门名称
String deptOrgName = sysStaffOrgVo.getOrgName();
String deptOrgSid = sysStaffOrgVo.getOrgSid();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(deptOrgSid).getData();
String psid = sysOrganizationVo.getPsid();
SysOrganizationVo sysOrganizationVo1 = sysOrganizationFeign.fetchBySid(psid).getData();
String orgName = sysOrganizationVo1.getName();
String psid1 = sysOrganizationVo1.getPsid();
SysOrganizationVo sysOrganizationVo2 = sysOrganizationFeign.fetchBySid(psid1).getData();
String pname = sysOrganizationVo2.getName();
deptName.append(pname).append("-").append(orgName).append("-").append(deptOrgName).append(" ");
}
//获取分公司名称
SysOrganization sysOrganization = sysOrganizationFeign.selectBySid(finPaymentrecord.getCreateOrgSid()).getData();
String createOrgName = sysOrganization.getName();
//获取审批编号
BaseOutsourcingApplicationDetailsVo baseOutsourcingApplicationDetailsVo = baseOutsourcingApplicationFeign.fetchBySid(finPaymentrecord.getApplySid()).getData();
BusVehicleApplyDetailsVo busVehicleApplyDetailsVo = busVehicleApplyFeign.fetchSid(finPaymentrecord.getApplySid()).getData();
if (StringUtils.isNotBlank(baseOutsourcingApplicationDetailsVo.getApplicationCode())) {
dataMap.put("applyCode", baseOutsourcingApplicationDetailsVo.getApplicationCode());
//获取审批记录
FlowRecordVo flowRecordVo = flowTaskFeign.businessFlowRecord(baseOutsourcingApplicationDetailsVo.getProcInstSid()).getData();
List<FlowTask> flowList = flowRecordVo.getFlowList();
List<FinPaymentrecordSourceLCVo> finPaymentrecordSourceLCVos = new ArrayList<>();
for (FlowTask flowTask : flowList) {
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
finPaymentrecordSourceLCVo.setName(flowTask.getTaskUserInfos().get(0).getAssigneeName());
finPaymentrecordSourceLCVo.setComment(flowTask.getComment().getComment());
finPaymentrecordSourceLCVo.setSpsj(DateUtil.format(flowTask.getFinishTime(),"yyyy-MM-dd"));
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
dataMap.put("lcList", finPaymentrecordSourceLCVos);
//获取附件名称(文档类型)
CommonAppendixVo contract = baseOutsourcingApplicationDetailsVo.getContract();
if (contract != null) {
dataMap.put("fileName", contract.getFileName());
if (baseOutsourcingApplicationDetailsVo != null) {
if (StringUtils.isNotBlank(baseOutsourcingApplicationDetailsVo.getApplicationCode())) {
dataMap.put("applyCode", baseOutsourcingApplicationDetailsVo.getApplicationCode());
//获取审批记录
FlowRecordVo flowRecordVo = flowTaskFeign.businessFlowRecord(baseOutsourcingApplicationDetailsVo.getProcInstSid()).getData();
List<FlowTask> flowList = flowRecordVo.getFlowList();
List<FinPaymentrecordSourceLCVo> finPaymentrecordSourceLCVos = new ArrayList<>();
for (FlowTask flowTask : flowList) {
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
finPaymentrecordSourceLCVo.setName(flowTask.getTaskUserInfos().get(0).getAssigneeName());
finPaymentrecordSourceLCVo.setComment(flowTask.getComment().getComment());
finPaymentrecordSourceLCVo.setSpsj(DateUtil.format(flowTask.getFinishTime(), "yyyy-MM-dd"));
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
dataMap.put("lcList", finPaymentrecordSourceLCVos);
//获取附件名称(文档类型)
CommonAppendixVo contract = baseOutsourcingApplicationDetailsVo.getContract();
if (contract != null) {
dataMap.put("fileName", contract.getFileName());
}
}
} else if (StringUtils.isNotBlank(busVehicleApplyDetailsVo.getSid())) {
dataMap.put("applyCode", busVehicleApplyDetailsVo.getApplicationCode());
//获取审批记录
FlowRecordVo flowRecordVo = flowTaskFeign.businessFlowRecord(busVehicleApplyDetailsVo.getProcInstId()).getData();
List<FlowTask> flowList = flowRecordVo.getFlowList();
List<FinPaymentrecordSourceLCVo> finPaymentrecordSourceLCVos = new ArrayList<>();
for (FlowTask flowTask : flowList) {
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
finPaymentrecordSourceLCVo.setName(flowTask.getTaskUserInfos().get(0).getAssigneeName());
finPaymentrecordSourceLCVo.setComment(flowTask.getComment().getComment());
finPaymentrecordSourceLCVo.setSpsj(DateUtil.format(flowTask.getFinishTime(),"yyyy-MM-dd"));
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
if (busVehicleApplyDetailsVo != null) {
if (StringUtils.isNotBlank(busVehicleApplyDetailsVo.getSid())) {
dataMap.put("applyCode", busVehicleApplyDetailsVo.getApplicationCode());
//获取审批记录
FlowRecordVo flowRecordVo = flowTaskFeign.businessFlowRecord(busVehicleApplyDetailsVo.getProcInstId()).getData();
List<FlowTask> flowList = flowRecordVo.getFlowList();
List<FinPaymentrecordSourceLCVo> finPaymentrecordSourceLCVos = new ArrayList<>();
for (FlowTask flowTask : flowList) {
FinPaymentrecordSourceLCVo finPaymentrecordSourceLCVo = new FinPaymentrecordSourceLCVo();
finPaymentrecordSourceLCVo.setName(flowTask.getTaskUserInfos().get(0).getAssigneeName());
finPaymentrecordSourceLCVo.setComment(flowTask.getComment().getComment());
finPaymentrecordSourceLCVo.setSpsj(DateUtil.format(flowTask.getFinishTime(), "yyyy-MM-dd"));
finPaymentrecordSourceLCVos.add(finPaymentrecordSourceLCVo);
}
dataMap.put("lcList", finPaymentrecordSourceLCVos);
}
dataMap.put("lcList", finPaymentrecordSourceLCVos);
}
dataMap.put("createTime", DateUtil.format(finPaymentrecord.getCreateTime(),"yyyy-MM-dd"));
dataMap.put("createTime", DateUtil.format(finPaymentrecord.getCreateTime(), "yyyy-MM-dd"));
dataMap.put("createByName", createByName);
dataMap.put("createByDeptName", deptName);
dataMap.put("createOrgName", createOrgName);
dataMap.put("remarks", finPaymentrecord.getRemarks());
dataMap.put("receiveCompany", finPaymentrecord.getReceiveCompany());
dataMap.put("receiveBank", finPaymentrecord.getReceiveBank());
dataMap.put("receiveBankAccount", finPaymentrecord.getReceiveBankAccount());
dataMap.put("cost", finPaymentrecord.getCost());
Double aDouble = Double.valueOf(finPaymentrecord.getCost());
String s = upperCase2(aDouble);
dataMap.put("cost", finPaymentrecord.getCost() + " " + "(" + s + ")");
dataMap.put("payRemark", finPaymentrecord.getPayRemark());
//获取图片路径
// String photoPath = "file://D:/anrui/upload/20211227/kbjl_20211227143750186948.jpg";
@ -405,19 +427,27 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
String photoPath64 = image2Base64(photoPath);
dataMap.put("photoPath64", photoPath64);*/
//获取模板
// 模板路径
String sourcePath = "D:\\anrui\\upload\\template\\";
File file = new File(getClass().getClassLoader().getResource("ftl/prePaymentApply.ftl").getFile());
String dir = getClassLoader().getResource("ftl").getPath();
log.info("dir:{}",dir);
//生成word文件名
String targetPath = docPdfComponent.getUploadTemplateUrl();
// String targetPath = docPdfComponent.getUploadTemplateUrl();
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String typeName = dateStr + seconds + ".doc";
WordConvertUtils.creatWord(dataMap, file, targetPath, typeName, dir);
// 生成文件路径
String targetPath = sourcePath + dateStr;
log.info("dataMap:{}", JSONObject.toJSONString(dataMap));
// WordConvertUtils.creatWord(dataMap, file, targetPath, typeName, dir);
WordUtils.creatWord(dataMap, "prePaymentApply", sourcePath, targetPath, typeName);
//新生成的word路径
String wordPath = targetPath + typeName;
String wordPath = targetPath + "\\"+typeName;
//生成出门证文件名
String pdfName = "预付款申请_" + dateStr + seconds + ".pdf";
WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
WordUtils.doc2pdf(wordPath, targetPath, pdfName);
//WordConvertUtils.doc2pdf(wordPath, targetPath, pdfName);
return rb.success().setData("/template/" + pdfName);
}
@ -505,4 +535,103 @@ public class FinPaymentrecordService extends MybatisBaseService<FinPaymentrecord
}
return imgUrl;
}
public static String upperCase2(double money) {
String[] upNum = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"};
String[] danwei = {"圆", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟"};
//取消科学记数法
NumberFormat numFormat = NumberFormat.getInstance();
numFormat.setMaximumFractionDigits(2);//设置小数位个数
numFormat.setGroupingUsed(false);//取消科学技术发
String formatNum = numFormat.format(money);
String strmoney = formatNum + "";//浮点型转为字符型
String lastUpNum = "null"; //用于存放上个参数的值
String result = "";//返回的结果
String[] split = strmoney.split("\\.");
String strMoney = split[0];
String point = "";
//小数部分取值处理。
if (split.length > 1) {
point = split[1];
if (point.length() == 1) {
point = point.concat("0");
}
} else {
point = "0";
}
//大于12位就直接返回。
int moneyLen = strMoney.length();
if (money == 0) {
return "零圆整";
}
if (moneyLen > 12) {
return "金额:" + money + "元,超出大写转换范围。最大金额:999999999999.99元";
}
//整数(integer)部分处理。
if (!"0".equals(strMoney)) {
for (int i = 0; i < moneyLen; i++) {
String strNum = strMoney.charAt(i) + "";
int singleNum = Integer.parseInt(strNum);
String upSingleNum = upNum[singleNum];
//上一为不等于0的情况
if (!"零".equals(lastUpNum)) {
if (!"零".equals(upSingleNum)) {
result = result.concat(upSingleNum).concat(danwei[moneyLen - i - 1]);
} else
//为零但是在万、亿位上要加单位 (moneyLen-i)==9 指的是单位:亿。 (moneyLen-i)==5指的是单位:万
if ((moneyLen - i) == 5 || (moneyLen - i) == 9) {
lastUpNum = "";
} else {
result = result.concat(upSingleNum);
}
}
//上一位为0的情况
if ("零".equals(lastUpNum) && !"零".equals(upSingleNum)) {
result = result.concat(upSingleNum).concat(danwei[moneyLen - i - 1]);
}
//捕捉上一位数(lastUpNum)为零的情况做优化。
if ((moneyLen - i) == 5 || (moneyLen - i) == 9) {
//排除加单位时前面为"零"的情况。如:两百零万
if ("零".equals(lastUpNum) || "null".equals(lastUpNum)) {
result = result.substring(0, result.length() - 1);
}
if (!result.endsWith("亿")) {
result = result.concat(danwei[moneyLen - i - 1]);
}
lastUpNum = "";
} else {
//把当前大写数字复制给 lastUpNum 用于下次判断
lastUpNum = upSingleNum;
}
}
//对几万元整和几亿元整(result:五万零或者五亿零零)做优化。
result = result.replaceAll("零零", "零");
if (result.endsWith("零")) {
String substring = result.substring(0, result.length() - 1);
result = substring;
}
result = result.concat("圆");
result = result.replaceAll("圆圆", "圆");
result = result.replaceAll("万万", "万");
}
//小数(point)部分处理
if ("0".equals(point)) {
result = result + "整";
} else {
//去 整
// if(result.endsWith("整")){
// result = result.substring(0,result.length()-1);
// }
if ((point.charAt(0) + "").equals("0")) {
result = result.concat(upNum[Integer.parseInt(point.charAt(1) + "")] + "分");
} else if ((point.charAt(1) + "").equals("0")) {
result = result.concat(upNum[Integer.parseInt(point.charAt(0) + "")] + "角");
} else {
result = result.concat(upNum[Integer.parseInt(point.charAt(0) + "")] + "角").concat(upNum[Integer.parseInt(point.charAt(1) + "")] + "分");
}
}
return result;
}
}

1
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/stkinstock/STKInStockService.java

@ -92,6 +92,7 @@ public class STKInStockService extends FinKingDeeService {
log.info("kingDataInfoByNumber:{}",kingDataInfoByNumber.getData());
if(responseStatus!=null){//不存在该物料
//新增物料
f.setFLot("");
bdMaterial(stkInStock, f);
}else{ //存在该物料
//分配物料

2917
anrui-fin/anrui-fin-biz/src/main/resources/ftl/prePaymentApply.ftl

File diff suppressed because it is too large
Loading…
Cancel
Save