Browse Source

Merge remote-tracking branch 'origin/master'

master
yunuo970428 2 years ago
parent
commit
61a157eb58
  1. 1
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppInformationHandoverInfoVo.java
  2. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppSaveDataDto.java
  3. 1
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppTwoDto.java
  4. 1
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDetailsVo.java
  5. 78
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java
  6. 4
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoverpreparevehicle/BusHandoverPrepareVehicleService.java
  7. 26
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java
  8. 3
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverMapper.xml
  9. 16
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java
  10. 2
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java
  11. 1
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/vehicleinformationhandover/BusTwoDto.java
  12. 2
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/vehicleinformationhandover/SaveDataDto.java

1
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppInformationHandoverInfoVo.java

@ -17,6 +17,7 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
public class AppInformationHandoverInfoVo implements Vo {
private Integer isFuelVehicle;
private String sid;
private String contractId;
private String customerName;

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppSaveDataDto.java

@ -29,7 +29,7 @@ public class AppSaveDataDto implements Dto {
private String modelSid;
private String modelOrgPath;
private List<AppManiFestBean> maniFestBeanList;
private String orgPath;
@ApiModelProperty("车钥匙个数")
private Integer vehicleKeyNum; // 车钥匙个数
@ApiModelProperty("一致性证书0无1有")

1
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/AppTwoDto.java

@ -21,4 +21,5 @@ public class AppTwoDto implements Dto {
private String modelSid;
private String modelOrgPath;
private String docs;
private String orgPath;
}

1
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busvehicleinformationhandover/BusVehicleInformationHandoverDetailsVo.java

@ -36,5 +36,4 @@ public class BusVehicleInformationHandoverDetailsVo implements Vo {
private String recName; // 接收人
@ApiModelProperty("随车资料")
private BusVehicleInformationVo busVehicleInformation;
}

78
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java

@ -1036,36 +1036,37 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
}
}
baseMapper.insert(busHandover);
ResultBean<List<String>> pdf = createPdf(busHandover.getSid());
String path = "";
if (pdf.getSuccess()) {
//打印pdf
List<String> filePaths = pdf.getData();
List<File> fileList = new ArrayList<>();
if (!filePaths.isEmpty()) {
for (String filePath : filePaths) {
File file = new File(filePath);
fileList.add(file);
}
}
String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
long seconds = System.currentTimeMillis();
String targetPath = docPdfComponent.getUploadTemplateUrl();
File file = WordConvertUtils.mulFile2One(fileList, targetPath + dateStr + seconds + "交车确认.pdf");
if (fileList.size() <= 0) {
path = null;
} else {
for (File fileDelete : fileList) {
fileDelete.delete();
}
path = dateStr + seconds + "交车确认.pdf";
}
}
BusHandover entity = fetchBySid(busHandover.getSid());
entity.setFilePath(path);
baseMapper.updateById(entity);
String temp = "/template/";
return rb.success().setData(temp + path);
// ResultBean<List<String>> pdf = createPdf(busHandover.getSid());
// String path = "";
// if (pdf.getSuccess()) {
// //打印pdf
// List<String> filePaths = pdf.getData();
// List<File> fileList = new ArrayList<>();
// if (!filePaths.isEmpty()) {
// for (String filePath : filePaths) {
// File file = new File(filePath);
// fileList.add(file);
// }
// }
// String dateStr = DateUtil.format(new Date(), "yyyyMMdd");
// long seconds = System.currentTimeMillis();
// String targetPath = docPdfComponent.getUploadTemplateUrl();
// File file = WordConvertUtils.mulFile2One(fileList, targetPath + dateStr + seconds + "交车确认.pdf");
// if (fileList.size() <= 0) {
// path = null;
// } else {
// for (File fileDelete : fileList) {
// fileDelete.delete();
// }
// path = dateStr + seconds + "交车确认.pdf";
// }
// }
// BusHandover entity = fetchBySid(busHandover.getSid());
// entity.setFilePath(path);
// baseMapper.updateById(entity);
// String temp = "/template/";
// return rb.success().setData(temp + path);
return rb.success().setData("");
}
/**
@ -2185,7 +2186,7 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
String nextNodeUserSids = listResultBean.getData().get(0).getASSIGNEE_();
List<String> receiveSidList = Arrays.asList(nextNodeUserSids.split(","));
// if (receiveSidList.size() == 1 && receiveSidList.get(0).equals(busVehicleApply.getCreateBySid())) {
if ("销售专员提交申请".equals(nextName)) {
if ("发起申请".equals(nextName)) {
messageFlowableQuery.setMsgContent("您提交的" + messageFlowableQuery.getModuleName() + "已被驳回,请重新提交");
} else {
SysUserVo userVo = sysUserFeign.fetchBySid(busHandover.getCreateBySid()).getData();
@ -2671,13 +2672,14 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
pdfVo.setColor("-");
pdfVo.setListPdfVos(listPdfVos);
String uploadTemplateUrl = docPdfComponent.getUploadTemplateUrl();
String s = receiveVehicleConfirmationCreatePdf(pdfVo);
BusHandover entity = fetchBySid(sid);
String savePath = s.substring(uploadTemplateUrl.length());
entity.setTrailerFilePath(savePath);
baseMapper.updateById(entity);
String temp = "/template/";
return rb.success().setData(temp + savePath);
// String s = receiveVehicleConfirmationCreatePdf(pdfVo);
// BusHandover entity = fetchBySid(sid);
// String savePath = s.substring(uploadTemplateUrl.length());
// entity.setTrailerFilePath(savePath);
// baseMapper.updateById(entity);
// String temp = "/template/";
// return rb.success().setData(temp + savePath);
return rb.success().setData("");
}

4
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandoverpreparevehicle/BusHandoverPrepareVehicleService.java

@ -148,7 +148,8 @@ public class BusHandoverPrepareVehicleService extends MybatisBaseService<BusHand
List<BusVehicleInformation> busVehicleInformationList = busVehicleInformationService.selectByMainSids(busVehicleInformationHandover.getSid());
busVehicleInformationList.removeAll(Collections.singleton(null));
if (busVehicleInformationList.isEmpty() && !vo.isOnBoardDataState()) {
vo.setOnBoardDataStateStr("接收确认");
// vo.setOnBoardDataStateStr("接收确认");
vo.setOnBoardDataState(false);
}else{
//随车资料的状态控制
if(busVehicleInformationHandover.getCompleteState() == 0){//未完成
@ -159,6 +160,7 @@ public class BusHandoverPrepareVehicleService extends MybatisBaseService<BusHand
HandoverInformationIntemVo handoverInformationIntemVo = listTwo.get(0);
if(StringUtils.isBlank(handoverInformationIntemVo.getRecTime())){
vo.setOnBoardDataState(false);
vo.setOnBoardDataStateStr("接收确认");
}else{
vo.setOnBoardDataState(true);
}

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

@ -409,7 +409,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
initBigDecimalTwo = initBigDecimalTwo.add(stringList.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add));
}
if (initBigDecimalTwo.compareTo(BigDecimal.ZERO) != 0) {
vinList.set(i, vinList.get(i) + "促销(" + initBigDecimalTwo.toString() + "元)");
vinList.set(i, vinList.get(i) + "促销(" + initBigDecimalTwo.toString() + "元)");
}
}
}
@ -458,21 +458,27 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
List<VinListsVo> vinLists = busSalesOrderVehicleService.selectLists(sid);
//包含采购系统的车架号
List<String> vinList = vinLists.stream().map(v -> v.getVinNo()).collect(Collectors.toList());
if (!vinList.isEmpty()) {
for (int i = 0; i < vinLists.size(); i++) {
VinListsVo vinListsVo = vinLists.get(i);
BigDecimal initBigDecimalTwo = BigDecimal.ZERO;
//根据sid去查询销售政策的sid,根据销售政策查询销售政策的金额
ResultBean<List<String>> listResultBean = baseDiscountpackageFeign.getMoney(vinListsVo.getVinSid(), entity.getUseOrgSid());
if (listResultBean.getSuccess() && !listResultBean.getData().isEmpty()) {
List<String> stringList = listResultBean.getData();
initBigDecimalTwo = initBigDecimalTwo.add(stringList.stream().map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add));
}
if (initBigDecimalTwo.compareTo(BigDecimal.ZERO) != 0) {
vinList.set(i, vinList.get(i) + ",促销(" + initBigDecimalTwo.toString() + "元)");
}
}
}
busSalesOrderModelDetailsVo.setVinNo(vinList);
/* List<BusSalesOrderVehicleDetailsVo> busSalesOrderVehicleListVoList = busSalesOrderVehicleService.detailsList(entity.getSid());
if (busSalesOrderVehicleListVoList.size() != 0) {
vo.setBusSalesOrderVehicleList(busSalesOrderVehicleListVoList);
}*/
} else if (BusSalesOrderConstantUtils.TypeEnum.PURCHASE_ORDER.getCode().equals(entity.getType())) {
List<BusSalesVehicleOrder> stringLists = busSalesVehicleOrderService.selectLists(sid);
//包含采购系统的采购订单编号
List<String> stringList = stringLists.stream().map(v -> v.getLinkNo()).collect(Collectors.toList());
busSalesOrderModelDetailsVo.setLinkNo(stringList);
//查询采购订单
// List<BusSalesVehicleOrderDetailsVo> busSalesVehicleOrderDetailsVoList = busSalesVehicleOrderService.detailsList(entity.getSid());
// if (busSalesVehicleOrderDetailsVoList.size() != 0) {
// vo.setBusSalesVehicleOrderList(busSalesVehicleOrderDetailsVoList);
// }
}
vo.setBusSalesOrderModel(busSalesOrderModelDetailsVo);
}

