| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.mandi.basicconfig.persist.*; |
| | | import com.mandi.fendan.util.ConvertTool; |
| | | import com.mandi.servlet.file.impl.FileLoadImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import com.google.gson.JsonParser; |
| | | import com.mandi.basicconfig.mapper.FdRepertoryNexusMapper; |
| | | import com.mandi.basicconfig.mapper.NczsjMapper; |
| | | import com.mandi.basicconfig.persist.FdRepertoryNexus; |
| | | import com.mandi.basicconfig.persist.Ncck; |
| | | import com.mandi.basicconfig.persist.Ncdepart; |
| | | import com.mandi.basicconfig.persist.Ncworker; |
| | | import com.mandi.basicconfig.persist.Ncywdy; |
| | | import com.mandi.common.JSONobj; |
| | | import com.mandi.common.Wxhtmethod; |
| | | import com.mandi.common.ParamFileter.BigDecimalfiter; |
| | |
| | | String tdmx_pch=jo.get("tdmx_pch").getAsString(); |
| | | // Fd_XSTDMX tdmx=this.tdmxper.getbyPCH(tdmx_pch); |
| | | Fd_XSTDMX tdmx=this.tdmxper.getbyPCHONE(tdmx_pch,vehicleId); |
| | | if(tdmx == null) { |
| | | String errMsg = "一卡通卸车失败,请查看【" + tdmx_pch +"】出库关闭标志!"; |
| | | throw new Exception(errMsg); |
| | | } |
| | | // if(tdmx.getTdmx_zcbz()!=1){ |
| | | //// throw new Exception("批次号:"+tdmx_pch+" 已经提交装车,不能重复提交装车!"); |
| | | // continue; |
| | |
| | | return orr; |
| | | } |
| | | String vehicleId=mp.get("numberplates")==null?"":mp.get("numberplates").toString(); |
| | | |
| | | String type = (String)mp.get("type"); |
| | | String sdepartNo = null; |
| | | if(type.equals("外来车辆卡")) { |
| | | sdepartNo = (String) mp.get("sdepartNo"); |
| | | } |
| | | |
| | | List<Fd_Bsheet> fd_bList = this.fbper.getListbyVehicleId(vehicleId, Serviceenum.在办); |
| | | if (fd_bList == null||fd_bList.isEmpty()) { |
| | | orr.setCode(1); |
| | |
| | | return orr; |
| | | } |
| | | } |
| | | String businessNo = bsper.getBusinessNoByCardNo(cardID); |
| | | // 改成使用在用卡的卡号、车牌号码、厂区来确认是否有销售的业务单 btid=3 businesstype00002 |
| | | String businessNo = bsper.getBusinessNoByCardNo(cardID,vehicleId,sdepartNo); |
| | | if(StringUtils.isBlank(businessNo)) { |
| | | orr.setCode(1); |
| | | orr.setErrmsg("未找到该卡的在办业务单!"); |
| | |
| | | // List<Vehicle_XSTD> vxl=this.vhxper.getlistbyVehicleId(vehicleId); |
| | | List<Vehicle_XSTD> vxl= this.vhxper.getlistbyVehicleIdandbsNoGp(vehicleId, businessNo); |
| | | List<Map<String, Object>> datamp=new ArrayList<Map<String, Object>>(); |
| | | Map<String,Fd_XSTD> xstdMap = new HashMap(); // 缓存Fd_XSTD,避免多查 |
| | | for (Vehicle_XSTD vx : vxl) { |
| | | String tdbh=vx.getXstdNo(); |
| | | Fd_XSTD td=this.tdper.getbyTDBH(tdbh); |
| | |
| | | tdm.put("td_tdbh", td.getTd_tdbh()); |
| | | tdm.put("td_tdls", td.getTd_tdls()); |
| | | tdm.put("td_jylx", td.getTd_jylx()); |
| | | Fd_XSTD fd_xstd = xstdMap.get(td.getTd_tdbh()); |
| | | if(xstdMap.get(td.getTd_tdbh())==null) { // 保证同一个提单只查一遍 |
| | | fd_xstd = tdper.getbyttdbh(td.getTd_tdbh()); |
| | | } |
| | | //增加客户名称 备注 |
| | | if(StringUtils.isBlank(fd_xstd.getTd_fpbh())){ |
| | | Nckh nckh = zsjper.getNckhbyCode(fd_xstd.getTd_khbh());// 客户不存在的特殊情况是不应该存在的,以防万一,加判空。 |
| | | tdm.put("td_khmc",nckh!=null?nckh.getName():""); |
| | | }else { |
| | | String name = ConvertTool.covertToCustoms(fd_xstd.getTd_ywdybh()); |
| | | tdm.put("td_khmc", name); |
| | | } |
| | | tdm.put("td_bz",fd_xstd.getTd_bz()); |
| | | mm.put("td", tdm); |
| | | mm.put("tdmx", tdmxl); |
| | | datamp.add(mm); |
| | | } |
| | | |
| | | |
| | | rem.put("cph", vehicleId); |
| | | rem.put("sjmc", fd_b.getDriver()); |
| | | rem.put("dh", fd_b.getPhone()); |