diff --git a/erp-hyc-interfaces-api/src/main/java/com/unlcn/erp/hyc/interfaces/api/controller/CallWayBillByHYCController.java b/erp-hyc-interfaces-api/src/main/java/com/unlcn/erp/hyc/interfaces/api/controller/CallWayBillByHYCController.java index bb444d09e4bf60e012beeff570e716b2cfe9c3f9..3e964b6b487175960ef4ec2132f25d8ea6afdec4 100644 --- a/erp-hyc-interfaces-api/src/main/java/com/unlcn/erp/hyc/interfaces/api/controller/CallWayBillByHYCController.java +++ b/erp-hyc-interfaces-api/src/main/java/com/unlcn/erp/hyc/interfaces/api/controller/CallWayBillByHYCController.java @@ -9,6 +9,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @@ -155,7 +156,27 @@ public class CallWayBillByHYCController { return result; } - + /** + * 根据发运指令号判断是否可以修改运单金额 + */ + @RequestMapping(value = "/isModifyWaybillAmount/{shipNo}", method = RequestMethod.GET) + @ResponseBody + public ResultDTO isModifyWaybillAmount(@PathVariable("shipNo") String shipNo){ + LOGGER.info("CallOrderByHYCController.isModifyWaybillAmount param:{}.",shipNo); + ResultDTO result = new ResultDTO(true, null, "可以修改运单金额"); + try{ + boolean isModify = callWayBillByHYCService.isModifyWaybillAmount(shipNo); + result.setData(isModify); + result.setMessage(isModify ? "可以修改运单金额":"不能修改运单金额"); + }catch (Exception e){ + LOGGER.error("CallOrderByHYCController.isModifyWaybillAmount error: {}", e); + result.setSuccess(false); + result.setData(false); + result.setMessage("不可以修改运单金额,系统异常"); + throw new BusinessException(e.getMessage()); + } + return result; + } @RequestMapping(value = "/aa", method = RequestMethod.POST) @ResponseBody diff --git a/erp-hyc-interfaces-backend/config/dev.properties b/erp-hyc-interfaces-backend/config/dev.properties index 1a0cb821934366d1e7fba7ffdae3cb01a36acb52..c12954f96c79becb789a8a0cb0a91c37fac90b67 100644 --- a/erp-hyc-interfaces-backend/config/dev.properties +++ b/erp-hyc-interfaces-backend/config/dev.properties @@ -12,7 +12,7 @@ secure.key=kyleKEY secure.bank.key=kyleKEY #HYC Host Url -hyc.bound.host.url = http://operationapi.huiyunche.cn +hyc.bound.host.url = http://10.2.4.140:8080 #HYC request timeout hyc.bound.host.timeout = 7200 diff --git a/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/bo/HYCWayBillDB.java b/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/bo/HYCWayBillDB.java index 7b8955f4b627ad885a460f9bc47a193dc737dc14..3895fda9b130ae47e434d4f10b18e58f2c26c9a2 100644 --- a/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/bo/HYCWayBillDB.java +++ b/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/bo/HYCWayBillDB.java @@ -42,6 +42,13 @@ public class HYCWayBillDB { private String drivername; private String carnumber; private String serviceorderlist; + private String payCycle; + //标准零担单价(单位:元) + private BigDecimal ltlUnitPrice; + //标准零担总价(单位:元) + private BigDecimal ltlGrossPrice; + //当前里程 + private BigDecimal currentValue; public String getWaybillcode() { return waybillcode; @@ -243,7 +250,7 @@ public class HYCWayBillDB { this.goodssum = goodssum; } - public boolean isextract() { + public boolean isIsextract() { return isextract; } @@ -251,7 +258,7 @@ public class HYCWayBillDB { this.isextract = isextract; } - public boolean islonghaul() { + public boolean isIslonghaul() { return islonghaul; } @@ -259,7 +266,7 @@ public class HYCWayBillDB { this.islonghaul = islonghaul; } - public boolean isdelivery() { + public boolean isIsdelivery() { return isdelivery; } @@ -267,7 +274,7 @@ public class HYCWayBillDB { this.isdelivery = isdelivery; } - public boolean isveneer() { + public boolean isIsveneer() { return isveneer; } @@ -323,44 +330,81 @@ public class HYCWayBillDB { this.serviceorderlist = serviceorderlist; } + public String getPayCycle() { + return payCycle; + } + + public void setPayCycle(String payCycle) { + this.payCycle = payCycle; + } + + public BigDecimal getLtlUnitPrice() { + return ltlUnitPrice; + } + + public void setLtlUnitPrice(BigDecimal ltlUnitPrice) { + this.ltlUnitPrice = ltlUnitPrice; + } + + public BigDecimal getLtlGrossPrice() { + return ltlGrossPrice; + } + + public void setLtlGrossPrice(BigDecimal ltlGrossPrice) { + this.ltlGrossPrice = ltlGrossPrice; + } + + public BigDecimal getCurrentValue() { + return currentValue; + } + + public void setCurrentValue(BigDecimal currentValue) { + this.currentValue = currentValue; + } + @Override public String toString() { - return "HYCWayBillDB{" + - "waybillcode='" + waybillcode + '\'' + - ", carrierid=" + carrierid + - ", carriername='" + carriername + '\'' + - ", departprovincecode='" + departprovincecode + '\'' + - ", departprovincename='" + departprovincename + '\'' + - ", departcitycode='" + departcitycode + '\'' + - ", departcityname='" + departcityname + '\'' + - ", departcountycode='" + departcountycode + '\'' + - ", departcountyname='" + departcountyname + '\'' + - ", departaddr='" + departaddr + '\'' + - ", departcontact='" + departcontact + '\'' + - ", departphone='" + departphone + '\'' + - ", receiptprovincecode='" + receiptprovincecode + '\'' + - ", receiptprovincename='" + receiptprovincename + '\'' + - ", receiptcitycode='" + receiptcitycode + '\'' + - ", receiptcityname='" + receiptcityname + '\'' + - ", receiptcountycode='" + receiptcountycode + '\'' + - ", receiptcountyname='" + receiptcountyname + '\'' + - ", receiptaddr='" + receiptaddr + '\'' + - ", receiptcontact='" + receiptcontact + '\'' + - ", receiptphone='" + receiptphone + '\'' + - ", shipmentdate=" + shipmentdate + - ", arrivedate=" + arrivedate + - ", cost=" + cost + - ", goodssum=" + goodssum + - ", isextract=" + isextract + - ", islonghaul=" + islonghaul + - ", isdelivery=" + isdelivery + - ", isveneer=" + isveneer + - ", comment='" + comment + '\'' + - ", createtime=" + createtime + - ", updatetime=" + updatetime + - ", drivername='" + drivername + '\'' + - ", carnumber='" + carnumber + '\'' + - ", serviceorderlist='" + serviceorderlist + '\'' + - '}'; + final StringBuffer sb = new StringBuffer("HYCWayBillDB{"); + sb.append("waybillcode='").append(waybillcode).append('\''); + sb.append(", carrierid=").append(carrierid); + sb.append(", carriername='").append(carriername).append('\''); + sb.append(", departprovincecode='").append(departprovincecode).append('\''); + sb.append(", departprovincename='").append(departprovincename).append('\''); + sb.append(", departcitycode='").append(departcitycode).append('\''); + sb.append(", departcityname='").append(departcityname).append('\''); + sb.append(", departcountycode='").append(departcountycode).append('\''); + sb.append(", departcountyname='").append(departcountyname).append('\''); + sb.append(", departaddr='").append(departaddr).append('\''); + sb.append(", departcontact='").append(departcontact).append('\''); + sb.append(", departphone='").append(departphone).append('\''); + sb.append(", receiptprovincecode='").append(receiptprovincecode).append('\''); + sb.append(", receiptprovincename='").append(receiptprovincename).append('\''); + sb.append(", receiptcitycode='").append(receiptcitycode).append('\''); + sb.append(", receiptcityname='").append(receiptcityname).append('\''); + sb.append(", receiptcountycode='").append(receiptcountycode).append('\''); + sb.append(", receiptcountyname='").append(receiptcountyname).append('\''); + sb.append(", receiptaddr='").append(receiptaddr).append('\''); + sb.append(", receiptcontact='").append(receiptcontact).append('\''); + sb.append(", receiptphone='").append(receiptphone).append('\''); + sb.append(", shipmentdate=").append(shipmentdate); + sb.append(", arrivedate=").append(arrivedate); + sb.append(", cost=").append(cost); + sb.append(", goodssum=").append(goodssum); + sb.append(", isextract=").append(isextract); + sb.append(", islonghaul=").append(islonghaul); + sb.append(", isdelivery=").append(isdelivery); + sb.append(", isveneer=").append(isveneer); + sb.append(", comment='").append(comment).append('\''); + sb.append(", createtime=").append(createtime); + sb.append(", updatetime=").append(updatetime); + sb.append(", drivername='").append(drivername).append('\''); + sb.append(", carnumber='").append(carnumber).append('\''); + sb.append(", serviceorderlist='").append(serviceorderlist).append('\''); + sb.append(", payCycle='").append(payCycle).append('\''); + sb.append(", ltlUnitPrice=").append(ltlUnitPrice); + sb.append(", ltlGrossPrice=").append(ltlGrossPrice); + sb.append(", currentValue=").append(currentValue); + sb.append('}'); + return sb.toString(); } } diff --git a/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCService.java b/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCService.java index 77448d94af581b2231aa5acd9d7b564fdf643fd1..e5a686cc2c8f99523b35e986fb0d5dea5147b0c6 100644 --- a/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCService.java +++ b/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCService.java @@ -13,4 +13,10 @@ public interface CallWayBillByHYCService { void saveWayBillDetails(String wayBillDetail) throws Exception; void doSaveWaybillList() throws Exception; + + /** + * 是否可以修改运单金额 + * @param shipNo + */ + boolean isModifyWaybillAmount(String shipNo) throws Exception; } diff --git a/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCServiceImpl.java b/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCServiceImpl.java index 6d72af45b767a7123b2a19915be1376ef12415da..da531cc4b9db4da47237be88d976818fea44c8e8 100644 --- a/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCServiceImpl.java +++ b/erp-hyc-interfaces-backend/src/main/java/com/unlcn/erp/hyc/interfaces/backend/service/CallWayBillByHYCServiceImpl.java @@ -71,6 +71,10 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { private SmtempcontractlistMapper smtempcontractlistMapper; @Autowired private TmtempcontractpassMapper tmtempcontractpassMapper; + @Autowired + private SmfleetMapper smfleetMapper; + @Autowired + private SmshipmapMapper smshipmapMapper; @Override @@ -369,6 +373,49 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { } } + //获取支付方式 + private Short getPayType(Long carrierId, String carrierName){ + SmshipmapExample smshipmapExample = new SmshipmapExample(); + Smshipmap smshipmap = new Smshipmap(); + smshipmap.setNoshipid(carrierId); + smshipmap.setNoshipname(carrierName); + smshipmapExample.createCriteria().andNoshipidEqualTo(carrierId).andNoshipnameEqualTo(carrierName); + List smshipmaps = smshipmapMapper.selectByExample(smshipmapExample); + if(CollectionUtils.isNotEmpty(smshipmaps) ){ + Smfleet smfleet = smfleetMapper.selectByPrimaryKey(smshipmaps.get(0).getVcshipid().shortValue()); + if(Objects.isNull(smfleet.getIflagbilling())){ //如果为空继续取其他分供方值 + if(Objects.nonNull(smfleet.getIinvoicefleetid())){ + Smfleet sm = smfleetMapper.selectByPrimaryKey(smfleet.getIinvoicefleetid()); + return sm.getIflagbilling(); + }else{ + return null; + } + }else{ + return smfleet.getIflagbilling(); + } + }else { //中间表没有查找到 + //检查erp分供方表中是否存在 + SmfleetExample smfleetExample = new SmfleetExample(); + smfleetExample.createCriteria().andVcfleetnameEqualTo(carrierName); + List smfleets = smfleetMapper.selectByExample(smfleetExample); + if (CollectionUtils.isNotEmpty(smfleets)) { + Smfleet smfleet = smfleets.get(0); + if(Objects.isNull(smfleet.getIflagbilling())){ //如果为空继续取其他分供方值 + if(Objects.nonNull(smfleet.getIinvoicefleetid())){ + Smfleet sm = smfleetMapper.selectByPrimaryKey(smfleet.getIinvoicefleetid()); + return sm.getIflagbilling(); + }else{ + return null; + } + }else{ + return smfleet.getIflagbilling(); + } + } else { + return null; + } + } + } + private void updateTprice(Soshipline soshipline, HYCWayBillDB db) throws Exception { SmtempcontractlistExample smtempcontractlist = new SmtempcontractlistExample(); smtempcontractlist.createCriteria().andIshipidEqualTo(soshipline.getIlineid()); @@ -377,7 +424,7 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { Soorder soorder = soorderMapper.selectByPrimaryKey(soshipline.getIorderid()); String customer = SmcustomerMapper.selectByPrimaryKey(soorder.getIcustomerid()).getVccustomername(); - String istyle = smstyleMapper.selectByPrimaryKey(Short.parseShort(soorder.getIstyleid().toString())).getVcstylename(); + String istyle = smstyleMapper.selectByPrimaryKey(soorder.getIstyleid()).getVcstylename(); updateTpriceDetail(soshipline.getDcpaycost(), smtempcontractlists.get(0).getVcPriceNo(), soshipline.getVcstartcityname(), soshipline.getVcendcityname(), customer, istyle); } else { @@ -403,10 +450,12 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { private void createTpriceAndTempContact(Soshiphead soshiphead, HYCWayBillDB db) throws Exception { + //获取支付方式 + Short payType = getPayType(db.getCarrierid(),db.getCarriername()); LOGGER.info("saveSoshipHeadToTpriceSheet"); - Long tpriceSheetId = saveSoshipHeadToTpriceSheet(soshiphead, db); + Long tpriceSheetId = saveSoshipHeadToTpriceSheet(soshiphead, db,payType); LOGGER.info("saveTempContact"); - saveTempContact(soshiphead.getIlineid(), tpriceSheetId); + saveTempContact(soshiphead.getIlineid(), tpriceSheetId,db,payType); } /** @@ -416,14 +465,24 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { * @param priceSheetId * @throws Exception */ - private void saveTempContact(Long soshipheadId, Long priceSheetId) throws Exception { + private void saveTempContact(Long soshipheadId, Long priceSheetId,HYCWayBillDB db,Short payType) throws Exception { //查詢當前報價單總計的詳明相對的賬單 List customeresMapByOrdersForPriceSheet = soshiplineMapper.getOrderForISheetId(soshipheadId); String vcpriceNo = tPriceSheetMapper.selectByPrimaryKey(priceSheetId).getVcPriceNo(); Soshiphead soshiphead = soshipheadMapper.selectByPrimaryKey(soshipheadId); - Long dccount = soshiphead.getDccount(); //臨時合同賬期 - Long iPayId = (long)0; //臨時合同支付方式 - Long dcothe = soshiphead.getDcother()==null?0:soshiphead.getDcother(); //臨時合同其他費用 +// Long dccount = soshiphead.getDccount(); //臨時合同賬期 + Long dccount = null; + if(StringUtils.isNotBlank(db.getPayCycle())){ + if("10".equals(db.getPayCycle())){ //即付 + dccount = 3L; + }else if("20".equals(db.getPayCycle())){ //周付 + dccount = 7L; + } + }else{ + dccount = soshiphead.getDccount(); + } + Long iPayId = Objects.nonNull(payType) ? Long.valueOf(payType.longValue()) : 0L; //臨時合同支付方式 + Long dcother = soshiphead.getDcother()==null?0:soshiphead.getDcother(); //臨時合同其他費用 Long dcinsure = soshiphead.getDcinsure()==null?0:soshiphead.getDcinsure(); //臨時合同代付保險 Long dcreother = soshiphead.getDcreother()==null?0:soshiphead.getDcreother(); //臨時合同代付其他 Short dcrepay = soshiphead.getDcrepay()==null?0:soshiphead.getDcrepay(); //臨時合同預付 @@ -433,10 +492,8 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { String vcprintuserno = soshiphead.getVcprintuserno(); // 打印人 Date dtcheckDate = new Date(); //審核時間 - for (Soorder order : - customeresMapByOrdersForPriceSheet) {//order.getIstyleid() - saveTempContactConntrllorMapper(soshipheadId, vcpriceNo, order.getIcustomerid(), - dccount, iPayId, dccount, dcinsure, dcreother, dcrepay, vcchecktempuserno, bprint, dtprint, vcprintuserno, dtcheckDate); + for (Soorder order : customeresMapByOrdersForPriceSheet) {//order.getIstyleid() + saveTempContactConntrllorMapper(soshipheadId, vcpriceNo, order.getIcustomerid(),dccount, iPayId, dcother, dcinsure, dcreother, dcrepay, vcchecktempuserno, bprint, dtprint, vcprintuserno, dtcheckDate); addTempContractCheckRecord(soshipheadId); } } @@ -478,6 +535,7 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { smtempcontractlist.setBprint(bprint); smtempcontractlist.setDtprint(dtprint); smtempcontractlist.setVcprintuserno(vcprintuserno); + smtempcontractlist.setVcuserno("hyc"); // smtempcontractlist.setIstyleid(Short.parseShort(istyleid.toString())); smtempcontractlist.setDtcheckdate(dtcheckDate); smtempcontractlist.setDtdate(new Date()); @@ -494,13 +552,14 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { */ private void addTempContractCheckRecord(Long shipheadId) throws Exception { Tmtempcontractpass tmtempcontractpass = new Tmtempcontractpass(); - TmtempcontractpassExample tmtempcontractpassExample=new TmtempcontractpassExample(); - tmtempcontractpassExample.createCriteria().andIlineidEqualTo(tmtempcontractpassMapper.getNextValID()); + /*TmtempcontractpassExample tmtempcontractpassExample=new TmtempcontractpassExample(); + tmtempcontractpassExample.createCriteria().andIlineidEqualTo(tmtempcontractpassMapper.getNextValID());*/ + tmtempcontractpass.setIlineid(tmtempcontractpassMapper.getNextValID()); tmtempcontractpass.setIshipid(shipheadId); tmtempcontractpass.setIpass(new BigDecimal(TEMP_CONTRACT_CHECK_PASS_RESULT)); tmtempcontractpass.setVcmemo(CHECK_MEMO); tmtempcontractpass.setVcuserno(USER); - tmtempcontractpassMapper.updateByExampleSelective(tmtempcontractpass,tmtempcontractpassExample); + tmtempcontractpassMapper.insertSelective(tmtempcontractpass); } /** @@ -511,7 +570,7 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { * @return * @throws Exception */ - private Long saveSoshipHeadToTpriceSheet(Soshiphead soshiphead, HYCWayBillDB db) throws Exception { + private Long saveSoshipHeadToTpriceSheet(Soshiphead soshiphead, HYCWayBillDB db,Short payType) throws Exception { Long priceSheetId = tPriceSheetMapper.getNextValID(); String priceSheetNo = new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()).concat(priceSheetId.toString()); TPriceSheet tPriceSheet = new TPriceSheet(); @@ -524,9 +583,17 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { tPriceSheet.setVcFleetName(db.getCarriername()); // 业务确认 // 选择支付方式 - tPriceSheet.setnPayMethode((short)1);//1.现金 ,2.开票 + tPriceSheet.setnPayMethode(Objects.nonNull(payType) ? payType : 0);//1.现金 ,2.开票 // 确认账期 - tPriceSheet.setnPaymentDays((short)3);//5.N+2 ,4.N+1 ,3.N + if(StringUtils.isNotBlank(db.getPayCycle())){ + if("10".equals(db.getPayCycle())){ //即付 + tPriceSheet.setnPaymentDays((short)3);//5.N+2 ,4.N+1 ,3.N,7.周 + }else if("20".equals(db.getPayCycle())){ //周付 + tPriceSheet.setnPaymentDays((short)7);//5.N+2 ,4.N+1 ,3.N,7.周 + } + }else{ + tPriceSheet.setnPaymentDays((short)3);//5.N+2 ,4.N+1 ,3.N,7.周 + } tPriceSheet.setVcOtherNote("无"); tPriceSheet.setnOther((double) 0); tPriceSheet.setnLevel((short) 0); @@ -540,10 +607,19 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { tPriceSheet.setBPrint((short) 0); tPriceSheet.setDtStart(soshiphead.getDtdate()); tPriceSheet.setDtEnd(soshiphead.getDtdate()); + //设置标准总价 + if(Objects.nonNull(db.getLtlGrossPrice())){ + //设置为慧运车线路中的标准价 + tPriceSheet.setnStandardPrice(db.getLtlGrossPrice().doubleValue()); + }else{ + //设置为慧运车录入支付价格 + tPriceSheet.setnStandardPrice(db.getCost().doubleValue()); + } LOGGER.info("tPriceSheet"+tPriceSheet); LOGGER.info("tPriceSheet"+tPriceSheet.getIlineid()); tPriceSheetMapper.insertSheetByICOUNT(tPriceSheet); - this.saveSoshipLineToTPriceDetail(soshiphead.getIlineid(), priceSheetId); +// tPriceSheetMapper.insert(tPriceSheet); + this.saveSoshipLineToTPriceDetail(soshiphead.getIlineid(), priceSheetId,tPriceSheet.getnStandardPrice()); this.autoCheckPriceSheet(priceSheetId); return tPriceSheet.getIlineid(); } @@ -556,7 +632,7 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { * @param priceSheetId 报价单头id * @throws Exception */ - private void saveSoshipLineToTPriceDetail(Long soshipheadId, Long priceSheetId) throws Exception { + private void saveSoshipLineToTPriceDetail(Long soshipheadId, Long priceSheetId,Double standardPrice) throws Exception { //獲取生成的調度詳明 SoshiplineExample example = new SoshiplineExample(); example.createCriteria().andIshipidEqualTo(soshipheadId); @@ -590,7 +666,7 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { } } //將該條在list去除重複后將該條添加到報價單的詳明中 - this.saveSoshipLineToTPriceDetail_CreateTPrice(soshiplines.get(i), soorders.get(i), priceSheetId, Short.parseShort(size + "")); + this.saveSoshipLineToTPriceDetail_CreateTPrice(soshiplines.get(i), soorders.get(i), priceSheetId, Short.parseShort(size + ""),standardPrice); } } @@ -657,7 +733,7 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { * @param priceSheetId 报价单头id * @param size 数量,相同的条数 */ - private void saveSoshipLineToTPriceDetail_CreateTPrice(Soshipline iShipLine, Soorder soorder, Long priceSheetId, short size) { + private void saveSoshipLineToTPriceDetail_CreateTPrice(Soshipline iShipLine, Soorder soorder, Long priceSheetId, short size,Double standardPrice) { if (soorder == null) { //為空的處理 soorder = soorderMapper.selectByPrimaryKey(iShipLine.getIorderid()); @@ -667,14 +743,14 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { tPriceDetail.setVcStart(iShipLine.getVcstartcityname());//轉存起始地 tPriceDetail.setVcEnd(iShipLine.getVcendcityname());//轉存目的地 tPriceDetail.setVcPriceNo(iShipLine.getIflowid().toString());//編號 - String smStyleName = smstyleMapper.selectByPrimaryKey(Short.parseShort(soorder.getIstyleid().toString())).getVcstylename();//通過外鍵關係獲取車輛名稱 + String smStyleName = smstyleMapper.selectByPrimaryKey(soorder.getIstyleid()).getVcstylename();//通過外鍵關係獲取車輛名稱 tPriceDetail.setVcStyle(smStyleName); //轉存車輛名稱 String smCustomerName = SmcustomerMapper.selectByPrimaryKey(soorder.getIcustomerid()).getVccustomername(); //通過外鍵關係獲取用戶名稱 tPriceDetail.setVcCustomer(smCustomerName);//轉存用戶名稱 - tPriceDetail.setnStandardPrice((double) 0);//獲取單台價 + tPriceDetail.setnStandardPrice(standardPrice);//獲取單台價 // HYCWAYBILLDETAIL的unitcost tPriceDetail.setnPrice(iShipLine.getDcpaycost()); - tPriceDetail.setnDqty((short)(iShipLine.getDcqty()*size));//装运数量 + tPriceDetail.setnDqty((short)(iShipLine.getDcshipqty()));//装运数量 tPriceDetail.setDtAdd(new Date());//生成時間 tPriceDetail.setnKilometer(soorder.getDckilometer());//標準公里數 //獲取訂單的標準公里數 tPriceDetail.setiPriceSheet(priceSheetId); //報價單主表id @@ -872,4 +948,14 @@ public class CallWayBillByHYCServiceImpl implements CallWayBillByHYCService { } } } + + @Override + public boolean isModifyWaybillAmount(String shipNo) { + Integer count = hycwaybillMapper.isModifyWaybillAmount(shipNo); + if(count > 0){ + return false; + }else{ + return true; + } + } } diff --git a/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/HycwaybillMapper.java b/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/HycwaybillMapper.java index 504bc65a32065b28b482e95d18babae74a7d5ea4..4d1f92f84cb49bbeda36d3d2b8f99d0ec6385f29 100644 --- a/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/HycwaybillMapper.java +++ b/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/HycwaybillMapper.java @@ -5,6 +5,7 @@ import com.unlcn.erp.hyc.interfaces.base.model.HycwaybillExample; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; public interface HycwaybillMapper { /** @@ -103,4 +104,6 @@ public interface HycwaybillMapper { List getWaybillByNotAmountAndZL(); + Integer isModifyWaybillAmount(@Param("shipNo") String shipNo); + } \ No newline at end of file diff --git a/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/SmstyleMapper.java b/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/SmstyleMapper.java index 2e6192c41b50d39486a23cebbab0074b2499e59a..9fec32eb3e4c41f28929d078d700afc42b68cea4 100644 --- a/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/SmstyleMapper.java +++ b/erp-hyc-interfaces-base/src/main/java/com/unlcn/erp/hyc/interfaces/base/mapper/SmstyleMapper.java @@ -29,7 +29,7 @@ public interface SmstyleMapper { * * @mbggenerated Thu Oct 12 11:42:13 CST 2017 */ - int deleteByPrimaryKey(Short ilineid); + int deleteByPrimaryKey(Long ilineid); /** * This method was generated by MyBatis Generator. @@ -61,7 +61,7 @@ public interface SmstyleMapper { * * @mbggenerated Thu Oct 12 11:42:13 CST 2017 */ - Smstyle selectByPrimaryKey(Short ilineid); + Smstyle selectByPrimaryKey(Long ilineid); /** * This method was generated by MyBatis Generator. diff --git a/erp-hyc-interfaces-base/src/main/resources/mappers/HycwaybillMapper.xml b/erp-hyc-interfaces-base/src/main/resources/mappers/HycwaybillMapper.xml index 8b6559d69e841773464140e3c6ae1eabc42efc4b..4c5fcfee6a3fb3383ae0daf70be6031ed63a6c67 100644 --- a/erp-hyc-interfaces-base/src/main/resources/mappers/HycwaybillMapper.xml +++ b/erp-hyc-interfaces-base/src/main/resources/mappers/HycwaybillMapper.xml @@ -1,848 +1,853 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - + + + + + ILINEID, WAYBILLCODE, CARRIERID, CARRIERNAME, DEPARTPROVINCECODE, DEPARTPROVINCENAME, + DEPARTCITYCODE, DEPARTCITYNAME, DEPARTCOUNTYCODE, DEPARTCOUNTYNAME, DEPARTADDR, DEPARTCONTACT, + DEPARTPHONE, RECEIPTPROVINCECODE, RECEIPTPROVINCENAME, RECEIPTCITYCODE, RECEIPTCITYNAME, + RECEIPTCOUNTYCODE, RECEIPTCOUNTYNAME, RECEIPTADDR, RECEIPTCONTACT, RECEIPTPHONE, + SHIPMENTDATE, ARRIVEDATE, COST, GOODSSUM, ISEXTRACT, ISLONGHAUL, ISDELIVERY, ISVENEER, + COMMENTS, CREATETIME, UPDATETIME, DRIVERNAME, CARNUMBER, SERVICEORDERLIST, ISACCOUNT, + DTACCOUNT, ISAMOUNT, DTAMOUNT + + - - select - - distinct - - - from HYCWAYBILL - - - - - order by ${orderByClause} - - - limit ${limitStart} , ${limitEnd} - - - - - - delete from HYCWAYBILL - where ILINEID = #{ilineid,jdbcType=DECIMAL} - - - - delete from HYCWAYBILL - - - - - - - - Orcal - - insert into HYCWAYBILL (WAYBILLCODE, CARRIERID, CARRIERNAME, - DEPARTPROVINCECODE, DEPARTPROVINCENAME, - DEPARTCITYCODE, DEPARTCITYNAME, DEPARTCOUNTYCODE, - DEPARTCOUNTYNAME, DEPARTADDR, DEPARTCONTACT, - DEPARTPHONE, RECEIPTPROVINCECODE, RECEIPTPROVINCENAME, - RECEIPTCITYCODE, RECEIPTCITYNAME, RECEIPTCOUNTYCODE, - RECEIPTCOUNTYNAME, RECEIPTADDR, RECEIPTCONTACT, - RECEIPTPHONE, SHIPMENTDATE, ARRIVEDATE, - COST, GOODSSUM, ISEXTRACT, - ISLONGHAUL, ISDELIVERY, ISVENEER, - COMMENTS, CREATETIME, UPDATETIME, - DRIVERNAME, CARNUMBER, SERVICEORDERLIST, - ISACCOUNT, DTACCOUNT, ISAMOUNT, - DTAMOUNT) - values (#{waybillcode,jdbcType=VARCHAR}, #{carrierid,jdbcType=DECIMAL}, #{carriername,jdbcType=VARCHAR}, - #{departprovincecode,jdbcType=VARCHAR}, #{departprovincename,jdbcType=VARCHAR}, - #{departcitycode,jdbcType=VARCHAR}, #{departcityname,jdbcType=VARCHAR}, #{departcountycode,jdbcType=VARCHAR}, - #{departcountyname,jdbcType=VARCHAR}, #{departaddr,jdbcType=VARCHAR}, #{departcontact,jdbcType=VARCHAR}, - #{departphone,jdbcType=VARCHAR}, #{receiptprovincecode,jdbcType=VARCHAR}, #{receiptprovincename,jdbcType=VARCHAR}, - #{receiptcitycode,jdbcType=VARCHAR}, #{receiptcityname,jdbcType=VARCHAR}, #{receiptcountycode,jdbcType=VARCHAR}, - #{receiptcountyname,jdbcType=VARCHAR}, #{receiptaddr,jdbcType=VARCHAR}, #{receiptcontact,jdbcType=VARCHAR}, - #{receiptphone,jdbcType=VARCHAR}, #{shipmentdate,jdbcType=TIMESTAMP}, #{arrivedate,jdbcType=TIMESTAMP}, - #{cost,jdbcType=DECIMAL}, #{goodssum,jdbcType=DECIMAL}, #{isextract,jdbcType=DECIMAL}, - #{islonghaul,jdbcType=DECIMAL}, #{isdelivery,jdbcType=DECIMAL}, #{isveneer,jdbcType=DECIMAL}, - #{comments,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, - #{drivername,jdbcType=VARCHAR}, #{carnumber,jdbcType=VARCHAR}, #{serviceorderlist,jdbcType=VARCHAR}, - #{isaccount,jdbcType=DECIMAL}, #{dtaccount,jdbcType=TIMESTAMP}, #{isamount,jdbcType=DECIMAL}, - #{dtamount,jdbcType=TIMESTAMP}) - - - - - Orcal - - insert into HYCWAYBILL - - - WAYBILLCODE, - - - CARRIERID, - - - CARRIERNAME, - - - DEPARTPROVINCECODE, - - - DEPARTPROVINCENAME, - - - DEPARTCITYCODE, - - - DEPARTCITYNAME, - - - DEPARTCOUNTYCODE, - - - DEPARTCOUNTYNAME, - - - DEPARTADDR, - - - DEPARTCONTACT, - - - DEPARTPHONE, - - - RECEIPTPROVINCECODE, - - - RECEIPTPROVINCENAME, - - - RECEIPTCITYCODE, - - - RECEIPTCITYNAME, - - - RECEIPTCOUNTYCODE, - - - RECEIPTCOUNTYNAME, - - - RECEIPTADDR, - - - RECEIPTCONTACT, - - - RECEIPTPHONE, - - - SHIPMENTDATE, - - - ARRIVEDATE, - - - COST, - - - GOODSSUM, - - - ISEXTRACT, - - - ISLONGHAUL, - - - ISDELIVERY, - - - ISVENEER, - - - COMMENTS, - - - CREATETIME, - - - UPDATETIME, - - - DRIVERNAME, - - - CARNUMBER, - - - SERVICEORDERLIST, - - - ISACCOUNT, - - - DTACCOUNT, - - - ISAMOUNT, - - - DTAMOUNT, - - - - - #{waybillcode,jdbcType=VARCHAR}, - - - #{carrierid,jdbcType=DECIMAL}, - - - #{carriername,jdbcType=VARCHAR}, - - - #{departprovincecode,jdbcType=VARCHAR}, - - - #{departprovincename,jdbcType=VARCHAR}, - - - #{departcitycode,jdbcType=VARCHAR}, - - - #{departcityname,jdbcType=VARCHAR}, - - - #{departcountycode,jdbcType=VARCHAR}, - - - #{departcountyname,jdbcType=VARCHAR}, - - - #{departaddr,jdbcType=VARCHAR}, - - - #{departcontact,jdbcType=VARCHAR}, - - - #{departphone,jdbcType=VARCHAR}, - - - #{receiptprovincecode,jdbcType=VARCHAR}, - - + + from HYCWAYBILL + + + + + order by ${orderByClause} + + + limit ${limitStart} , ${limitEnd} + + + + + + delete from HYCWAYBILL + where ILINEID = #{ilineid,jdbcType=DECIMAL} + + + + delete from HYCWAYBILL + + + + + + + + Orcal + + insert into HYCWAYBILL (WAYBILLCODE, CARRIERID, CARRIERNAME, + DEPARTPROVINCECODE, DEPARTPROVINCENAME, + DEPARTCITYCODE, DEPARTCITYNAME, DEPARTCOUNTYCODE, + DEPARTCOUNTYNAME, DEPARTADDR, DEPARTCONTACT, + DEPARTPHONE, RECEIPTPROVINCECODE, RECEIPTPROVINCENAME, + RECEIPTCITYCODE, RECEIPTCITYNAME, RECEIPTCOUNTYCODE, + RECEIPTCOUNTYNAME, RECEIPTADDR, RECEIPTCONTACT, + RECEIPTPHONE, SHIPMENTDATE, ARRIVEDATE, + COST, GOODSSUM, ISEXTRACT, + ISLONGHAUL, ISDELIVERY, ISVENEER, + COMMENTS, CREATETIME, UPDATETIME, + DRIVERNAME, CARNUMBER, SERVICEORDERLIST, + ISACCOUNT, DTACCOUNT, ISAMOUNT, + DTAMOUNT) + values (#{waybillcode,jdbcType=VARCHAR}, #{carrierid,jdbcType=DECIMAL}, #{carriername,jdbcType=VARCHAR}, + #{departprovincecode,jdbcType=VARCHAR}, #{departprovincename,jdbcType=VARCHAR}, + #{departcitycode,jdbcType=VARCHAR}, #{departcityname,jdbcType=VARCHAR}, #{departcountycode,jdbcType=VARCHAR}, + #{departcountyname,jdbcType=VARCHAR}, #{departaddr,jdbcType=VARCHAR}, #{departcontact,jdbcType=VARCHAR}, + #{departphone,jdbcType=VARCHAR}, #{receiptprovincecode,jdbcType=VARCHAR}, #{receiptprovincename,jdbcType=VARCHAR}, - - - #{receiptcitycode,jdbcType=VARCHAR}, - - - #{receiptcityname,jdbcType=VARCHAR}, - - - #{receiptcountycode,jdbcType=VARCHAR}, - - - #{receiptcountyname,jdbcType=VARCHAR}, - - - #{receiptaddr,jdbcType=VARCHAR}, - - - #{receiptcontact,jdbcType=VARCHAR}, - - - #{receiptphone,jdbcType=VARCHAR}, - - - #{shipmentdate,jdbcType=TIMESTAMP}, - - - #{arrivedate,jdbcType=TIMESTAMP}, - - - #{cost,jdbcType=DECIMAL}, - - - #{goodssum,jdbcType=DECIMAL}, - - - #{isextract,jdbcType=DECIMAL}, - - - #{islonghaul,jdbcType=DECIMAL}, - - - #{isdelivery,jdbcType=DECIMAL}, - - - #{isveneer,jdbcType=DECIMAL}, - - - #{comments,jdbcType=VARCHAR}, - - - #{createtime,jdbcType=TIMESTAMP}, - - - #{updatetime,jdbcType=TIMESTAMP}, - - - #{drivername,jdbcType=VARCHAR}, - - - #{carnumber,jdbcType=VARCHAR}, - - - #{serviceorderlist,jdbcType=VARCHAR}, - - - #{isaccount,jdbcType=DECIMAL}, - - - #{dtaccount,jdbcType=TIMESTAMP}, - - - #{isamount,jdbcType=DECIMAL}, - - - #{dtamount,jdbcType=TIMESTAMP}, - - - - - - - update HYCWAYBILL - - - ILINEID = #{record.ilineid,jdbcType=DECIMAL}, - - + #{receiptcitycode,jdbcType=VARCHAR}, #{receiptcityname,jdbcType=VARCHAR}, #{receiptcountycode,jdbcType=VARCHAR}, + #{receiptcountyname,jdbcType=VARCHAR}, #{receiptaddr,jdbcType=VARCHAR}, #{receiptcontact,jdbcType=VARCHAR}, + #{receiptphone,jdbcType=VARCHAR}, #{shipmentdate,jdbcType=TIMESTAMP}, #{arrivedate,jdbcType=TIMESTAMP}, + #{cost,jdbcType=DECIMAL}, #{goodssum,jdbcType=DECIMAL}, #{isextract,jdbcType=DECIMAL}, + #{islonghaul,jdbcType=DECIMAL}, #{isdelivery,jdbcType=DECIMAL}, #{isveneer,jdbcType=DECIMAL}, + #{comments,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{updatetime,jdbcType=TIMESTAMP}, + #{drivername,jdbcType=VARCHAR}, #{carnumber,jdbcType=VARCHAR}, #{serviceorderlist,jdbcType=VARCHAR}, + #{isaccount,jdbcType=DECIMAL}, #{dtaccount,jdbcType=TIMESTAMP}, #{isamount,jdbcType=DECIMAL}, + #{dtamount,jdbcType=TIMESTAMP}) + + + + + Orcal + + insert into HYCWAYBILL + + + WAYBILLCODE, + + + CARRIERID, + + + CARRIERNAME, + + + DEPARTPROVINCECODE, + + + DEPARTPROVINCENAME, + + + DEPARTCITYCODE, + + + DEPARTCITYNAME, + + + DEPARTCOUNTYCODE, + + + DEPARTCOUNTYNAME, + + + DEPARTADDR, + + + DEPARTCONTACT, + + + DEPARTPHONE, + + + RECEIPTPROVINCECODE, + + + RECEIPTPROVINCENAME, + + + RECEIPTCITYCODE, + + + RECEIPTCITYNAME, + + + RECEIPTCOUNTYCODE, + + + RECEIPTCOUNTYNAME, + + + RECEIPTADDR, + + + RECEIPTCONTACT, + + + RECEIPTPHONE, + + + SHIPMENTDATE, + + + ARRIVEDATE, + + + COST, + + + GOODSSUM, + + + ISEXTRACT, + + + ISLONGHAUL, + + + ISDELIVERY, + + + ISVENEER, + + + COMMENTS, + + + CREATETIME, + + + UPDATETIME, + + + DRIVERNAME, + + + CARNUMBER, + + + SERVICEORDERLIST, + + + ISACCOUNT, + + + DTACCOUNT, + + + ISAMOUNT, + + + DTAMOUNT, + + + + + #{waybillcode,jdbcType=VARCHAR}, + + + #{carrierid,jdbcType=DECIMAL}, + + + #{carriername,jdbcType=VARCHAR}, + + + #{departprovincecode,jdbcType=VARCHAR}, + + + #{departprovincename,jdbcType=VARCHAR}, + + + #{departcitycode,jdbcType=VARCHAR}, + + + #{departcityname,jdbcType=VARCHAR}, + + + #{departcountycode,jdbcType=VARCHAR}, + + + #{departcountyname,jdbcType=VARCHAR}, + + + #{departaddr,jdbcType=VARCHAR}, + + + #{departcontact,jdbcType=VARCHAR}, + + + #{departphone,jdbcType=VARCHAR}, + + + #{receiptprovincecode,jdbcType=VARCHAR}, + + + #{receiptprovincename,jdbcType=VARCHAR}, + + + #{receiptcitycode,jdbcType=VARCHAR}, + + + #{receiptcityname,jdbcType=VARCHAR}, + + + #{receiptcountycode,jdbcType=VARCHAR}, + + + #{receiptcountyname,jdbcType=VARCHAR}, + + + #{receiptaddr,jdbcType=VARCHAR}, + + + #{receiptcontact,jdbcType=VARCHAR}, + + + #{receiptphone,jdbcType=VARCHAR}, + + + #{shipmentdate,jdbcType=TIMESTAMP}, + + + #{arrivedate,jdbcType=TIMESTAMP}, + + + #{cost,jdbcType=DECIMAL}, + + + #{goodssum,jdbcType=DECIMAL}, + + + #{isextract,jdbcType=DECIMAL}, + + + #{islonghaul,jdbcType=DECIMAL}, + + + #{isdelivery,jdbcType=DECIMAL}, + + + #{isveneer,jdbcType=DECIMAL}, + + + #{comments,jdbcType=VARCHAR}, + + + #{createtime,jdbcType=TIMESTAMP}, + + + #{updatetime,jdbcType=TIMESTAMP}, + + + #{drivername,jdbcType=VARCHAR}, + + + #{carnumber,jdbcType=VARCHAR}, + + + #{serviceorderlist,jdbcType=VARCHAR}, + + + #{isaccount,jdbcType=DECIMAL}, + + + #{dtaccount,jdbcType=TIMESTAMP}, + + + #{isamount,jdbcType=DECIMAL}, + + + #{dtamount,jdbcType=TIMESTAMP}, + + + + + + + update HYCWAYBILL + + + ILINEID = #{record.ilineid,jdbcType=DECIMAL}, + + + WAYBILLCODE = #{record.waybillcode,jdbcType=VARCHAR}, + + + CARRIERID = #{record.carrierid,jdbcType=DECIMAL}, + + + CARRIERNAME = #{record.carriername,jdbcType=VARCHAR}, + + + DEPARTPROVINCECODE = #{record.departprovincecode,jdbcType=VARCHAR}, + + + DEPARTPROVINCENAME = #{record.departprovincename,jdbcType=VARCHAR}, + + + DEPARTCITYCODE = #{record.departcitycode,jdbcType=VARCHAR}, + + + DEPARTCITYNAME = #{record.departcityname,jdbcType=VARCHAR}, + + + DEPARTCOUNTYCODE = #{record.departcountycode,jdbcType=VARCHAR}, + + + DEPARTCOUNTYNAME = #{record.departcountyname,jdbcType=VARCHAR}, + + + DEPARTADDR = #{record.departaddr,jdbcType=VARCHAR}, + + + DEPARTCONTACT = #{record.departcontact,jdbcType=VARCHAR}, + + + DEPARTPHONE = #{record.departphone,jdbcType=VARCHAR}, + + + RECEIPTPROVINCECODE = #{record.receiptprovincecode,jdbcType=VARCHAR}, + + + RECEIPTPROVINCENAME = #{record.receiptprovincename,jdbcType=VARCHAR}, + + + RECEIPTCITYCODE = #{record.receiptcitycode,jdbcType=VARCHAR}, + + + RECEIPTCITYNAME = #{record.receiptcityname,jdbcType=VARCHAR}, + + + RECEIPTCOUNTYCODE = #{record.receiptcountycode,jdbcType=VARCHAR}, + + + RECEIPTCOUNTYNAME = #{record.receiptcountyname,jdbcType=VARCHAR}, + + + RECEIPTADDR = #{record.receiptaddr,jdbcType=VARCHAR}, + + + RECEIPTCONTACT = #{record.receiptcontact,jdbcType=VARCHAR}, + + + RECEIPTPHONE = #{record.receiptphone,jdbcType=VARCHAR}, + + + SHIPMENTDATE = #{record.shipmentdate,jdbcType=TIMESTAMP}, + + + ARRIVEDATE = #{record.arrivedate,jdbcType=TIMESTAMP}, + + + COST = #{record.cost,jdbcType=DECIMAL}, + + + GOODSSUM = #{record.goodssum,jdbcType=DECIMAL}, + + + ISEXTRACT = #{record.isextract,jdbcType=DECIMAL}, + + + ISLONGHAUL = #{record.islonghaul,jdbcType=DECIMAL}, + + + ISDELIVERY = #{record.isdelivery,jdbcType=DECIMAL}, + + + ISVENEER = #{record.isveneer,jdbcType=DECIMAL}, + + + COMMENTS = #{record.comments,jdbcType=VARCHAR}, + + + CREATETIME = #{record.createtime,jdbcType=TIMESTAMP}, + + + UPDATETIME = #{record.updatetime,jdbcType=TIMESTAMP}, + + + DRIVERNAME = #{record.drivername,jdbcType=VARCHAR}, + + + CARNUMBER = #{record.carnumber,jdbcType=VARCHAR}, + + + SERVICEORDERLIST = #{record.serviceorderlist,jdbcType=VARCHAR}, + + + ISACCOUNT = #{record.isaccount,jdbcType=DECIMAL}, + + + DTACCOUNT = #{record.dtaccount,jdbcType=TIMESTAMP}, + + + ISAMOUNT = #{record.isamount,jdbcType=DECIMAL}, + + + DTAMOUNT = #{record.dtamount,jdbcType=TIMESTAMP}, + + + + + + + + + update HYCWAYBILL + set ILINEID = #{record.ilineid,jdbcType=DECIMAL}, WAYBILLCODE = #{record.waybillcode,jdbcType=VARCHAR}, - - CARRIERID = #{record.carrierid,jdbcType=DECIMAL}, - - CARRIERNAME = #{record.carriername,jdbcType=VARCHAR}, - - DEPARTPROVINCECODE = #{record.departprovincecode,jdbcType=VARCHAR}, - - DEPARTPROVINCENAME = #{record.departprovincename,jdbcType=VARCHAR}, - - DEPARTCITYCODE = #{record.departcitycode,jdbcType=VARCHAR}, - - DEPARTCITYNAME = #{record.departcityname,jdbcType=VARCHAR}, - - DEPARTCOUNTYCODE = #{record.departcountycode,jdbcType=VARCHAR}, - - DEPARTCOUNTYNAME = #{record.departcountyname,jdbcType=VARCHAR}, - - DEPARTADDR = #{record.departaddr,jdbcType=VARCHAR}, - - DEPARTCONTACT = #{record.departcontact,jdbcType=VARCHAR}, - - DEPARTPHONE = #{record.departphone,jdbcType=VARCHAR}, - - RECEIPTPROVINCECODE = #{record.receiptprovincecode,jdbcType=VARCHAR}, - - RECEIPTPROVINCENAME = #{record.receiptprovincename,jdbcType=VARCHAR}, - - RECEIPTCITYCODE = #{record.receiptcitycode,jdbcType=VARCHAR}, - - RECEIPTCITYNAME = #{record.receiptcityname,jdbcType=VARCHAR}, - - RECEIPTCOUNTYCODE = #{record.receiptcountycode,jdbcType=VARCHAR}, - - RECEIPTCOUNTYNAME = #{record.receiptcountyname,jdbcType=VARCHAR}, - - RECEIPTADDR = #{record.receiptaddr,jdbcType=VARCHAR}, - - RECEIPTCONTACT = #{record.receiptcontact,jdbcType=VARCHAR}, - - RECEIPTPHONE = #{record.receiptphone,jdbcType=VARCHAR}, - - SHIPMENTDATE = #{record.shipmentdate,jdbcType=TIMESTAMP}, - - ARRIVEDATE = #{record.arrivedate,jdbcType=TIMESTAMP}, - - COST = #{record.cost,jdbcType=DECIMAL}, - - GOODSSUM = #{record.goodssum,jdbcType=DECIMAL}, - - ISEXTRACT = #{record.isextract,jdbcType=DECIMAL}, - - ISLONGHAUL = #{record.islonghaul,jdbcType=DECIMAL}, - - ISDELIVERY = #{record.isdelivery,jdbcType=DECIMAL}, - - ISVENEER = #{record.isveneer,jdbcType=DECIMAL}, - - COMMENTS = #{record.comments,jdbcType=VARCHAR}, - - CREATETIME = #{record.createtime,jdbcType=TIMESTAMP}, - - UPDATETIME = #{record.updatetime,jdbcType=TIMESTAMP}, - - DRIVERNAME = #{record.drivername,jdbcType=VARCHAR}, - - CARNUMBER = #{record.carnumber,jdbcType=VARCHAR}, - - SERVICEORDERLIST = #{record.serviceorderlist,jdbcType=VARCHAR}, - - ISACCOUNT = #{record.isaccount,jdbcType=DECIMAL}, - - DTACCOUNT = #{record.dtaccount,jdbcType=TIMESTAMP}, - - ISAMOUNT = #{record.isamount,jdbcType=DECIMAL}, - - - DTAMOUNT = #{record.dtamount,jdbcType=TIMESTAMP}, - - - - - - - - - update HYCWAYBILL - set ILINEID = #{record.ilineid,jdbcType=DECIMAL}, - WAYBILLCODE = #{record.waybillcode,jdbcType=VARCHAR}, - CARRIERID = #{record.carrierid,jdbcType=DECIMAL}, - CARRIERNAME = #{record.carriername,jdbcType=VARCHAR}, - DEPARTPROVINCECODE = #{record.departprovincecode,jdbcType=VARCHAR}, - DEPARTPROVINCENAME = #{record.departprovincename,jdbcType=VARCHAR}, - DEPARTCITYCODE = #{record.departcitycode,jdbcType=VARCHAR}, - DEPARTCITYNAME = #{record.departcityname,jdbcType=VARCHAR}, - DEPARTCOUNTYCODE = #{record.departcountycode,jdbcType=VARCHAR}, - DEPARTCOUNTYNAME = #{record.departcountyname,jdbcType=VARCHAR}, - DEPARTADDR = #{record.departaddr,jdbcType=VARCHAR}, - DEPARTCONTACT = #{record.departcontact,jdbcType=VARCHAR}, - DEPARTPHONE = #{record.departphone,jdbcType=VARCHAR}, - RECEIPTPROVINCECODE = #{record.receiptprovincecode,jdbcType=VARCHAR}, - RECEIPTPROVINCENAME = #{record.receiptprovincename,jdbcType=VARCHAR}, - RECEIPTCITYCODE = #{record.receiptcitycode,jdbcType=VARCHAR}, - RECEIPTCITYNAME = #{record.receiptcityname,jdbcType=VARCHAR}, - RECEIPTCOUNTYCODE = #{record.receiptcountycode,jdbcType=VARCHAR}, - RECEIPTCOUNTYNAME = #{record.receiptcountyname,jdbcType=VARCHAR}, - RECEIPTADDR = #{record.receiptaddr,jdbcType=VARCHAR}, - RECEIPTCONTACT = #{record.receiptcontact,jdbcType=VARCHAR}, - RECEIPTPHONE = #{record.receiptphone,jdbcType=VARCHAR}, - SHIPMENTDATE = #{record.shipmentdate,jdbcType=TIMESTAMP}, - ARRIVEDATE = #{record.arrivedate,jdbcType=TIMESTAMP}, - COST = #{record.cost,jdbcType=DECIMAL}, - GOODSSUM = #{record.goodssum,jdbcType=DECIMAL}, - ISEXTRACT = #{record.isextract,jdbcType=DECIMAL}, - ISLONGHAUL = #{record.islonghaul,jdbcType=DECIMAL}, - ISDELIVERY = #{record.isdelivery,jdbcType=DECIMAL}, - ISVENEER = #{record.isveneer,jdbcType=DECIMAL}, - COMMENTS = #{record.comments,jdbcType=VARCHAR}, - CREATETIME = #{record.createtime,jdbcType=TIMESTAMP}, - UPDATETIME = #{record.updatetime,jdbcType=TIMESTAMP}, - DRIVERNAME = #{record.drivername,jdbcType=VARCHAR}, - CARNUMBER = #{record.carnumber,jdbcType=VARCHAR}, - SERVICEORDERLIST = #{record.serviceorderlist,jdbcType=VARCHAR}, - ISACCOUNT = #{record.isaccount,jdbcType=DECIMAL}, - DTACCOUNT = #{record.dtaccount,jdbcType=TIMESTAMP}, - ISAMOUNT = #{record.isamount,jdbcType=DECIMAL}, - DTAMOUNT = #{record.dtamount,jdbcType=TIMESTAMP} - - - - - - - update HYCWAYBILL - - - WAYBILLCODE = #{waybillcode,jdbcType=VARCHAR}, - - + DTAMOUNT = #{record.dtamount,jdbcType=TIMESTAMP} + + + + + + + update HYCWAYBILL + + + WAYBILLCODE = #{waybillcode,jdbcType=VARCHAR}, + + + CARRIERID = #{carrierid,jdbcType=DECIMAL}, + + + CARRIERNAME = #{carriername,jdbcType=VARCHAR}, + + + DEPARTPROVINCECODE = #{departprovincecode,jdbcType=VARCHAR}, + + + DEPARTPROVINCENAME = #{departprovincename,jdbcType=VARCHAR}, + + + DEPARTCITYCODE = #{departcitycode,jdbcType=VARCHAR}, + + + DEPARTCITYNAME = #{departcityname,jdbcType=VARCHAR}, + + + DEPARTCOUNTYCODE = #{departcountycode,jdbcType=VARCHAR}, + + + DEPARTCOUNTYNAME = #{departcountyname,jdbcType=VARCHAR}, + + + DEPARTADDR = #{departaddr,jdbcType=VARCHAR}, + + + DEPARTCONTACT = #{departcontact,jdbcType=VARCHAR}, + + + DEPARTPHONE = #{departphone,jdbcType=VARCHAR}, + + + RECEIPTPROVINCECODE = #{receiptprovincecode,jdbcType=VARCHAR}, + + + RECEIPTPROVINCENAME = #{receiptprovincename,jdbcType=VARCHAR}, + + + RECEIPTCITYCODE = #{receiptcitycode,jdbcType=VARCHAR}, + + + RECEIPTCITYNAME = #{receiptcityname,jdbcType=VARCHAR}, + + + RECEIPTCOUNTYCODE = #{receiptcountycode,jdbcType=VARCHAR}, + + + RECEIPTCOUNTYNAME = #{receiptcountyname,jdbcType=VARCHAR}, + + + RECEIPTADDR = #{receiptaddr,jdbcType=VARCHAR}, + + + RECEIPTCONTACT = #{receiptcontact,jdbcType=VARCHAR}, + + + RECEIPTPHONE = #{receiptphone,jdbcType=VARCHAR}, + + + SHIPMENTDATE = #{shipmentdate,jdbcType=TIMESTAMP}, + + + ARRIVEDATE = #{arrivedate,jdbcType=TIMESTAMP}, + + + COST = #{cost,jdbcType=DECIMAL}, + + + GOODSSUM = #{goodssum,jdbcType=DECIMAL}, + + + ISEXTRACT = #{isextract,jdbcType=DECIMAL}, + + + ISLONGHAUL = #{islonghaul,jdbcType=DECIMAL}, + + + ISDELIVERY = #{isdelivery,jdbcType=DECIMAL}, + + + ISVENEER = #{isveneer,jdbcType=DECIMAL}, + + + COMMENTS = #{comments,jdbcType=VARCHAR}, + + + CREATETIME = #{createtime,jdbcType=TIMESTAMP}, + + + UPDATETIME = #{updatetime,jdbcType=TIMESTAMP}, + + + DRIVERNAME = #{drivername,jdbcType=VARCHAR}, + + + CARNUMBER = #{carnumber,jdbcType=VARCHAR}, + + + SERVICEORDERLIST = #{serviceorderlist,jdbcType=VARCHAR}, + + + ISACCOUNT = #{isaccount,jdbcType=DECIMAL}, + + + DTACCOUNT = #{dtaccount,jdbcType=TIMESTAMP}, + + + ISAMOUNT = #{isamount,jdbcType=DECIMAL}, + + + DTAMOUNT = #{dtamount,jdbcType=TIMESTAMP}, + + + where ILINEID = #{ilineid,jdbcType=DECIMAL} + + + + update HYCWAYBILL + set WAYBILLCODE = #{waybillcode,jdbcType=VARCHAR}, CARRIERID = #{carrierid,jdbcType=DECIMAL}, - - CARRIERNAME = #{carriername,jdbcType=VARCHAR}, - - DEPARTPROVINCECODE = #{departprovincecode,jdbcType=VARCHAR}, - - DEPARTPROVINCENAME = #{departprovincename,jdbcType=VARCHAR}, - - DEPARTCITYCODE = #{departcitycode,jdbcType=VARCHAR}, - - DEPARTCITYNAME = #{departcityname,jdbcType=VARCHAR}, - - DEPARTCOUNTYCODE = #{departcountycode,jdbcType=VARCHAR}, - - DEPARTCOUNTYNAME = #{departcountyname,jdbcType=VARCHAR}, - - DEPARTADDR = #{departaddr,jdbcType=VARCHAR}, - - DEPARTCONTACT = #{departcontact,jdbcType=VARCHAR}, - - DEPARTPHONE = #{departphone,jdbcType=VARCHAR}, - - RECEIPTPROVINCECODE = #{receiptprovincecode,jdbcType=VARCHAR}, - - RECEIPTPROVINCENAME = #{receiptprovincename,jdbcType=VARCHAR}, - - RECEIPTCITYCODE = #{receiptcitycode,jdbcType=VARCHAR}, - - RECEIPTCITYNAME = #{receiptcityname,jdbcType=VARCHAR}, - - RECEIPTCOUNTYCODE = #{receiptcountycode,jdbcType=VARCHAR}, - - RECEIPTCOUNTYNAME = #{receiptcountyname,jdbcType=VARCHAR}, - - RECEIPTADDR = #{receiptaddr,jdbcType=VARCHAR}, - - RECEIPTCONTACT = #{receiptcontact,jdbcType=VARCHAR}, - - RECEIPTPHONE = #{receiptphone,jdbcType=VARCHAR}, - - SHIPMENTDATE = #{shipmentdate,jdbcType=TIMESTAMP}, - - ARRIVEDATE = #{arrivedate,jdbcType=TIMESTAMP}, - - COST = #{cost,jdbcType=DECIMAL}, - - GOODSSUM = #{goodssum,jdbcType=DECIMAL}, - - ISEXTRACT = #{isextract,jdbcType=DECIMAL}, - - ISLONGHAUL = #{islonghaul,jdbcType=DECIMAL}, - - ISDELIVERY = #{isdelivery,jdbcType=DECIMAL}, - - ISVENEER = #{isveneer,jdbcType=DECIMAL}, - - COMMENTS = #{comments,jdbcType=VARCHAR}, - - CREATETIME = #{createtime,jdbcType=TIMESTAMP}, - - UPDATETIME = #{updatetime,jdbcType=TIMESTAMP}, - - DRIVERNAME = #{drivername,jdbcType=VARCHAR}, - - CARNUMBER = #{carnumber,jdbcType=VARCHAR}, - - SERVICEORDERLIST = #{serviceorderlist,jdbcType=VARCHAR}, - - ISACCOUNT = #{isaccount,jdbcType=DECIMAL}, - - DTACCOUNT = #{dtaccount,jdbcType=TIMESTAMP}, - - ISAMOUNT = #{isamount,jdbcType=DECIMAL}, - - - DTAMOUNT = #{dtamount,jdbcType=TIMESTAMP}, - - - where ILINEID = #{ilineid,jdbcType=DECIMAL} - - - - update HYCWAYBILL - set WAYBILLCODE = #{waybillcode,jdbcType=VARCHAR}, - CARRIERID = #{carrierid,jdbcType=DECIMAL}, - CARRIERNAME = #{carriername,jdbcType=VARCHAR}, - DEPARTPROVINCECODE = #{departprovincecode,jdbcType=VARCHAR}, - DEPARTPROVINCENAME = #{departprovincename,jdbcType=VARCHAR}, - DEPARTCITYCODE = #{departcitycode,jdbcType=VARCHAR}, - DEPARTCITYNAME = #{departcityname,jdbcType=VARCHAR}, - DEPARTCOUNTYCODE = #{departcountycode,jdbcType=VARCHAR}, - DEPARTCOUNTYNAME = #{departcountyname,jdbcType=VARCHAR}, - DEPARTADDR = #{departaddr,jdbcType=VARCHAR}, - DEPARTCONTACT = #{departcontact,jdbcType=VARCHAR}, - DEPARTPHONE = #{departphone,jdbcType=VARCHAR}, - RECEIPTPROVINCECODE = #{receiptprovincecode,jdbcType=VARCHAR}, - RECEIPTPROVINCENAME = #{receiptprovincename,jdbcType=VARCHAR}, - RECEIPTCITYCODE = #{receiptcitycode,jdbcType=VARCHAR}, - RECEIPTCITYNAME = #{receiptcityname,jdbcType=VARCHAR}, - RECEIPTCOUNTYCODE = #{receiptcountycode,jdbcType=VARCHAR}, - RECEIPTCOUNTYNAME = #{receiptcountyname,jdbcType=VARCHAR}, - RECEIPTADDR = #{receiptaddr,jdbcType=VARCHAR}, - RECEIPTCONTACT = #{receiptcontact,jdbcType=VARCHAR}, - RECEIPTPHONE = #{receiptphone,jdbcType=VARCHAR}, - SHIPMENTDATE = #{shipmentdate,jdbcType=TIMESTAMP}, - ARRIVEDATE = #{arrivedate,jdbcType=TIMESTAMP}, - COST = #{cost,jdbcType=DECIMAL}, - GOODSSUM = #{goodssum,jdbcType=DECIMAL}, - ISEXTRACT = #{isextract,jdbcType=DECIMAL}, - ISLONGHAUL = #{islonghaul,jdbcType=DECIMAL}, - ISDELIVERY = #{isdelivery,jdbcType=DECIMAL}, - ISVENEER = #{isveneer,jdbcType=DECIMAL}, - COMMENTS = #{comments,jdbcType=VARCHAR}, - CREATETIME = #{createtime,jdbcType=TIMESTAMP}, - UPDATETIME = #{updatetime,jdbcType=TIMESTAMP}, - DRIVERNAME = #{drivername,jdbcType=VARCHAR}, - CARNUMBER = #{carnumber,jdbcType=VARCHAR}, - SERVICEORDERLIST = #{serviceorderlist,jdbcType=VARCHAR}, - ISACCOUNT = #{isaccount,jdbcType=DECIMAL}, - DTACCOUNT = #{dtaccount,jdbcType=TIMESTAMP}, - ISAMOUNT = #{isamount,jdbcType=DECIMAL}, - DTAMOUNT = #{dtamount,jdbcType=TIMESTAMP} - where ILINEID = #{ilineid,jdbcType=DECIMAL} - + DTAMOUNT = #{dtamount,jdbcType=TIMESTAMP} + where ILINEID = #{ilineid,jdbcType=DECIMAL} + - + insert into HYCWAYBILL(ILINEID,WAYBILLCODE, CARRIERID, CARRIERNAME, DEPARTPROVINCECODE, DEPARTPROVINCENAME, DEPARTCITYCODE, DEPARTCITYNAME, DEPARTCOUNTYCODE, @@ -869,20 +874,24 @@ #{drivername,jdbcType=VARCHAR},#{carnumber,jdbcType=VARCHAR},#{serviceorderlist,jdbcType=VARCHAR}) - + delete from HYCWAYBILL where waybillcode = #{waybillcode,jdbcType=VARCHAR} - + + + - + \ No newline at end of file diff --git a/erp-hyc-interfaces-base/src/main/resources/mappers/SmstyleMapper.xml b/erp-hyc-interfaces-base/src/main/resources/mappers/SmstyleMapper.xml index 4bd473b50ec9d95fde09bef16adbe655a151f7f0..210e5f1eb0a30b6b83cd909f729cf9f4fca97ffe 100644 --- a/erp-hyc-interfaces-base/src/main/resources/mappers/SmstyleMapper.xml +++ b/erp-hyc-interfaces-base/src/main/resources/mappers/SmstyleMapper.xml @@ -119,7 +119,7 @@ limit ${limitStart} , ${limitEnd} - - + Orcal insert into SMSTYLE (VCSTYLENAME, ICONTRACTID, ITYPEID, @@ -174,7 +174,7 @@ This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Thu Oct 12 11:42:14 CST 2017. --> - + Orcal insert into SMSTYLE