Browse Source

随车资料确认单打印增加单据编号,制单时间

master
fanzongzhe 2 years ago
parent
commit
c31893ab05
  1. 32
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/common/enums/BillTypeEnum.java
  2. 2
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusHandover.java
  3. 4
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusReceiveVehiclePdfVo.java
  4. 2
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverMapper.java
  5. 5
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverMapper.xml
  6. 40
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverService.java
  7. 61
      anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/vehicledatahandover.ftl

32
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/common/enums/BillTypeEnum.java

@ -15,22 +15,22 @@ public enum BillTypeEnum {
NGSQ("NGSQ", "内购申请"), NGSQ("NGSQ", "内购申请"),
TZSQ("TZSQ", "调账申请"), TZSQ("TZSQ", "调账申请"),
CJTKSQ("CJTKSQ", "厂家退库申请"), CJTKSQ("CJTKSQ", "厂家退库申请"),
FYSQ("FYSQ","费用申请"), FYSQ("FYSQ", "费用申请"),
FKSQ("FKSQ","付款申请"), FKSQ("FKSQ", "付款申请"),
KCDDBGSQ("KCDDBG","库存地点变更申请"), KCDDBGSQ("KCDDBG", "库存地点变更申请"),
JYDDDJSQ("JYDDDJSQ","简易订单订金收取"), JYDDDJSQ("JYDDDJSQ", "简易订单订金收取"),
JYDDCLYD("JYDDCLYD","简易订单车辆预定"), JYDDCLYD("JYDDCLYD", "简易订单车辆预定"),
XSDDHT("XSDDHT","销售订单合同"), XSDDHT("XSDDHT", "销售订单合同"),
XSDD("XSDD","销售订单"), XSDD("XSDD", "销售订单"),
SKD("SKD","款项确认"), SKD("SKD", "款项确认"),
KPSQ("KPSQ","公司开票申请"), KPSQ("KPSQ", "公司开票申请"),
QKKP("QKKP","欠款开票"), QKKP("QKKP", "欠款开票"),
QKLP("QKLP","欠款领票"), QKLP("QKLP", "欠款领票"),
GCRK("GCRK","挂车入库"), GCRK("GCRK", "挂车入库"),
SZRK("SZRK","上装入库"), SZRK("SZRK", "上装入库"),
XSDDTCSQ("XSDDTCSQ","销售订单退车申请"), XSDDTCSQ("XSDDTCSQ", "销售订单退车申请"),
QKTCSQ("QKTCSQ","欠款提车申请"), QKTCSQ("QKTCSQ", "欠款提车申请"),
; JCZLQRD("JCZLQRD", "交车资料确认单");
private String billType; private String billType;
private String billTypeName; private String billTypeName;

2
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusHandover.java

@ -64,5 +64,7 @@ public class BusHandover extends BaseEntity {
private String payTypeKey; private String payTypeKey;
@ApiModelProperty("付款方式value") @ApiModelProperty("付款方式value")
private String payTypeValue; private String payTypeValue;
@ApiModelProperty("交车资料确认单编号")
private String billNo;
} }

4
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bushandover/BusReceiveVehiclePdfVo.java

@ -40,6 +40,10 @@ public class BusReceiveVehiclePdfVo implements Vo {
private String color; private String color;
@ApiModelProperty("车辆型号") @ApiModelProperty("车辆型号")
private String config; private String config;
@ApiModelProperty("交车资料确认单编号")
private String billNo;
@ApiModelProperty("交车资料确认单制单时间")
private Date createTime;
private List<BusReceiveVehicleListPdfVo> listPdfVos; private List<BusReceiveVehicleListPdfVo> listPdfVos;
} }

2
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverMapper.java