3
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverMapper.xml

@ -95,7 +95,8 @@
model,
contractNo as contractId,
customerName,
remarks
remarks,
isFuelVehicle
FROM bus_vehicle_information_handover
where sid = #{sid}
</select>

16
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busvehicleinformationhandover/BusVehicleInformationHandoverService.java

@ -148,6 +148,9 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
//一次交接
BusVehicleInformation newInformation = new BusVehicleInformation();
BeanUtil.copyProperties(informationDto, newInformation, "id", "sid");
if (null == informationDto.getGasCertificate()) {
newInformation.setGasCertificate(0);
}
//移交状态改为移交中
entity.setTransferStateKey("003");
entity.setTransferStateValue("移交中");
@ -679,7 +682,9 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
list.add(new AppManiFestBean(0, "保修手册、说明书", "manual", "", new ArrayList<>()));
list.add(new AppManiFestBean(0, "环保清单", "environmentalList", "", new ArrayList<>()));
list.add(new AppManiFestBean(0, "驾驶员卡", "dirverCard", "", new ArrayList<>()));
list.add(new AppManiFestBean(0, "气瓶产品质量证明书(燃气车)", "gasCertificate", "", new ArrayList<>()));
if (vo.getIsFuelVehicle() == 0) {
list.add(new AppManiFestBean(0, "气瓶产品质量证明书(燃气车)", "gasCertificate", "", new ArrayList<>()));
}
vo.setManiFestBeanList(list);
return rb.success().setData(vo);
}
@ -696,7 +701,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
BusVehicleInformationHandover entity = fetchBySid(sid);
String receiverSid = entity.getReceiverSid();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(dto.getUserSid()).getData();
String orgPath = sysUserVo.getOrgSidPath();
String orgPath = dto.getOrgPath();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(orgPath).getData();
List<AppManiFestBean> maniFestBeanList = dto.getManiFestBeanList();
for (AppManiFestBean appManiFestBean : maniFestBeanList) {
@ -725,6 +730,9 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
if (StringUtils.isNotBlank(dto.getRemarks())) {
dto.setTransferRemarks(dto.getRemarks());
}
if (null == dto.getGasCertificate()) {
dto.setGasCertificate(0);
}
StringBuffer str = new StringBuffer();
//车钥匙
if (dto.getVehicleKeyNum() > 0) {
@ -797,8 +805,6 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
} else {
entity.setCompleteState(1);
}
} else {
entity.setCompleteState(1);
}
}
}
@ -902,7 +908,7 @@ public class BusVehicleInformationHandoverService extends MybatisBaseService<Bus
BusVehicleInformationHandover handover = fetchBySid(sid);
String receiverSid = handover.getReceiverSid();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(dto.getUserSid()).getData();
String orgPath = sysUserVo.getOrgSidPath();
String orgPath = dto.getOrgPath();
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.selectByOrgSidPath(orgPath).getData();
List<BusVehicleInformation> informations = busVehicleInformationService.getByHandoverSid(sid);
if (informations.size() == 1) {

2
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysorganization/SysOrganizationRest.java

@ -452,6 +452,8 @@ public class SysOrganizationRest implements SysOrganizationFeign {
ResultBean<List<SysFinanceVo>> rb = ResultBean.fireFail();
String useOrgSid = sysStaffOrgService.getOrgSidByPath(orgPath).getData();
List<SysFinanceVo> list = sysOrganizationService.selectBy("金融服务部",useOrgSid);
list.removeAll(Collections.singleton(null));
list = list.stream().filter(v -> StringUtils.isNotBlank(v.getUserSid())).collect(toList());
return rb.success().setData(list);
}

1
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/vehicleinformationhandover/BusTwoDto.java

@ -21,4 +21,5 @@ public class BusTwoDto implements Dto {
private String modelSid;
private String modelOrgPath;
private String docs;
private String orgPath;
}

2
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/autoservice/vehicleinformationhandover/SaveDataDto.java

@ -28,6 +28,6 @@ public class SaveDataDto implements Dto {
private String modelSid;
private String modelOrgPath;
private List<ManiFestBean> maniFestBeanList;
private String orgPath;
}

Loading…
Cancel
Save