admin/.env.development
@@ -2,7 +2,7 @@ NODE_ENV = 'development' # VUE_APP_API_URL = 'https://atwl.ahzyssl.com/zhyq_interface' VUE_APP_API_URL = 'http://localhost:10010' # VUE_APP_API_URL = 'http://localhost:10010' # VUE_APP_API_URL = 'http://192.168.0.173/gateway_interface' #VUE_APP_API_URL = 'http://10.50.250.253:8088/gateway_interface' VUE_APP_API_URL = 'http://10.50.250.253:8088/gateway_interface' admin/src/views/index.vue
@@ -273,7 +273,10 @@ if (res == undefined || res == null) { return } const myWindow = window.open(res) console.log('单点登录地址------', res) const myWindow = top.window.open(res) console.log('myWindow---', myWindow) setTimeout(() => { const params = { componentId: 'dfe', @@ -330,6 +333,8 @@ }, msgType: 'tlnc' } const argus = JSON.parse(row.param5) console.log('row.param5 Obj---', argus) // const argus = JSON.stringify(params) myWindow.postMessage('{"method":"goToApp","argument":' + row.param5 + '}', '*') }, 8000) admin/src/views/platform/LogisticsRecord/waybill.vue
@@ -22,6 +22,11 @@ <el-table-column prop="carrierName" label="运输公司" min-width="100" show-overflow-tooltip /> <el-table-column prop="driverName" label="司机" min-width="100" show-overflow-tooltip /> <el-table-column prop="drivierPhone" label="司机电话" min-width="100" show-overflow-tooltip /> <el-table-column prop="wmsContractNum" label="WMS合同号" min-width="100" show-overflow-tooltip > <template v-slot="scope"> <span v-if="scope.row.platformWmsJob">{{ scope.row.platformWmsJob.contractNum }}</span> </template> </el-table-column> <el-table-column prop="inTypeTemp" label="作业类型" min-width="100" show-overflow-tooltip> <template v-slot="scope"> <span v-if="scope.row.type == '0'">自有车卸货</span> @@ -98,6 +103,11 @@ filed: 'driverName', type: 'input', label: '驾驶员' }, { filed: 'wmsContractNum', type: 'input', label: '合同号' }, { filed: 'carCodeFront', @@ -238,4 +248,4 @@ color: #000000; margin-bottom: 15px; } </style> </style> server/README.md
@@ -18,3 +18,7 @@ 1、关于外网访问限制 ,如果服务器重启了或者网卡重启,进行一下操作: vim /etc/resolv.conf nameserver 改成 nameserver 202.102.192.68 #nohup不产生日志文件命令: nohup > /dev/null 2>&1 & server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java
@@ -159,11 +159,7 @@ WxPlatNotice wxPlatNotice = new WxPlatNotice(); wxPlatNotice.createBeginWxNotice(systemDictDataBiz,smsEmailMapper,bookings,systemUser.getOpenid()); wxPlatNotice.createEndWxNotice(systemDictDataBiz,smsEmailMapper,bookings,systemUser.getOpenid()); } } } return bookings.getId(); server/system_service/src/main/java/com/doumee/service/business/third/model/response/TmsOrderInfoResponse.java
@@ -48,6 +48,8 @@ private String receiveLat; // 卸货仓库纬度 @ApiModelProperty(value = "计划到达时间" ) private String plannedArrivedDate; // 计划到达时间 @ApiModelProperty(value = "是否超库存 0非超库存 1:超库存" ) private Integer overStock ; @ApiModelProperty(value = "gis轨迹经纬度集合" ) private List<TmsGisListResponse> gisList; @ApiModelProperty(value = "生命周期集合" ) server/system_service/src/main/java/com/doumee/service/business/third/model/response/TmsOutQtyAndVehicleQtyResponse.java
@@ -15,12 +15,26 @@ @ApiModel("tms指定时间范围内累计出库量返回参数") public class TmsOutQtyAndVehicleQtyResponse { @ApiModelProperty(value = "累计出库量") private BigDecimal totalOutQty;//数字 累计出库量 @ApiModelProperty(value = "省外累计出库量") @ApiModelProperty(value = "累计出库量 累计值") private BigDecimal totalOutQty;//数字 累计出库量(totalOutT01Qty+totalOutT03Qty) @ApiModelProperty(value = "省外累计出库量 累计值") private BigDecimal outSideProvinceOutQty;// 数字 省外累计出库量 @ApiModelProperty(value = "省内累计出库量") @ApiModelProperty(value = "省内累计出库量 累计值") private BigDecimal inSideProvinceOutQty;// 数字 省内累计出库量 @ApiModelProperty(value = "累计出库车次") private Integer vehicleQty;//数字 累计出库车次 @ApiModelProperty(value = "省外其他(移库)量") private BigDecimal outSideProvinceOutT03Qty ;//数字 省外其他(移库)量 @ApiModelProperty(value = "省外销售量") private BigDecimal outSideProvinceOutT01Qty ;//数字 省外销售量 @ApiModelProperty(value = "省内销售量") private BigDecimal inSideProvinceOutT01Qty;// 数字 省内销售量 @ApiModelProperty(value = "省内其他(移库)量") private BigDecimal inSideProvinceOutT03Qty;// 数字 省内其他(移库)量 @ApiModelProperty(value = "调拨出库量(省内销售+省外销售)") private BigDecimal totalOutT01Qty ;//数字 调拨出库量(省内销售+省外销售) @ApiModelProperty(value = "其他出库量(省内其他+省外其他)") private BigDecimal totalOutT03Qty ;//数字 其他出库量(省内其他+省外其他) @ApiModelProperty(value = "累计出库量") private Integer vehicleQty ;//数字 车次数 } server/system_service/src/main/java/com/doumee/service/business/third/model/response/TmsTotalAndReportVehicleQtyResponse.java
@@ -22,4 +22,7 @@ private BigDecimal reportQty;// 数字 提报运力数 @ApiModelProperty(value = "总运力数" ) private BigDecimal totalQty;// 数字 总运力数 @ApiModelProperty(value = "在途数量" ) private BigDecimal inTransitQty;// 数字 在途数量 } server/system_timer/src/main/java/com/doumee/jobs/fegin/VisitServiceFegin.java
@@ -76,6 +76,9 @@ @ApiOperation("【数字化月台】月台停靠超时报警业务") @GetMapping("/timer/platformJob/platformJobTimer") ApiResponse platformJobTimer(); @ApiOperation("【数字化月台】月台检查电子锁上锁状态") @GetMapping("/timer/platformJob/platformCheckWmsLockStatus") ApiResponse platformCheckWmsLockStatusTimer(); @ApiOperation("【数字化月台】月台作业超时报警业务") @GetMapping("/timer/platformJob/platformJobWorkTimeOut") ApiResponse platformJobWorkTimeOut(); server/system_timer/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@ spring: profiles: active: self active: pro application: name: systemTimer # 安全配置 server/visits/admin_timer/src/main/java/com/doumee/api/PlatformJobController.java
@@ -28,6 +28,12 @@ platformJobService.timeOutReport(); return ApiResponse.success("月台停靠超时报警业务"); } @ApiOperation("月台作业检查电子锁上锁状态") @GetMapping("/platformCheckWmsLockStatus") public ApiResponse checkWmsLockStatus() { platformJobService.checkWmsLockStatus(); return ApiResponse.success("月台停靠超时报警业务"); } @ApiOperation("月台作业超时报警业务") server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformJob.java
@@ -400,6 +400,9 @@ @ApiModelProperty(value = "作业类型查询 多个以,分割") @TableField(exist = false) private String queryType; @ApiModelProperty(value = "wms合同号") @TableField(exist = false) private String wmsContractNum; @ApiModelProperty(value = "电子锁状态:0=未上锁 1=部分上锁 2=全部上锁") @TableField(exist = false) server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/PlatformWmsDetail.java
@@ -103,4 +103,9 @@ @ApiModelProperty(value = "承运单号", example = "1") @TableField(exist = false) private String carryBillCode; @ApiModelProperty(value = "合同号`") @ExcelColumn(name="合同号`") private String contractNum; } server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/TotalOutQtyNumVO.java
@@ -19,6 +19,12 @@ private BigDecimal currentInNum; @ApiModelProperty(value = "当前周期出库量(省外)") private BigDecimal currentOutNum; @ApiModelProperty(value = "当前调拨出库量(省内+省外)") private BigDecimal currentProvinceNum; @ApiModelProperty(value = "当前其他出库量(省外+省外)") private BigDecimal currentOtherNum; @ApiModelProperty(value = "上隔天周期出库量(省内)") private BigDecimal lastInNum; @ApiModelProperty(value = "上个周期出库量(省外)") server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZXTVO.java
@@ -23,6 +23,8 @@ @ApiModelProperty(value = "当前值 万支") private BigDecimal currentNum; @ApiModelProperty(value = "在途车辆 万支") private BigDecimal ztNum; @ApiModelProperty(value = "图形明细集合") private List<WholeProvinceZxtDetailVO> detailList; server/visits/dmvisit_service/src/main/java/com/doumee/dao/web/response/platformReport/WholeProvinceZxtDetailVO.java
@@ -20,10 +20,12 @@ @ApiModelProperty(value = "利用率 ") private BigDecimal useRate; @ApiModelProperty(value = "总数量 万支") @ApiModelProperty(value = "总数量 万支 / 辆") private BigDecimal totalNum; @ApiModelProperty(value = "当前值 万支") @ApiModelProperty(value = "当前值 万支 /辆") private BigDecimal currentNum; @ApiModelProperty(value = "当前值 万支 /辆") private BigDecimal zaituNum; } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/PlatformJobService.java
@@ -195,6 +195,11 @@ PlatformJob finishWork(JobOperateDTO jobOperateDTO); /** * 查询所有已完成作业电子锁上锁状态 */ void checkWmsLockStatus(); /** * 手动授权车辆离场 * @param jobOperateDTO */ server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarUseBookServiceImpl.java
@@ -161,7 +161,6 @@ systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode(), Arrays.asList(systemUser.getOpenid().split(",")),0); } return carUseBook.getId(); } server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -2175,7 +2175,7 @@ } if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() .eq(Member::getIsdeleted,Constants.ZERO) .ne(Member::getType,Constants.memberType.visitor) .in(Member::getType,Constants.memberType.gkuser,Constants.memberType.visitor) .eq(Member::getPhone,registerDriverDTO.getPhone()) )>Constants.ZERO){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"手机号已注册!"); @@ -2188,7 +2188,7 @@ }; smsEmailService.validateCode(registerDriverDTO.getValidCode(),registerDriverDTO.getPhone()); String salt = RandomStringUtils.randomAlphabetic(6); ; Member member = new Member(); member.setCreateDate(new Date()); member.setIsdeleted(Constants.ZERO); server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformJobServiceImpl.java
@@ -10,6 +10,7 @@ import com.doumee.core.haikang.model.param.request.ParkReservationDelRequest; import com.doumee.core.haikang.model.param.respose.ParkReservationAddResponse; import com.doumee.core.haikang.service.HKService; import com.doumee.service.business.third.WmsService; import com.doumee.service.business.third.model.LoginUserInfo; import com.doumee.service.business.third.model.PageData; import com.doumee.service.business.third.model.PageWrap; @@ -305,7 +306,7 @@ .le(pageWrap.getModel().getCreateDateEnd() != null, PlatformWmsJob::getIoCreatedate, Utils.Date.getEnd(pageWrap.getModel().getCreateDateEnd())) .isNotNull(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getContractNum) .isNull(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getContractNum) ; .exists(StringUtils.isNotBlank(pageWrap.getModel().getWmsContractNum()),"select tt.id from platfrom_wms_detail tt where tt.isdeleted=0 and tt.job_id=t.id"); for(PageWrap.SortData sortData: pageWrap.getSorts()) { if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { @@ -629,7 +630,8 @@ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未在工作时间["+platformGroup.getStartTime() + "-" + platformGroup.getEndTime() +"],无法进行签到"); } //查询今日最大的签到数 List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda() .apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); if(CollectionUtils.isEmpty(signList)){ platformJob.setSignNum(Constants.ONE); } else{ @@ -924,6 +926,23 @@ @Override public void sendInPark(PlatformJob platformJob){ log.info("【下发停车场权限】================开始===="+platformJob.getCarCodeFront()); if(Constants.equalsInteger(platformJob.getType(),Constants.THREE) && Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey()) ){ //如果是已完成的外协车卸货作业,查询所有合同是否以上电子锁,如果没有,不自动授权离园 List<PlatformWmsDetail> details = platformWmsDetailMapper.selectList(new QueryWrapper<PlatformWmsDetail>().lambda() .select(PlatformWmsDetail::getLockStatus,PlatformWmsDetail::getId) .eq(PlatformWmsDetail::getJobId,platformJob.getId()) .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO) ); if(details!=null && details.size()>0){ for(PlatformWmsDetail d : details){ if(Constants.equalsInteger(d.getLockStatus(),Constants.ZERO)){ //如果存在未上锁,不自动授权离园 return; } } } } if(Constants.equalsInteger(platformJob.getType(),Constants.TWO) || Constants.equalsInteger(platformJob.getType(),Constants.THREE) || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){ @@ -1005,6 +1024,10 @@ platformJob.setInHkdate(new Date()); if(sendStatus){ platformJob.setInHkstatus(Constants.TWO); if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ //如果已下发成功,标记已授权离园状态 platformJob.setStatus(Constants.PlatformJobStatus.AUTHED_LEAVE.getKey()); } }else{ platformJob.setInHkstatus(Constants.THREE); } @@ -1478,19 +1501,21 @@ Date date = new Date(); List<String> codeList =new ArrayList<>(); for(PlatformWmsDetail d : details){ codeList.add(d.getIocode()); codeList.add(d.getContractNum()); } TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest(); tmsLock.setContractNumbers(codeList); TmsBaseResponse<List<TmsLockStatusQueryResponse>> lockResult = tmsService.lockStatusQuery(tmsLock); if(lockResult!=null && lockResult.isSuccess()&& lockResult.getData()!=null ){ if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){ for(TmsLockStatusQueryResponse s : lockResult.getData()){ if(StringUtils.isBlank(s.getContractNumber())){ continue; } platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() .eq(PlatformWmsDetail::getIocode,s.getContractNumber()) .eq(PlatformWmsDetail::getContractNum,s.getContractNumber()) .set(PlatformWmsDetail::getEditDate,date) .set(PlatformWmsDetail::getLockDate,s.getOutDate()) .set(PlatformWmsDetail::getLockStatus,Constants.ONE) .eq(PlatformWmsDetail::getJobId,platformJob.getId()) .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)); } } @@ -1498,7 +1523,6 @@ }else if(Constants.equalsInteger(platformJob.getType(),Constants.ONE) || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){ //TODO 外协车卸货 或者 市公司车卸货 则根据任务情况 } @@ -1519,6 +1543,76 @@ Constants.PlatformBroadcastContent.DONE.getInfo()); return platformJob; } @Override public void checkWmsLockStatus(){ List<PlatformWmsDetail> details = platformWmsDetailMapper.selectJoinList(PlatformWmsDetail.class,new MPJLambdaWrapper<PlatformWmsDetail>() .selectAll(PlatformWmsDetail.class) .leftJoin(PlatformJob.class,PlatformJob::getId,PlatformWmsDetail::getJobId) .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey())//查询已完成作业的 .eq(PlatformJob::getIsdeleted,Constants.ZERO) .and(wr->{wr.isNull(PlatformWmsDetail::getLockStatus).or().eq(PlatformWmsDetail::getLockStatus,Constants.ZERO);}) .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)); if(details !=null && details.size()>0){ Date date = new Date(); List<String> codeList =new ArrayList<>(); for(PlatformWmsDetail d : details){ codeList.add(d.getContractNum()); } TmsLockStatusQueryRequest tmsLock = new TmsLockStatusQueryRequest(); tmsLock.setContractNumbers(codeList); List<Integer> jobIds = new ArrayList<>(); TmsBaseResponse<List<TmsLockStatusQueryResponse>> lockResult = tmsService.lockStatusQuery(tmsLock); if(lockResult!=null && lockResult.getCode()!=null && lockResult.getCode().equals("0")&& lockResult.getData()!=null ){ for(TmsLockStatusQueryResponse s : lockResult.getData()){ try { //异常处理,能处理一个是一个 platformWmsDetailMapper.update(null,new UpdateWrapper<PlatformWmsDetail>().lambda() .eq(PlatformWmsDetail::getContractNum,s.getContractNumber()) .set(PlatformWmsDetail::getEditDate,date) .set(PlatformWmsDetail::getLockDate,s.getOutDate()) .set(PlatformWmsDetail::getLockStatus,Constants.ONE) .eq(PlatformWmsDetail::getIsdeleted,Constants.ZERO)); PlatformWmsDetail job = getJobByContractnumFromDetail(s.getContractNumber(),details); if(job != null){ jobIds.add(job.getJobId()); } }catch (Exception e){ logger.error("=============更新电子锁状态信息异常:"+e.getMessage()); } } } if(jobIds.size()>0){ List<PlatformJob> list = platformJobMapper.selectJoinList(PlatformJob.class,new MPJLambdaWrapper<PlatformJob>() .selectAll(PlatformJob.class) .eq(PlatformJob::getStatus,Constants.PlatformJobStatus.DONE.getKey()) .in(PlatformJob::getId,jobIds) ); if(list!=null){ for(PlatformJob platformJob : list){ sendInPark(platformJob);//检查是否需要自动授权离园 } } } } } private PlatformWmsJob getJobByContractnum(String contractNumber, List<PlatformWmsJob> details) { for(PlatformWmsJob d : details){ if(StringUtils.equals(contractNumber,d.getContractNum())){ return d; } } return null; } private PlatformWmsDetail getJobByContractnumFromDetail(String contractNumber, List<PlatformWmsDetail> details) { for(PlatformWmsDetail d : details){ if(StringUtils.equals(contractNumber,d.getContractNum())){ return d; } } return null; } /** server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -169,10 +169,9 @@ } if (Constants.equalsInteger(Constants.ZERO, erpVisitDTO.getIdcardType()) && erpVisitDTO.getIdcardNo().length() != 18 //&&!IdcardUtil.isValidCard(visits.getIdcardNo()) ) { ){ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对不起,身份证号码有误,请核实后重试!"); } Visits visits = new Visits(); //根据被访问人ERP主键查询系统内人员主键信息 Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda() server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -489,7 +489,7 @@ List<WaningEventDataListVO> list = new ArrayList<>(); RuleEventSearchRequest request = new RuleEventSearchRequest(); request.setPageNo(1); request.setPageSize(10); request.setPageSize(1000); request.setFiledOptions(new ArrayList<>()); request.setSorts(new ArrayList<>()); RuleEventFiledOptionsRequest file = new RuleEventFiledOptionsRequest(); @@ -499,7 +499,6 @@ if(type == 1){ file.setFieldValue("131588");//安防告警 }else if(type == 2){ file.setFieldValue("131593");//人员告警 } request.getFiledOptions().add(file); @@ -507,34 +506,36 @@ sort.setSortField("happen_time"); sort.setSortType("desc"); request.getSorts().add(sort); int total =0; BaseResponse<BaseListPageResponse< RuleEventSearchDataResponse>> result = HKService.ruleEventSearch(request); if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) && result.getData()!=null){ List<RuleEventSearchDataResponse> rlist = result.getData().getList(); lastResult.setTotal(result.getData().getTotal()); if(rlist!=null){ String privateIp =systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.EVENT_FILES_PRIVATE_DOMAIN).getCode(); String publicIp =systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.EVENT_FILES_PUBLIC_DOMAIN).getCode(); for(RuleEventSearchDataResponse r :rlist){ try { if(DateUtil.getISO8601DateByStr(r.getHappen_time()).getTime() >= Utils.Date.getStart(new Date()).getTime()){ if(DateUtil.getISO8601DateByStr(r.getHappen_time()).getTime() < Utils.Date.getStart(new Date()).getTime()){ continue; } }catch (Exception e){ } total ++; WaningEventDataListVO data = new WaningEventDataListVO(); data.setCreateDate(DateUtil.getPlusTime(DateUtil.getISO8601DateByStr(r.getHappen_time()))); data.setAddr(r.getSrc_name()); data.setImg(r.getImage_url()); if(data.getImg()!=null){ data.setImg(data.getImg().replace(privateIp,publicIp)); } data.setTitle(r.getEvent_type_name()); data.setCreateDate(DateUtil.getPlusTime(DateUtil.getISO8601DateByStr(r.getHappen_time()))); // data.setContent(r.get); list.add(data); } } } lastResult.setTotal(total); lastResult.setList(list); return lastResult; } @@ -2356,7 +2357,10 @@ TotalOutQtyNumVO data = new TotalOutQtyNumVO(); data.setCurrentInNum(new BigDecimal(0)); data.setLastInNum(new BigDecimal(0)); data.setCurrentProvinceNum(new BigDecimal(0)); data.setCurrentOtherNum(new BigDecimal(0)); data.setSameInNum(new BigDecimal(0)); //---------省外---------------- data.setCurrentOutNum(new BigDecimal(0)); data.setLastOutNum(new BigDecimal(0)); @@ -2396,6 +2400,8 @@ List<TmsOutQtyAndVehicleQtyResponse> listSame= tmsService.getOutQtyAndVehicleQty(param);//去年同期 if(listSame!=null ){ for(TmsOutQtyAndVehicleQtyResponse model : listSame){ model.setOutSideProvinceOutQty(Constants.formatBigdecimal(model.getOutSideProvinceOutT03Qty()).add(Constants.formatBigdecimal(model.getOutSideProvinceOutT01Qty())));//省外累计 model.setInSideProvinceOutQty(Constants.formatBigdecimal(model.getInSideProvinceOutT03Qty()).add(Constants.formatBigdecimal(model.getInSideProvinceOutT01Qty())));//省内累计 data.setSameOutNum(data.getSameOutNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty()))); data.setSameInNum(data.getSameInNum().add(Constants.formatBigdecimal(model.getInSideProvinceOutQty()))); } @@ -2406,9 +2412,13 @@ List<TmsOutQtyAndVehicleQtyResponse> listCur = tmsService.getOutQtyAndVehicleQty(param);//本周期 if(listCur!=null ){ for(TmsOutQtyAndVehicleQtyResponse model : listCur){ model.setOutSideProvinceOutQty(Constants.formatBigdecimal(model.getOutSideProvinceOutT03Qty()).add(Constants.formatBigdecimal(model.getOutSideProvinceOutT01Qty())));//省外累计 model.setInSideProvinceOutQty(Constants.formatBigdecimal(model.getInSideProvinceOutT03Qty()).add(Constants.formatBigdecimal(model.getInSideProvinceOutT01Qty())));//省内累计 data.setCurrentOutNum(data.getCurrentOutNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty()))); data.setCurrentInNum(data.getCurrentInNum().add(Constants.formatBigdecimal(model.getInSideProvinceOutQty()))); data.setTotalCarNum(data.getTotalCarNum()+Constants.formatIntegerNum(model.getVehicleQty()));//累计车次 data.setCurrentProvinceNum(data.getCurrentProvinceNum().add(model.getOutSideProvinceOutQty()).add(model.getInSideProvinceOutT01Qty()));//省内省外销售量 data.setCurrentOtherNum(data.getCurrentOtherNum().add(model.getOutSideProvinceOutT03Qty()).add(model.getInSideProvinceOutT03Qty()));//省内省外其他出库量 } } param.setDateEnd(DateUtil.getShortTime(lastEnd)); @@ -2416,6 +2426,8 @@ List<TmsOutQtyAndVehicleQtyResponse> listLast = tmsService.getOutQtyAndVehicleQty(param);//上周期 if(listCur!=null ){ for(TmsOutQtyAndVehicleQtyResponse model : listLast){ model.setOutSideProvinceOutQty(Constants.formatBigdecimal(model.getOutSideProvinceOutT03Qty()).add(Constants.formatBigdecimal(model.getOutSideProvinceOutT01Qty())));//省外累计 model.setInSideProvinceOutQty(Constants.formatBigdecimal(model.getInSideProvinceOutT03Qty()).add(Constants.formatBigdecimal(model.getInSideProvinceOutT01Qty())));//省内累计 data.setLastOutNum(data.getLastOutNum().add(Constants.formatBigdecimal(model.getOutSideProvinceOutQty()))); data.setLastInNum(data.getLastInNum().add(Constants.formatBigdecimal(model.getInSideProvinceOutQty()))); } @@ -2429,6 +2441,8 @@ if(Constants.UNIT_TYPE == 1) { data.setCurrentInNum(Constants.formatBigdecimal(data.getCurrentInNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); data.setCurrentOutNum(Constants.formatBigdecimal(data.getCurrentOutNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); data.setCurrentOtherNum(Constants.formatBigdecimal(data.getCurrentOtherNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); data.setCurrentProvinceNum(Constants.formatBigdecimal(data.getCurrentProvinceNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); data.setLastInNum(Constants.formatBigdecimal(data.getLastInNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); data.setLastOutNum(Constants.formatBigdecimal(data.getLastOutNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); data.setSameInNum(Constants.formatBigdecimal(data.getSameInNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); @@ -2573,6 +2587,7 @@ WholeProvinceZXTVO result = new WholeProvinceZXTVO(); result.setCurrentNum(new BigDecimal(0)); result.setTotalNum(new BigDecimal(0)); result.setZtNum(new BigDecimal(0)); result.setUseRate(new BigDecimal(0)); result.setDetailList(new ArrayList<>()); List<TmsFactoryParam> paramList =factoryList(); @@ -2582,47 +2597,52 @@ WholeProvinceZxtDetailVO t = new WholeProvinceZxtDetailVO(); t.setFactoryName(p.getName()); t.setCurrentNum(new BigDecimal(0)); t.setZaituNum(new BigDecimal(0)); t.setTotalNum(Constants.formatBigdecimal(p.getNum1()));//总库存量 getFromReportVehicleQtyList(p.getCode(),t,response);//处理提报运力和总运力数据 t.setUseRate(new BigDecimal(0)); if(t.getTotalNum().compareTo(new BigDecimal(0)) !=0){ t.setUseRate(t.getCurrentNum().divide(t.getTotalNum(),4,BigDecimal.ROUND_HALF_UP)); if((t.getTotalNum().subtract(t.getZaituNum())).compareTo(new BigDecimal(0)) !=0){ t.setUseRate(t.getCurrentNum().divide(t.getTotalNum().subtract(t.getZaituNum()),4,BigDecimal.ROUND_HALF_UP)); } if(Constants.UNIT_TYPE == 1) { /*if(Constants.UNIT_TYPE == 1) { //处理单位成“箱”,一箱=5万支 t.setCurrentNum(Constants.formatBigdecimal(t.getCurrentNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); t.setTotalNum(Constants.formatBigdecimal(t.getTotalNum()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP)); } }*/ result.getDetailList().add(t); result.setCurrentNum(result.getCurrentNum().add(t.getCurrentNum())); result.setTotalNum(result.getTotalNum().add(t.getTotalNum())); result.setZtNum(result.getZtNum().add(t.getZaituNum())); } } if(result.getTotalNum().compareTo(new BigDecimal(0)) !=0){ result.setUseRate(result.getCurrentNum().divide(result.getTotalNum(),4,BigDecimal.ROUND_HALF_UP)); if((result.getTotalNum().subtract(result.getZtNum())).compareTo(new BigDecimal(0)) !=0){ result.setUseRate(result.getCurrentNum().divide(result.getTotalNum().subtract(result.getZtNum()),4,BigDecimal.ROUND_HALF_UP)); } return result; } private void getFromReportVehicleQtyList(String code,WholeProvinceZxtDetailVO t, List<TmsTotalAndReportVehicleQtyResponse> responses) { BigDecimal current = new BigDecimal(0); BigDecimal total= new BigDecimal(0); BigDecimal ztTotal= new BigDecimal(0); if(responses!=null && responses.size()>0){ for(TmsTotalAndReportVehicleQtyResponse model: responses){ if(StringUtils.equals(model.getFactoryCode(),code)){ ztTotal = ztTotal.add(Constants.formatBigdecimal(model.getInTransitQty())); total = total.add(Constants.formatBigdecimal(model.getTotalQty())); current = current.add(Constants.formatBigdecimal(model.getReportQty())); } } } t.setCurrentNum(current); t.setZaituNum(ztTotal); t.setTotalNum(total); } private BigDecimal getCurrentOutQryByList(List<TmsOutQtyAndVehicleQtyResponse> response) { BigDecimal r = new BigDecimal(0); if(response!=null && response.size()>0){ for(TmsOutQtyAndVehicleQtyResponse model: response){ r = r.add(Constants.formatBigdecimal(model.getTotalOutQty())); // model.setTotalOutQty(Constants.formatBigdecimal(model.getTotalOutT03Qty()).add(Constants.formatBigdecimal(model.getTotalOutT01Qty()))); r = r.add(Constants.formatBigdecimal(model.getTotalOutQty())); } } return r ; server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/WmsServiceImpl.java
@@ -497,6 +497,7 @@ entity.setIocode(d.getIoCode()); entity.setJobId(job.getJobId()); entity.setWmsJobId(job.getId()); entity.setContractNum(param.getContractNum()); entity.setIoQty(d.getIoQty()); entity.setRepertotyAddress(job.getRepertotyAddress()); entity.setWmsJobId(job.getId());