|
@ -15,6 +15,7 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.nl.common.utils.CodeUtil; |
|
|
import org.nl.common.utils.CodeUtil; |
|
@ -28,6 +29,9 @@ import org.nl.modules.wql.util.WqlUtil; |
|
|
import org.nl.system.service.param.impl.SysParamServiceImpl; |
|
|
import org.nl.system.service.param.impl.SysParamServiceImpl; |
|
|
import org.nl.wms.basedata.master.customer.service.dao.Customerbase; |
|
|
import org.nl.wms.basedata.master.customer.service.dao.Customerbase; |
|
|
import org.nl.wms.basedata.master.customer.service.dao.mapper.CustomerbaseMapper; |
|
|
import org.nl.wms.basedata.master.customer.service.dao.mapper.CustomerbaseMapper; |
|
|
|
|
|
import org.nl.wms.basedata.master.transport.service.ITransportationBaseService; |
|
|
|
|
|
import org.nl.wms.basedata.master.transport.service.dao.TransportationBase; |
|
|
|
|
|
import org.nl.wms.basedata.master.transport.service.dao.mapper.TransportationBaseMapper; |
|
|
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl; |
|
|
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl; |
|
|
import org.nl.wms.pda.mps.eum.RegionTypeEnum; |
|
|
import org.nl.wms.pda.mps.eum.RegionTypeEnum; |
|
|
import org.nl.wms.sch.manage.TaskStatusEnum; |
|
|
import org.nl.wms.sch.manage.TaskStatusEnum; |
|
@ -73,7 +77,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
private final InAndOutReturnService inAndOutReturnService; |
|
|
private final InAndOutReturnService inAndOutReturnService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private CustomerbaseMapper customerbaseMapper; |
|
|
private CustomerbaseMapper customerbaseMapper; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private TransportationBaseMapper transportationBaseMapper; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private ITransportationBaseService transportationBaseService; |
|
|
@Override |
|
|
@Override |
|
|
public Map<String, Object> pageQuery(Map whereJson, Pageable page, String[] stor_id, String[] bill_status, String[] bill_type) { |
|
|
public Map<String, Object> pageQuery(Map whereJson, Pageable page, String[] stor_id, String[] bill_status, String[] bill_type) { |
|
|
HashMap<String, String> map = new HashMap<>(whereJson); |
|
|
HashMap<String, String> map = new HashMap<>(whereJson); |
|
@ -1182,8 +1189,6 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
WQLObject dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl"); |
|
|
WQLObject dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl"); |
|
|
// 主表
|
|
|
// 主表
|
|
|
WQLObject mst = WQLObject.getWQLObject("st_ivt_iostorinv"); |
|
|
WQLObject mst = WQLObject.getWQLObject("st_ivt_iostorinv"); |
|
|
// 物流公司
|
|
|
|
|
|
WQLObject tran = WQLObject.getWQLObject("MD_CS_TransportationBase"); |
|
|
|
|
|
|
|
|
|
|
|
// 1.获取上传文件输入流
|
|
|
// 1.获取上传文件输入流
|
|
|
InputStream inputStream = null; |
|
|
InputStream inputStream = null; |
|
@ -1195,8 +1200,10 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 查询所有物流公司
|
|
|
// 查询所有物流公司
|
|
|
List<JSONObject> tranList = tran.query("is_used = '1' and is_delete = '0'") |
|
|
LambdaQueryWrapper<TransportationBase> lam = new QueryWrapper<TransportationBase>().lambda(); |
|
|
.getResultJSONArray(0).toJavaList(JSONObject.class); |
|
|
lam.eq(TransportationBase::getIs_used, "1"); |
|
|
|
|
|
lam.eq(TransportationBase::getIs_delete,"0"); |
|
|
|
|
|
List<TransportationBase> tranList = transportationBaseMapper.selectList(lam); |
|
|
|
|
|
|
|
|
ExcelReader excelReader = ExcelUtil.getReader(inputStream); |
|
|
ExcelReader excelReader = ExcelUtil.getReader(inputStream); |
|
|
List<List<Object>> read = excelReader.read(1, excelReader.getRowCount()); |
|
|
List<List<Object>> read = excelReader.read(1, excelReader.getRowCount()); |
|
@ -1221,8 +1228,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
// 物流公司名称
|
|
|
// 物流公司名称
|
|
|
String cust_name = list.get(1).toString(); |
|
|
String cust_name = list.get(1).toString(); |
|
|
// 匹配对应的物流公司
|
|
|
// 匹配对应的物流公司
|
|
|
JSONObject jsonTran = tranList.stream() |
|
|
TransportationBase jsonTran = tranList.stream() |
|
|
.filter(row -> row.getString("cust_name").equals(cust_name)) |
|
|
.filter(row -> row.getCust_name().equals(cust_name)) |
|
|
.findFirst().orElse(null); |
|
|
.findFirst().orElse(null); |
|
|
|
|
|
|
|
|
// 运单号
|
|
|
// 运单号
|
|
@ -1238,7 +1245,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
String estimated_freight = list.get(5).toString(); |
|
|
String estimated_freight = list.get(5).toString(); |
|
|
|
|
|
|
|
|
// 更新主表
|
|
|
// 更新主表
|
|
|
jsonMst.put("trans_code", ObjectUtil.isNotEmpty(jsonTran) ? jsonTran.getString("cust_code") : "" ); |
|
|
jsonMst.put("trans_code", ObjectUtil.isNotEmpty(jsonTran) ? jsonTran.getCust_code() : "" ); |
|
|
jsonMst.put("order_number", order_number); |
|
|
jsonMst.put("order_number", order_number); |
|
|
jsonMst.put("car_type", car_type); |
|
|
jsonMst.put("car_type", car_type); |
|
|
jsonMst.put("other_freight", other_freight); |
|
|
jsonMst.put("other_freight", other_freight); |
|
@ -5965,9 +5972,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
|
|
|
|
|
|
WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_IOStorInv"); // 出入库主表
|
|
|
WQLObject mstTab = WQLObject.getWQLObject("ST_IVT_IOStorInv"); // 出入库主表
|
|
|
WQLObject dtlTab = WQLObject.getWQLObject("st_ivt_iostorinvdtl"); // 出入库明细表
|
|
|
WQLObject dtlTab = WQLObject.getWQLObject("st_ivt_iostorinvdtl"); // 出入库明细表
|
|
|
WQLObject disTab = WQLObject.getWQLObject("st_ivt_iostorinvdis"); // 出入库分配明细
|
|
|
|
|
|
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); // 子卷包装关系表
|
|
|
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation"); // 子卷包装关系表
|
|
|
WQLObject tranTab = WQLObject.getWQLObject("MD_CS_TransportationBase"); // 物流公司表
|
|
|
|
|
|
WQLObject storTab = WQLObject.getWQLObject("st_ivt_bsrealstorattr"); // 实物仓库表
|
|
|
WQLObject storTab = WQLObject.getWQLObject("st_ivt_bsrealstorattr"); // 实物仓库表
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -6015,9 +6020,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
oneMap.put("receiptaddress", receiptaddress); // 收货地址
|
|
|
oneMap.put("receiptaddress", receiptaddress); // 收货地址
|
|
|
oneMap.put("receiptphone", jsonMst.getString("receiptphone")); // 收货人联系电话
|
|
|
oneMap.put("receiptphone", jsonMst.getString("receiptphone")); // 收货人联系电话
|
|
|
// 物流公司
|
|
|
// 物流公司
|
|
|
JSONObject jsonTran = tranTab.query("cust_code = '" + jsonMst.getString("trans_code") + "'").uniqueResult(0); |
|
|
TransportationBase jsonTran = transportationBaseService.findByCode(jsonMst.getString("trans_code")); |
|
|
if (ObjectUtil.isNotEmpty(jsonTran)) { |
|
|
if (ObjectUtil.isNotEmpty(jsonTran)) { |
|
|
oneMap.put("logisticscompany", jsonTran.getString("cust_name")); |
|
|
oneMap.put("logisticscompany", jsonTran.getCust_name()); |
|
|
} |
|
|
} |
|
|
oneMap.put("drivername", jsonMst.getString("drivername")); // 司机
|
|
|
oneMap.put("drivername", jsonMst.getString("drivername")); // 司机
|
|
|
oneMap.put("carno", jsonMst.getString("carno")); // 车牌号
|
|
|
oneMap.put("carno", jsonMst.getString("carno")); // 车牌号
|
|
@ -6076,9 +6081,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService { |
|
|
oneMap.put("receiptaddress", receiptaddress); // 收货地址
|
|
|
oneMap.put("receiptaddress", receiptaddress); // 收货地址
|
|
|
oneMap.put("receiptphone", jsonMst.getString("receiptphone")); // 收货人联系电话
|
|
|
oneMap.put("receiptphone", jsonMst.getString("receiptphone")); // 收货人联系电话
|
|
|
// 物流公司
|
|
|
// 物流公司
|
|
|
JSONObject jsonTran = tranTab.query("cust_code = '" + jsonMst.getString("trans_code") + "'").uniqueResult(0); |
|
|
TransportationBase jsonTran = transportationBaseService.findByCode(jsonMst.getString("trans_code")); |
|
|
if (ObjectUtil.isNotEmpty(jsonTran)) { |
|
|
if (ObjectUtil.isNotEmpty(jsonTran)) { |
|
|
oneMap.put("logisticscompany", jsonTran.getString("cust_name")); |
|
|
oneMap.put("logisticscompany", jsonTran.getCust_name()); |
|
|
} |
|
|
} |
|
|
oneMap.put("drivername", jsonMst.getString("drivername")); // 司机
|
|
|
oneMap.put("drivername", jsonMst.getString("drivername")); // 司机
|
|
|
oneMap.put("carno", jsonMst.getString("carno")); // 车牌号
|
|
|
oneMap.put("carno", jsonMst.getString("carno")); // 车牌号
|
|
|