| | |
| | | @Resource |
| | | private SqlSessionFactory sqlSessionFactory; |
| | | |
| | | @Resource |
| | | private FdVehicleRemarkMapper fdVehicleRemarkMapper; |
| | | |
| | | @Override |
| | | public ObjectResult<String> tzPrint(Login lg, String bssNo, String ipadd) { |
| | | ObjectResult<String> orr = new ObjectResult<String>(); |
| | |
| | | } |
| | | // 如果是管理员或者非提单更物流公司的操作 |
| | | boolean isAdminOrFdAdmin = UserType.admin.toString().equals(lg.getWorkerno()) || StringUtils.isNotBlank(fdAdmin); |
| | | if (StringUtils.isEmpty(companyNo)) { |
| | | if (StringUtils.isEmpty(companyNo)) { |
| | | if (!isAdminOrFdAdmin) { // 如果不是更改车辆分单管理员和也不是系统管理员,需要加上公司no |
| | | companyNo = lg.getDepartno(); |
| | | } |
| | |
| | | mm.put("td_wfdsl", wt.getTd_wfdsl()); |
| | | mm.put("td_wfdzl", BigDecimalfiter.addscal(0, wt.getTd_wfdzl(), Contants.scale)); |
| | | } catch (Exception e) { |
| | | // TODO: handle exception |
| | | } |
| | | rl.add(mm); |
| | | } |
| | |
| | | // mm.put("td_wfdzl",BigDecimalfiter.addscal(0, wt.getTd_wfdzl(), |
| | | // Contants.scale)); |
| | | // } catch (Exception e) { |
| | | // // TODO: handle exception |
| | | // } |
| | | rl.add(mm); |
| | | } |
| | |
| | | /*xstd.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ) ? Contants.nc_ywdy_ZZ: |
| | | xstd.getTd_ywdybh().equals(Contants.nc_ywdy_MS) ? Contants.nc_ywdy_MS |
| | | : Contants.nc_ywdy_KJ*/ |
| | | ConvertTool.ncGetDefault(xstd.getTd_ywdybh()) |
| | | // ConvertTool.ncGetDefault(xstd.getTd_ywdybh()) |
| | | ConvertTool.ncGetDefault(xstd.getTd_cqNo()) |
| | | ); |
| | | // 这个地方改一下,允许fd_mx_wlgs中存在的单查看 |
| | | int total = fdMxWlgsMapper.selectCountByTdTdls(xstd.getTd_tdls()); |
| | |
| | | /*xstd.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ) ? Contants.nc_ywdy_ZZ: |
| | | xstd.getTd_ywdybh().equals(Contants.nc_ywdy_MS) ? Contants.nc_ywdy_MS |
| | | : Contants.nc_ywdy_KJ*/ |
| | | ConvertTool.ncGetDefault(xstd.getTd_ywdybh()) |
| | | // ConvertTool.ncGetDefault(xstd.getTd_ywdybh()) |
| | | ConvertTool.ncGetDefault(xstd.getTd_cqNo()) |
| | | ); |
| | | int total = fdMxWlgsMapper.selectCountByTdTdls(xstd.getTd_tdls()); |
| | | if (ccr == null && total == 0) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public ObjectResult<Boolean> delFdsheet(Login lg, String bsNo) throws Exception{ |
| | | ObjectResult<Boolean> or = new ObjectResult<Boolean>(); |
| | | if (lg == null) { |
| | |
| | | String xstdNo = VX.getXstdNo(); |
| | | List<Fd_XSTDMX> mxl = new ArrayList<Fd_XSTDMX>(); |
| | | Fd_XSTD xstd = this.tdper.getbyTDBH(xstdNo); |
| | | if(xstd==null) continue; |
| | | List<Fd_XSTDMX> MXL = this.tdmxper.getbyBsNoandcmNo(xstd.getTd_tdls(), bsNo, lg.getDepartno()); |
| | | double ZZL = 0; |
| | | int ZZS = 0; |
| | |
| | | |
| | | this.fdvcper.del(vehicleId, lg.getDepartno(), fb.getSdepartNo()); |
| | | |
| | | // 发送NC系统删除分单信息 |
| | | // 发送NC系统删除分单信息 todo 发送nc暂时取消掉,正式要恢复 |
| | | if (tdl != null && tdl.size() > 0) { |
| | | Fileoperation.AppendContentToFile(Fileoperation.gettestFileName(), |
| | | "取消配车业务单 请求提单 ::" + Jacksonmethod.tojson(tdl, false)); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | // 删除车辆分单的备注remark |
| | | fdVehicleRemarkMapper.deleteByBusinessNo(bsNo); |
| | | or.setCode(0); |
| | | or.setItem(true); |
| | | return or; |
| | |
| | | String tdNo = tdje.getAsString(); |
| | | if (StringUtils.isNotBlank(tdNo)) { |
| | | Fd_XSTD td = this.tdper.getbyTDBH(tdNo); |
| | | if (td == null || td.getTd_wfdsl()<=0 ) { //|| td.isTd_zcwcbz() 装车完成标志 不需要了 |
| | | if (td == null || td.getTd_wfdsl()<=0 ) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | //当前用户只能看到可以操作的提单 不可以操作的提单看不到 |
| | | //所有以下else操作去掉 |
| | | if (StringUtils.isBlank(bsDE)) { |
| | | /*bsDE = td.getTd_cqNo().equals(Contants.nc_ywdy_ZZ) ? Contants.zzSdepartNo : |
| | | td.getTd_cqNo().equals(Contants.nc_ywdy_MS)? Contants.msSdepartNo : |
| | | td.getTd_cqNo().equals(Contants.nc_ywdy_YR)? Contants.yrSdepartNo : |
| | | Contants.kjSdepartNo;*/ |
| | | bsDE = ConvertTool.ncCovertToYkt(td.getTd_cqNo()); |
| | | } |
| | | // else { |
| | | // // 郑州 |
| | | // if (bsDE.equals(Contants.zzSdepartNo)) { |
| | | // if (!td.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ)) { |
| | | // orr.setCode(1); |
| | | // orr.setErrmsg("提单:"+td.getTd_ywdybh()+"不是郑州厂区的提单,不能同时配单!"); |
| | | // return orr; |
| | | // } |
| | | // } else if(bsDE.equals(Contants.msSdepartNo)) { |
| | | // if (!td.getTd_ywdybh().equals(Contants.nc_ywdy_MS)) { |
| | | // orr.setCode(1); |
| | | // orr.setErrmsg("提单:"+td.getTd_ywdybh()+"不是明晟厂区的提单,不能同时配单!"); |
| | | // return orr; |
| | | // } |
| | | // }else { |
| | | // if (!td.getTd_ywdybh().equals(Contants.nc_ywdy_KJ)) { |
| | | // orr.setCode(1); |
| | | // orr.setErrmsg("提单:"+td.getTd_ywdybh()+"不是明晟厂区的提单,不能同时配单!"); |
| | | // return orr; |
| | | // } |
| | | // } |
| | | // } |
| | | if (StringUtils.isBlank(ziti)) { |
| | | ziti = td.getTd_ztbz() == 2 ? "自提" : "非自提"; |
| | | } |
| | | if (StringUtils.isBlank(Rcompany)) { |
| | | Map<String, Object> mm = this.dqper.getKH(td.getTd_khbh()); |
| | | if(mm == null || mm.size() == 0) { // 客户必须存在,否则无法分单 |
| | | orr.setCode(1); |
| | | orr.setErrmsg("该提单客户不存在,请检查数据!"); |
| | | return orr; |
| | | } |
| | | // |
| | | /* |
| | | * 1、外贸有发票编号,内贸没有发票编号 |
| | | * 2、内贸取实际公司名称,外贸取相应组织的公司简称+‘报关’ |
| | |
| | | if (mm != null) { |
| | | Rcompany = mm.get("name") == null ? "" : mm.get("name").toString(); |
| | | } |
| | | if(mm == null || mm.size() == 0) { // 客户必须存在,否则无法分单 |
| | | orr.setCode(1); |
| | | orr.setErrmsg("该提单客户不存在,请检查数据!"); |
| | | return orr; |
| | | } |
| | | } else { |
| | | /*Rcompany = (td.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ)?"郑州报关": |
| | | td.getTd_ywdybh().equals(Contants.nc_ywdy_MT)?"河南报关": |
| | | td.getTd_ywdybh().equals(Contants.nc_ywdy_MS)?"明晟报关": |
| | | "科技报关");*/ |
| | | Rcompany = ConvertTool.covertToCustoms(td.getTd_ywdybh()); |
| | | // Rcompany = ConvertTool.covertToCustoms(td.getTd_ywdybh()); |
| | | Rcompany = ConvertTool.covertToCustoms(td.getTd_cqNo()); |
| | | } |
| | | } |
| | | tdl.add(td); |
| | |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("销售业务车辆出厂程序" + e.getMessage(),e); |
| | | throw new Exception(StringUtils.isEmpty(e.getMessage()) ? "销售业务车辆出厂程序出错!" : e.getMessage()); |
| | | } |
| | | orr.setCode(0); |
| | |
| | | /*td.getTd_ywdybh().equals(Contants.nc_ywdy_ZZ) ? Contants.nc_ywdy_ZZ |
| | | :td.getTd_ywdybh().equals(Contants.nc_ywdy_MS) ? Contants.nc_ywdy_MS |
| | | : Contants.nc_ywdy_KJ*/ |
| | | ConvertTool.ncGetDefault(td.getTd_ywdybh()) |
| | | // ConvertTool.ncGetDefault(td.getTd_ywdybh()) |
| | | ConvertTool.ncGetDefault(td.getTd_cqNo()) |
| | | ); |
| | | |
| | | int total = fdMxWlgsMapper.selectCountByTdTdls(td.getTd_tdls()); |
| | | int total = fdMxWlgsMapper.selectCountByTdTdls(td.getTd_cqNo()); |
| | | if (wldq == null && total == 0) { |
| | | orr.setCode(1); |
| | | orr.setErrmsg("当前账号所属物流公司没有配置该地区的分单权限!"); |