@ -37,6 +37,8 @@ public interface BusHandoverMapper extends BaseMapper<BusHandover> {
IPage<BusHandoverVos> selectListPageVo(IPage<BusHandover> page,@Param(Constants.WRAPPER) QueryWrapper<BusHandover> qw); IPage<BusHandoverVos> selectListPageVo(IPage<BusHandover> page,@Param(Constants.WRAPPER) QueryWrapper<BusHandover> qw);
int selectNum(String bill);
/*//@Update("update bus_handover set name=#{msg} where id=#{id}") /*//@Update("update bus_handover set name=#{msg} where id=#{id}")
//IPage<BusHandoverVo> voPage(IPage<BusHandover> page, @Param(Constants.WRAPPER) QueryWrapper<BusHandover> qw); //IPage<BusHandoverVo> voPage(IPage<BusHandover> page, @Param(Constants.WRAPPER) QueryWrapper<BusHandover> qw);

5
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bushandover/BusHandoverMapper.xml

@ -112,4 +112,9 @@
ORDER BY createTime DESC ,id ORDER BY createTime DESC ,id
</where> </where>
</select> </select>
<select id="selectNum" resultType="java.lang.Integer">
select IFNULL(CAST(REPLACE(MAX(billNo), #{bill}, '') AS SIGNED), 0) as code
from bus_handover
where billNo LIKE concat(#{bill}, '%')
</select>
</mapper> </mapper>

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

@ -12,7 +12,10 @@ import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleSelectVo; import com.yxt.anrui.base.api.basevehicle.BaseVehicleSelectVo;
import com.yxt.anrui.base.api.commoncontract.CommonContract; import com.yxt.anrui.base.api.commoncontract.CommonContract;
import com.yxt.anrui.base.api.commoncontract.CommonContractFeign; import com.yxt.anrui.base.api.commoncontract.CommonContractFeign;
import com.yxt.anrui.base.common.enums.BillTypeEnum;
import com.yxt.anrui.base.common.enums.DictCommonEnum; import com.yxt.anrui.base.common.enums.DictCommonEnum;
import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.base.common.utils.domain.BillNo;
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile; import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFile;
import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum; import com.yxt.anrui.buscenter.api.buscenterfile.BuscenterFileEnum;
import com.yxt.anrui.buscenter.api.bushandover.*; import com.yxt.anrui.buscenter.api.bushandover.*;
@ -36,6 +39,8 @@ import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign;
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo; import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempVo;
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoice; import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoice;
import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceFeign; import com.yxt.anrui.fin.api.finvehicleinvoice.FinVehicleInvoiceFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoDetailsVo; import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoDetailsVo;
import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoFeign; import com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoFeign;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
@ -105,7 +110,8 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
private BaseModelConfigFeign baseModelConfigFeign; private BaseModelConfigFeign baseModelConfigFeign;
@Autowired @Autowired
private BaseVehicleFeign baseVehicleFeign; private BaseVehicleFeign baseVehicleFeign;
@Autowired
private SysOrganizationFeign sysOrganizationFeign;
@Autowired @Autowired
private BusHandoverPrepareVehicleService busHandoverPrepareVehicleService; private BusHandoverPrepareVehicleService busHandoverPrepareVehicleService;
@ -829,10 +835,13 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
String sid = entity.getSid(); String sid = entity.getSid();
BeanUtil.copyProperties(dto, entity, "id", "sid"); BeanUtil.copyProperties(dto, entity, "id", "sid");
entity.setHandoverStateKey("001"); entity.setHandoverStateKey("001");
entity.setHandoverStateValue("未完成"); entity.setHandoverStateValue("未交车");
if (StringUtils.isNotBlank(dto.getUserSid())) { if (StringUtils.isNotBlank(dto.getUserSid())) {
entity.setCreateBySid(dto.getUserSid()); entity.setCreateBySid(dto.getUserSid());
} }
//交车资料确认单编号
String billNo = getApplyCode(dto.getUseOrgSid());
entity.setBillNo(billNo);
baseMapper.insert(entity); baseMapper.insert(entity);
List<BusHandoverItemForDeliveryDto> busItemvos = dto.getBusItemvos(); List<BusHandoverItemForDeliveryDto> busItemvos = dto.getBusItemvos();
for (BusHandoverItemForDeliveryDto busItemvo : busItemvos) { for (BusHandoverItemForDeliveryDto busItemvo : busItemvos) {
@ -875,9 +884,11 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
BusHandover busHandover = fetchBySid(sid); BusHandover busHandover = fetchBySid(sid);
//接收车辆确认书、交车资料确认单 //接收车辆确认书、交车资料确认单
BusReceiveVehiclePdfVo pdfVo = new BusReceiveVehiclePdfVo(); BusReceiveVehiclePdfVo pdfVo = new BusReceiveVehiclePdfVo();
pdfVo.setBillNo(busHandover.getBillNo());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
pdfVo.setCreateTime(new Date());
//出门证 //出门证
BusExitPermitVo permitVo = new BusExitPermitVo(); BusExitPermitVo permitVo = new BusExitPermitVo();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (null != busHandover) { if (null != busHandover) {
if (StringUtils.isNotBlank(busHandover.getPayTypeValue())) { if (StringUtils.isNotBlank(busHandover.getPayTypeValue())) {
if ("全款".equals(busHandover.getPayTypeValue())) { if ("全款".equals(busHandover.getPayTypeValue())) {
@ -1047,6 +1058,26 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
return path; return path;
} }
/**
* 生成交车资料确认单单据编号
*
* @param orgSid
* @return
*/
public String getApplyCode(String orgSid) {
//获取分公司sid
ResultBean<SysOrganizationVo> resultBean1 = sysOrganizationFeign.fetchBySid(orgSid);
String orgCode = resultBean1.getData().getOrgCode();
BillNo b = new BillNo();
b.setOrgCode(orgCode);
b.setBillType(BillTypeEnum.JCZLQRD.getBillType());
String bill = Rule.getBill(b);
int i = baseMapper.selectNum(bill);
String billNo = Rule.getBillNo(bill, i);
return billNo;
}
/** /**
* 随车资料 * 随车资料
* *
@ -1057,8 +1088,11 @@ public class BusHandoverService extends MybatisBaseService<BusHandoverMapper, Bu
Map<String, Object> dataMap = new HashMap<String, Object>(); Map<String, Object> dataMap = new HashMap<String, Object>();
List<BusReceiveVehicleListPdfVo> listPdfVos = pdfVo.getListPdfVos(); List<BusReceiveVehicleListPdfVo> listPdfVos = pdfVo.getListPdfVos();
List<Map<String, Object>> newList = new ArrayList<>(); List<Map<String, Object>> newList = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
dataMap.put("contractNo", pdfVo.getContractNo()); dataMap.put("contractNo", pdfVo.getContractNo());
dataMap.put("customerName", pdfVo.getCustomerName()); dataMap.put("customerName", pdfVo.getCustomerName());
dataMap.put("createTime",sdf.format(pdfVo.getCreateTime()));
dataMap.put("documentNumber",pdfVo.getBillNo());
if (null != listPdfVos && listPdfVos.size() > 0) { if (null != listPdfVos && listPdfVos.size() > 0) {
for (BusReceiveVehicleListPdfVo detailsVo : listPdfVos) { for (BusReceiveVehicleListPdfVo detailsVo : listPdfVos) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();

61
anrui-buscenter/anrui-buscenter-biz/src/main/resources/ftl/vehicledatahandover.ftl

@ -11,8 +11,8 @@
<o:Author>Administrator</o:Author> <o:Author>Administrator</o:Author>
<o:LastAuthor>FAN</o:LastAuthor> <o:LastAuthor>FAN</o:LastAuthor>
<o:Created>2023-04-17T03:01:26Z</o:Created> <o:Created>2023-04-17T03:01:26Z</o:Created>
<o:LastSaved>2023-05-22T06:07:43Z</o:LastSaved> <o:LastSaved>2023-06-07T06:55:06Z</o:LastSaved>
<o:TotalTime>11520</o:TotalTime> <o:TotalTime>2880</o:TotalTime>
<o:Pages>1</o:Pages> <o:Pages>1</o:Pages>
<o:Words>0</o:Words> <o:Words>0</o:Words>
<o:Characters>0</o:Characters> <o:Characters>0</o:Characters>
@ -22,8 +22,8 @@
<o:Version>14</o:Version> <o:Version>14</o:Version>
</o:DocumentProperties> </o:DocumentProperties>
<o:CustomDocumentProperties> <o:CustomDocumentProperties>
<o:KSOProductBuildVer dt:dt="string">2052-11.1.0.14036</o:KSOProductBuildVer> <o:KSOProductBuildVer dt:dt="string">2052-11.1.0.14309</o:KSOProductBuildVer>
<o:ICV dt:dt="string">48762A60590D486E800DC51EEAB686DC_13</o:ICV> <o:ICV dt:dt="string">52537D2865394B5E9DB4335A16CB3EA3_13</o:ICV>
</o:CustomDocumentProperties> </o:CustomDocumentProperties>
<w:fonts> <w:fonts>
<w:defaultFonts w:ascii="Times New Roman" w:fareast="宋体" w:h-ansi="Times New Roman" w:cs="Times New Roman"/> <w:defaultFonts w:ascii="Times New Roman" w:fareast="宋体" w:h-ansi="Times New Roman" w:cs="Times New Roman"/>
@ -401,7 +401,7 @@
</w:bgPict> </w:bgPict>
<w:docPr> <w:docPr>
<w:view w:val="print"/> <w:view w:val="print"/>
<w:zoom w:percent="120"/> <w:zoom w:percent="90"/>
<w:characterSpacingControl w:val="CompressPunctuation"/> <w:characterSpacingControl w:val="CompressPunctuation"/>
<w:documentProtection w:enforcement="off"/> <w:documentProtection w:enforcement="off"/>
<w:doNotEmbedSystemFonts/> <w:doNotEmbedSystemFonts/>
@ -456,14 +456,59 @@
</w:p> </w:p>
<w:p> <w:p>
<w:pPr> <w:pPr>
<w:jc w:val="both"/> <w:jc w:val="left"/>
<w:rPr> <w:rPr>
<w:rFonts w:hint="fareast"/> <w:rFonts w:hint="fareast"/>
<w:sz w:val="52"/> <w:sz w:val="24"/>
<w:sz-cs w:val="72"/> <w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/> <w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr> </w:rPr>
</w:pPr> </w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>单据编号:${documentNumber!}</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:tab/>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:tab/>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:tab/>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>制单日期:${createTime!}</w:t>
</w:r>
</w:p> </w:p>
<w:p> <w:p>
<w:pPr> <w:pPr>

Loading…
Cancel
Save