hjg
2024-01-20 4a3404efc438b16044fd9170814e6545a3f86fae
JavaSource/com/mandi/fendan/service/impl/ErpService.java
@@ -5,6 +5,7 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.mandi.basicconfig.penum.PrefixEnum;
import com.mandi.basicconfig.persist.Nckh;
import com.mandi.common.*;
import com.mandi.common.ParamFileter.Fileoperation;
import com.mandi.common.ParamFileter.RegexCheck;
@@ -19,7 +20,9 @@
import com.mandi.fendan.util.ConvertTool;
import com.mandi.fendan.util.FdtoNc;
import com.mandi.fendan.util.persist.*;
import com.mandi.springmvc.logs.OpLogs;
import com.mandi.system.persist.Login;
import com.mandi.system.persist.ModuleEnum;
import com.mandi.system.persist.UserType;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.map.HashedMap;
@@ -85,6 +88,9 @@
   @Resource
   private SqlSessionFactory sqlSessionFactory;
   @Resource
   private FdVehicleRemarkMapper fdVehicleRemarkMapper;
   @Override
   public ObjectResult<String> tzPrint(Login lg, String bssNo, String ipadd) {
@@ -793,6 +799,7 @@
   }
   @Override
   @Transactional(rollbackFor = Exception.class)
   public ObjectResult<Boolean> delFdsheet(Login lg, String bsNo) throws Exception{
      ObjectResult<Boolean> or = new ObjectResult<Boolean>();
      if (lg == null) {
@@ -874,6 +881,7 @@
            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;
@@ -977,7 +985,8 @@
         }
      }
      // 删除车辆分单的备注remark
      fdVehicleRemarkMapper.deleteByBusinessNo(bsNo);
      or.setCode(0);
      or.setItem(true);
      return or;
@@ -1059,8 +1068,6 @@
            return orr;
         }
      }
      JsonParser jp = new JsonParser();
      Fd_Vehicle fdv1 = new Fd_Vehicle();
      // 检查车辆信息
@@ -1112,7 +1119,7 @@
         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;
            }
@@ -1121,40 +1128,13 @@
            //当前用户只能看到可以操作的提单  不可以操作的提单看不到
            //所有以下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());
               //
               /*
               * 1、外贸有发票编号,内贸没有发票编号
               * 2、内贸取实际公司名称,外贸取相应组织的公司简称+‘报关’
@@ -1163,11 +1143,12 @@
                  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());
               }
            }
@@ -1648,6 +1629,7 @@
            }
         }
      } catch (Exception e) {
         log.error("销售业务车辆出厂程序" + e.getMessage(),e);
         throw new Exception(StringUtils.isEmpty(e.getMessage()) ? "销售业务车辆出厂程序出错!" : e.getMessage());
      }
      orr.setCode(0);