opt:代码优化
This commit is contained in:
@@ -104,13 +104,13 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
.eq("task_type", "010702")
|
||||
.eq("is_delete", "0")
|
||||
.lt("task_status", TaskStatusEnum.FINISHED.getCode()));
|
||||
if (count>0){
|
||||
throw new BadRequestException("当前木箱入库任务已存在"+ boxNo);
|
||||
if (count > 0) {
|
||||
throw new BadRequestException("当前木箱入库任务已存在" + boxNo);
|
||||
}
|
||||
//查询仓库是否存在相同木箱
|
||||
JSONArray stIvtStructattr = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + boxNo + "'").getResultJSONArray(0);
|
||||
if (stIvtStructattr!=null && stIvtStructattr.size()>0){
|
||||
throw new BadRequestException("当前木箱已经存在库中"+stIvtStructattr.getJSONObject(0).getString("struct_code"));
|
||||
if (stIvtStructattr != null && stIvtStructattr.size() > 0) {
|
||||
throw new BadRequestException("当前木箱已经存在库中" + stIvtStructattr.getJSONObject(0).getString("struct_code"));
|
||||
}
|
||||
// 查询木箱信息
|
||||
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||
@@ -201,10 +201,10 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
throw new BadRequestException("扫描的木箱个数和选择的木箱层数不一致!");
|
||||
}
|
||||
Set<String> collect = Arrays.stream(split).collect(Collectors.toSet());
|
||||
if (collect.size()!=split.length){
|
||||
if (collect.size() != split.length) {
|
||||
throw new BadRequestException("扫描的木箱条码不能相同");
|
||||
}
|
||||
if (split.length>3){
|
||||
if (split.length > 3) {
|
||||
throw new BadRequestException("堆叠木箱最大不能超过3层");
|
||||
}
|
||||
// 校验是否有相同木箱号
|
||||
@@ -218,8 +218,8 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
//查询仓库是否存在相同木箱
|
||||
for (String boxSn : split) {
|
||||
JSONArray stIvtStructattr = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + boxSn + "'").getResultJSONArray(0);
|
||||
if (stIvtStructattr!=null && stIvtStructattr.size()>0){
|
||||
throw new BadRequestException("当前木箱已经存在库中"+stIvtStructattr.getJSONObject(0).getString("struct_code"));
|
||||
if (stIvtStructattr != null && stIvtStructattr.size() > 0) {
|
||||
throw new BadRequestException("当前木箱已经存在库中" + stIvtStructattr.getJSONObject(0).getString("struct_code"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,13 +349,13 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
// 手工入库
|
||||
if (whereJson.getString("bill_type").equals(IOSEnum.IN_TYPE.code("手工入库"))) {
|
||||
if (!ifFirst) {
|
||||
throw new BadRequestException("此木箱【"+whereJson.getString("box_no")+"】未入过库,请选择【生产入库】!");
|
||||
throw new BadRequestException("此木箱【" + whereJson.getString("box_no") + "】未入过库,请选择【生产入库】!");
|
||||
}
|
||||
}
|
||||
|
||||
if (whereJson.getString("bill_type").equals(IOSEnum.IN_TYPE.code("生产入库"))) {
|
||||
if (ifFirst) {
|
||||
throw new BadRequestException("此木箱【"+whereJson.getString("box_no")+"】已入过库,请选择【手工入库】!");
|
||||
throw new BadRequestException("此木箱【" + whereJson.getString("box_no") + "】已入过库,请选择【手工入库】!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -368,15 +368,15 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("pcsn", "");
|
||||
WQLObject.getWQLObject("md_pb_storagevehicleext")
|
||||
.update(param,"pcsn = '"+whereJson.getString("box_no")+"'");
|
||||
.update(param, "pcsn = '" + whereJson.getString("box_no") + "'");
|
||||
}
|
||||
|
||||
// 更新子卷包装关系创建人
|
||||
JSONObject param2 = new JSONObject();
|
||||
param2.put("create_id",SecurityUtils.getCurrentUserId());
|
||||
param2.put("create_name",SecurityUtils.getCurrentNickName());
|
||||
param2.put("create_id", SecurityUtils.getCurrentUserId());
|
||||
param2.put("create_name", SecurityUtils.getCurrentNickName());
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation")
|
||||
.update(param2,"package_box_sn = '"+whereJson.getString("box_no")+"'");
|
||||
.update(param2, "package_box_sn = '" + whereJson.getString("box_no") + "'");
|
||||
|
||||
/*
|
||||
* 查询mes木箱信息,插入木箱信息表
|
||||
@@ -423,6 +423,12 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
param.put("height", boxDao.getBox_high());
|
||||
param.put("containerType", boxDao.getVehicle_type());
|
||||
String type = whereJson.getString("bill_type");
|
||||
if (StrUtil.isEmpty(type)) {
|
||||
throw new BadRequestException("入库类型不能为空!");
|
||||
}
|
||||
if (type.length() < 4) {
|
||||
throw new BadRequestException("入库类型字段长度不能少于4!");
|
||||
}
|
||||
param.put("barcode", whereJson.getString("box_no") + "-" + type.substring(3, 4));
|
||||
|
||||
//根据木箱高度,判断入库仓位的高度
|
||||
|
||||
@@ -16,6 +16,7 @@ package org.nl.modules.common.utils;/*
|
||||
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.poi.excel.BigExcelWriter;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
@@ -203,26 +204,34 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
|
||||
* 导出excel
|
||||
*/
|
||||
public static void downloadExcel(List<Map<String, Object>> list, HttpServletResponse response) throws IOException {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
File file = new File(tempPath);
|
||||
BigExcelWriter writer = ExcelUtil.getBigWriter(file);
|
||||
// 一次性写出内容,使用默认样式,强制输出标题
|
||||
writer.write(list, true);
|
||||
SXSSFSheet sheet = (SXSSFSheet)writer.getSheet();
|
||||
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
|
||||
sheet.trackAllColumnsForAutoSizing();
|
||||
//列宽自适应
|
||||
writer.autoSizeColumnAll();
|
||||
//response为HttpServletResponse对象
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
//test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
|
||||
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
// 终止后删除临时文件
|
||||
file.deleteOnExit();
|
||||
writer.flush(out, true);
|
||||
//此处记得关闭输出Servlet流
|
||||
IoUtil.close(out);
|
||||
ServletOutputStream out = null;
|
||||
BigExcelWriter writer;
|
||||
try {
|
||||
String tempPath = SYS_TEM_DIR + IdUtil.fastSimpleUUID() + ".xlsx";
|
||||
File file = new File(tempPath);
|
||||
writer = ExcelUtil.getBigWriter(file);
|
||||
// 一次性写出内容,使用默认样式,强制输出标题
|
||||
writer.write(list, true);
|
||||
SXSSFSheet sheet = (SXSSFSheet) writer.getSheet();
|
||||
//上面需要强转SXSSFSheet 不然没有trackAllColumnsForAutoSizing方法
|
||||
sheet.trackAllColumnsForAutoSizing();
|
||||
//列宽自适应
|
||||
writer.autoSizeColumnAll();
|
||||
//response为HttpServletResponse对象
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8");
|
||||
//test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
|
||||
response.setHeader("Content-Disposition", "attachment;filename=file.xlsx");
|
||||
out = response.getOutputStream();
|
||||
// 终止后删除临时文件
|
||||
file.deleteOnExit();
|
||||
writer.flush(out, true);
|
||||
} finally {
|
||||
//此处记得关闭输出Servlet流
|
||||
if (ObjectUtil.isNotEmpty(out)) {
|
||||
IoUtil.close(out);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String getFileType(String type) {
|
||||
|
||||
@@ -67,6 +67,9 @@ public class FaultDeviceServiceImpl implements FaultDeviceService {
|
||||
JSONObject param = new JSONObject();
|
||||
if (ObjectUtil.isNotEmpty(device_code)) {
|
||||
JSONObject device_jo = WQLObject.getWQLObject("EM_BI_MonitorDevice").query("device_code = '" + device_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(device_jo)){
|
||||
throw new BadRequestException("未查询到设备号为["+device_code+"]的设备信息!");
|
||||
}
|
||||
param.put("device_code", device_code);
|
||||
param.put("product_area", device_jo.getString("product_area"));
|
||||
} else {
|
||||
|
||||
@@ -186,8 +186,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
if (tryLock) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task")
|
||||
.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(taskObj)){
|
||||
throw new BadRequestException("未找到任务标识为:" + task_id + "的任务!");
|
||||
}
|
||||
// 任务处理类
|
||||
String processing_class = taskObj.getString("handle_class");
|
||||
if (StrUtil.isEmpty(processing_class)) {
|
||||
throw new BadRequestException("当前任务的处理类未找到!");
|
||||
}
|
||||
//1:执行中,2:完成 ,3:acs取消
|
||||
String acs_task_status = row.getString("task_status");
|
||||
String car_no = row.getString("car_no");
|
||||
@@ -2109,7 +2115,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||
// 6-退货入库
|
||||
String materialBarcode = whereJson.getString("material_barcode");
|
||||
if(StrUtil.isEmpty(materialBarcode)){
|
||||
throw new BadRequestException("当前木箱号不能为空!");
|
||||
}
|
||||
String[] box_arr = materialBarcode.split("-");
|
||||
if (box_arr.length < 2) {
|
||||
// 处理分割结果不足的情况
|
||||
throw new BadRequestException("当前木箱号数据异常!"+box_arr.toString());
|
||||
}
|
||||
//获取当前的入库类型
|
||||
whereJson.put("bill_type", "000" + box_arr[1]);
|
||||
whereJson.put("box_no", box_arr[0]);
|
||||
|
||||
@@ -5,12 +5,10 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.RedisUtils;
|
||||
@@ -18,7 +16,6 @@ import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl;
|
||||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
@@ -256,7 +253,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
if (product_area.equals("B2")) {
|
||||
map.put("flag", "3");
|
||||
map.put("flag", "302");
|
||||
}
|
||||
map.put("reging_id", reging_id);
|
||||
map.put("point_location", point_location);
|
||||
@@ -521,7 +518,11 @@ public class BakingServiceImpl implements BakingService {
|
||||
hotParam.put("task_id", task_id);
|
||||
hotParam.put("start_point_code", point_code1);
|
||||
hotParam.put("end_point_code", point_code2);
|
||||
String point_temperature = (String) redisUtils.hget(point_code1, "temperature");
|
||||
Object pt = redisUtils.hget(point_code1, "temperature");
|
||||
if (ObjectUtil.isEmpty(pt)) {
|
||||
throw new BadRequestException("当前操作点位设备:"+point_code1+",无法获取温度,请稍后再试!");
|
||||
}
|
||||
String point_temperature = String.valueOf(pt);
|
||||
hotParam.put("temperature", point_temperature);
|
||||
if (ObjectUtil.isEmpty(last_hot_mst)) {
|
||||
hotParam.put("oven_time", "480");
|
||||
@@ -757,7 +758,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
rows.add(jo);
|
||||
new WmsToAcsServiceImpl().action(rows);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "操作成功!");
|
||||
result.put("message", "烘箱三色灯报警已关闭,请联系烘箱设备维护人员处理烘箱报警问题!!");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,9 @@ public class VirtualOutServiceImpl implements VirtualOutService {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(whereJson.getString("box_no"))) {
|
||||
JSONObject jsonSub = WQL.getWO("PDA_VIRTUALOUT").addParam("flag", "4").addParam("box_no", whereJson.getString("box_no")).process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonSub)){
|
||||
throw new BadRequestException("未查询到设木箱号为["+whereJson.getString("box_no")+"]的子卷包装关系信息!");
|
||||
}
|
||||
|
||||
jo.put("net_weight_num", ObjectUtil.isNotEmpty(jsonSub) ? NumberUtil.round(jsonSub.getString("net_weight_num"), 3) : "0");
|
||||
} else {
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface RegionService {
|
||||
* @param whereJson 条件参数
|
||||
* @return List<RegionDto>
|
||||
*/
|
||||
List<RegionDto> queryAll(Map whereJson);
|
||||
List<RegionDto> queryAll(String whereJson);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
|
||||
@@ -50,9 +50,9 @@ public class RegionServiceImpl implements RegionService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RegionDto> queryAll(Map whereJson) {
|
||||
public List<RegionDto> queryAll(String whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("sch_base_region");
|
||||
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||
JSONArray arr = wo.query(whereJson).getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(arr)) {
|
||||
return arr.toJavaList(RegionDto.class);
|
||||
}
|
||||
|
||||
@@ -123,12 +123,11 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
|
||||
if (StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||
// 更改任务状态为完成
|
||||
HashMap<Object, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||
hashMap.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
hashMap.put("update_optname", SecurityUtils.getCurrentUsername());
|
||||
hashMap.put("update_time", DateUtil.now());
|
||||
taskTab.update(hashMap,"task_id = '" + task_id + "'");
|
||||
jsonTask.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||
jsonTask.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
jsonTask.put("update_optname", SecurityUtils.getCurrentUsername());
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
String point_code1 = jsonTask.getString("point_code1");
|
||||
String point_code2 = jsonTask.getString("point_code2");
|
||||
@@ -136,7 +135,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
String point_code4 = jsonTask.getString("point_code4");
|
||||
|
||||
JSONObject jsonRaw = rawTab.query("container_name ='" + jsonTask.getString("material_code") + "' AND status <> '09' AND is_delete = '0'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(jsonRaw)) {
|
||||
throw new BadRequestException("未找到满足条件的生箔工单:" + jsonTask.getString("material_code"));
|
||||
}
|
||||
// 判断是两个点位的任务还是四个点位的任务
|
||||
if (ObjectUtil.isEmpty(point_code3)) {
|
||||
// 判断是取满 or 取空 :取满起点是生箔区域、取空起点是冷却区域
|
||||
@@ -231,8 +232,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
jsonIvt2.put("point_status", "2");
|
||||
jsonIvt2.put("material_code", jsonTask.getString("material_code"));
|
||||
point_tab.update(jsonIvt2);
|
||||
}
|
||||
else if (jsonTask.getString("task_type").equals("010106")) {
|
||||
} else if (jsonTask.getString("task_type").equals("010106")) {
|
||||
BakingServiceImpl bean = SpringContextHolder.getBean(BakingServiceImpl.class);
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase"); // 物料表
|
||||
JSONObject requestParam = jsonTask.getJSONObject("request_param");
|
||||
@@ -299,8 +299,8 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
} else {
|
||||
// 校验终点是否存在
|
||||
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||
throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||
if (ObjectUtil.isEmpty(jsonIvt2)) {
|
||||
throw new BadRequestException("终点未找到可用点位:" + jsonIvt2);
|
||||
}
|
||||
|
||||
// 更新工单状态为完成
|
||||
@@ -324,6 +324,37 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
cache_param.put("cool_ivt_status", "01");
|
||||
ivtTab.update(cache_param, "full_point_code ='" + point_code4 + "'");
|
||||
|
||||
/*// 插入入库单
|
||||
JSONObject jsonMater = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonMater)) {
|
||||
throw new BadRequestException("产品不存在");
|
||||
}
|
||||
|
||||
JSONObject jsonRegion = new JSONObject();
|
||||
jsonRegion.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
jsonRegion.put("bill_code", CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
|
||||
jsonRegion.put("io_type", "0");
|
||||
jsonRegion.put("material_id", jsonMater.getString("material_id"));
|
||||
jsonRegion.put("pcsn", jsonRaw.getString("container_name"));
|
||||
jsonRegion.put("vehicle_code", "");
|
||||
jsonRegion.put("qty", jsonRaw.getString("productin_qty"));
|
||||
jsonRegion.put("qty_unit_id", jsonMater.get("base_unit_id"));
|
||||
jsonRegion.put("bill_status", "50");
|
||||
jsonRegion.put("start_point_code", point_code2);
|
||||
jsonRegion.put("end_point_code", point_code4);
|
||||
jsonRegion.put("cust_id", "");
|
||||
jsonRegion.put("create_mode", "03");
|
||||
jsonRegion.put("task_id", task_id);
|
||||
jsonRegion.put("create_id", currentUserId);
|
||||
jsonRegion.put("create_name", currentUsername);
|
||||
jsonRegion.put("create_time", DateUtil.now());
|
||||
jsonRegion.put("update_optid", currentUserId);
|
||||
jsonRegion.put("update_optname", currentUsername);
|
||||
jsonRegion.put("update_time", DateUtil.now());
|
||||
jsonRegion.put("confirm_optid", currentUserId);
|
||||
jsonRegion.put("confirm_optname", currentUsername);
|
||||
jsonRegion.put("confirm_time", DateUtil.now());
|
||||
coolTab.insert(jsonRegion);*/
|
||||
}
|
||||
|
||||
}
|
||||
@@ -341,6 +372,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createTask(JSONObject form) {
|
||||
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
|
||||
@@ -59,6 +59,7 @@ public class InchargeServiceImpl implements InchargeService {
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(sap_pcsn)) {
|
||||
map.put("sap_pcsn", "%" + sap_pcsn + "%");
|
||||
map.put("flag", "11");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(pcsn)) {
|
||||
map.put("pcsn", "%" + pcsn + "%");
|
||||
|
||||
@@ -96,6 +96,10 @@ public class OutChargeServiceImpl implements OutChargeService {
|
||||
map.put("end_time", end_time);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(map.get("sap_pcsn"))) {
|
||||
map.put("flag", "151");
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ios.iostorinv_id DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
@Override
|
||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("flag", "30");
|
||||
map.put("buss_type", (String) whereJson.get("buss_type"));
|
||||
map.put("stor_id", (String) whereJson.get("stor_id"));
|
||||
map.put("bill_type", (String) whereJson.get("bill_type"));
|
||||
@@ -172,6 +172,10 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
map.put("in_stor_id", in_stor_id);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(map.get("sap_pcsn_in"))) {
|
||||
map.put("flag", "29");
|
||||
}
|
||||
|
||||
JSONObject jo = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "iostorinv_id desc");
|
||||
return jo;
|
||||
}
|
||||
@@ -1873,7 +1877,7 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("flag", "199");
|
||||
map.put("buss_type", (String) whereJson.get("buss_type"));
|
||||
map.put("stor_id", (String) whereJson.get("stor_id"));
|
||||
map.put("bill_type", (String) whereJson.get("bill_type"));
|
||||
@@ -1969,7 +1973,6 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
if (ObjectUtil.isNotEmpty(in_stor_id)) {
|
||||
map.put("in_stor_id", in_stor_id);
|
||||
}
|
||||
|
||||
JSONArray resultJSONArray = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(map).process().getResultJSONArray(0);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (int i = 0; i < resultJSONArray.size(); i++) {
|
||||
|
||||
@@ -49,12 +49,77 @@
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
ios.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinv_id = ios.iostorinv_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dis.iostorinv_id
|
||||
) b ON b.iostorinv_id = ios.iostorinv_id
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND ios.io_type = '0'
|
||||
AND ios.bill_status = '99'
|
||||
AND ios.is_writeoff = '0'
|
||||
AND ios.bill_type = '0002'
|
||||
and ios.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON ( sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn )
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dis.iostorinv_id
|
||||
) b ON b.iostorinv_id = ios.iostorinv_id
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND ios.io_type = '0'
|
||||
@@ -62,39 +127,25 @@
|
||||
AND ios.is_writeoff = '0'
|
||||
AND ios.bill_type = '0002'
|
||||
and ios.stor_id in 输入.in_stor_id
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
输入.row_num TYPEAS s_string
|
||||
输入.block_num TYPEAS s_string
|
||||
输入.placement_type TYPEAS s_string
|
||||
输入.limits TYPEAS s_string
|
||||
输入.sql_str TYPEAS f_string
|
||||
输入.in_stor_id TYPEAS f_string
|
||||
输入.in_layer_num TYPEAS f_string
|
||||
@@ -72,7 +73,7 @@
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
ios.*,
|
||||
IFNULL(dtl.vbeln,'') as vbeln
|
||||
FROM
|
||||
@@ -145,6 +146,282 @@
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "199"
|
||||
QUERY
|
||||
SELECT
|
||||
ios.*,
|
||||
IFNULL(dtl.vbeln,'') as vbeln
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN st_ivt_iostorinvdtl dtl ON ios.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dtl.iostorinvdtl_id = dis.iostorinvdtl_id
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.container_name = dis.pcsn AND ios.bill_code = sub.bill_code
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND
|
||||
ios.io_type = '0'
|
||||
AND ios.stor_id in 输入.in_stor_id
|
||||
|
||||
OPTION 输入.box_no <> ""
|
||||
dis.box_no like 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_no_in <> ""
|
||||
dis.box_no IN 输入.box_no_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.vbeln <> ""
|
||||
dtl.vbeln like 输入.vbeln
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.vbeln_in <> ""
|
||||
dtl.vbeln IN 输入.vbeln_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn_in <> ""
|
||||
sub.sap_pcsn IN 输入.sap_pcsn_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn_in <> ""
|
||||
dis.pcsn IN 输入.pcsn_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
limit 0,10000
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "29"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios2.*,
|
||||
IFNULL(dtl2.vbeln,'') as vbeln
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ios.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND ios.io_type = '0'
|
||||
AND ios.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios2
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.container_name = dis.pcsn
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.box_no <> ""
|
||||
dis.box_no like 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_no_in <> ""
|
||||
dis.box_no IN 输入.box_no_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn_in <> ""
|
||||
dis.pcsn IN 输入.pcsn_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn_in <> ""
|
||||
sub.sap_pcsn IN 输入.sap_pcsn_in
|
||||
ENDOPTION
|
||||
GROUP BY dis.iostorinv_id
|
||||
) dis2 ON dis2.iostorinv_id = ios2.iostorinv_id
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dtl.iostorinv_id,
|
||||
MAX( vbeln ) AS vbeln
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.vbeln <> ""
|
||||
dtl.vbeln like 输入.vbeln
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.vbeln_in <> ""
|
||||
dtl.vbeln IN 输入.vbeln_in
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dtl.iostorinv_id
|
||||
) dtl2 ON ios2.iostorinv_id = dtl2.iostorinv_id
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "30"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios2.*,
|
||||
IFNULL(dtl2.vbeln,'') as vbeln
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ios.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND ios.io_type = '0'
|
||||
AND ios.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios2
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.box_no <> ""
|
||||
dis.box_no like 输入.box_no
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.box_no_in <> ""
|
||||
dis.box_no IN 输入.box_no_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.pcsn_in <> ""
|
||||
dis.pcsn IN 输入.pcsn_in
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.sap_pcsn_in <> ""
|
||||
sub.sap_pcsn IN 输入.sap_pcsn_in
|
||||
ENDOPTION
|
||||
GROUP BY dis.iostorinv_id
|
||||
) dis2 ON dis2.iostorinv_id = ios2.iostorinv_id
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dtl.iostorinv_id,
|
||||
MAX( vbeln ) AS vbeln
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.vbeln <> ""
|
||||
dtl.vbeln like 输入.vbeln
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.vbeln_in <> ""
|
||||
dtl.vbeln IN 输入.vbeln_in
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dtl.iostorinv_id
|
||||
) dtl2 ON ios2.iostorinv_id = dtl2.iostorinv_id
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
@@ -715,52 +992,128 @@
|
||||
|
||||
IF 输入.flag = "15"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
ios.*
|
||||
SELECT
|
||||
ios2.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinv_id = ios.iostorinv_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND
|
||||
ios.io_type = '1'
|
||||
AND
|
||||
ios.is_writeoff = '0'
|
||||
AND
|
||||
ios.bill_status = '99'
|
||||
AND
|
||||
ios.bill_type in ('1001','1009')
|
||||
AND
|
||||
ios.stor_id in 输入.in_stor_id
|
||||
(
|
||||
SELECT
|
||||
ios.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND
|
||||
ios.io_type = '1'
|
||||
AND
|
||||
ios.is_writeoff = '0'
|
||||
AND
|
||||
ios.bill_status = '99'
|
||||
AND
|
||||
ios.bill_type in ('1001','1009')
|
||||
AND
|
||||
ios.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios2
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
GROUP BY dis.iostorinv_id
|
||||
) dis2 ON dis2.iostorinv_id = ios2.iostorinv_id
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "151"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios2.*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
ios.*
|
||||
FROM
|
||||
ST_IVT_IOStorInv ios
|
||||
WHERE
|
||||
ios.is_delete = '0'
|
||||
AND
|
||||
ios.io_type = '1'
|
||||
AND
|
||||
ios.is_writeoff = '0'
|
||||
AND
|
||||
ios.bill_status = '99'
|
||||
AND
|
||||
ios.bill_type in ('1001','1009')
|
||||
AND
|
||||
ios.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.bill_code <> ""
|
||||
ios.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.stor_id <> ""
|
||||
ios.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_type <> ""
|
||||
ios.bill_type = 输入.bill_type
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
ios.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_status <> ""
|
||||
ios.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
ios.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
ios.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios2
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
GROUP BY dis.iostorinv_id
|
||||
) dis2 ON dis2.iostorinv_id = ios2.iostorinv_id
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
|
||||
@@ -64,23 +64,31 @@
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
cg.changeinv_id AS id,
|
||||
cg.*
|
||||
cg.*
|
||||
FROM
|
||||
st_ivt_structivtchange cg
|
||||
LEFT JOIN st_ivt_structivtchangedtl dtl ON cg.changeinv_id = dtl.changeinv_id
|
||||
inner JOIN (
|
||||
SELECT
|
||||
dtl.changeinv_id
|
||||
FROM
|
||||
st_ivt_structivtchangedtl dtl
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dtl.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dtl.changeinv_id
|
||||
) b ON cg.changeinv_id = b.changeinv_id
|
||||
WHERE
|
||||
1 = 1
|
||||
1 = 1
|
||||
AND cg.is_delete = '0'
|
||||
and cg.stor_id in 输入.in_stor_id
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
cg.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn <> ""
|
||||
dtl.pcsn = 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.buss_type <> ""
|
||||
cg.buss_type like 输入.buss_type
|
||||
ENDOPTION
|
||||
@@ -109,42 +117,58 @@
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT DISTINCT
|
||||
dtl.mfg_order_name AS new_sale_order_name,
|
||||
dtl.customer_name AS new_customer_name,
|
||||
dtl.customer_description AS new_customer_description,
|
||||
dtl.package_box_sn AS storagevehicle_code,
|
||||
sa.sect_name AS turnout_sect_name,
|
||||
sa.struct_code AS turnout_struct_code,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
dtl.seq_no,
|
||||
sub.sale_order_name,
|
||||
sub.customer_name,
|
||||
sub.customer_description,
|
||||
sub.net_weight AS qty,
|
||||
dtl.demand_date,
|
||||
dtl.UpdatedDateOfProduction AS date_of_FG_inbound,
|
||||
dtl.isRePrintPackageBoxLabel,
|
||||
dtl.isUnPackBox,
|
||||
dtl.pcsn
|
||||
FROM
|
||||
st_ivt_structivtchangedtl dtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
LEFT JOIN st_ivt_structattr sa ON sa.storagevehicle_code = dtl.package_box_sn
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_sn = dtl.package_box_sn AND sub.container_name = dtl.pcsn
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.changeinv_id <> ""
|
||||
dtl.changeinv_id = 输入.changeinv_id
|
||||
ENDOPTION
|
||||
OPTION 输入.changeinvdtl_id <> ""
|
||||
dtl.changeinvdtl_id = 输入.changeinvdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.work_status <> ""
|
||||
dtl.work_status <= 输入.work_status
|
||||
ENDOPTION
|
||||
order by dtl.seq_no
|
||||
SELECT * from
|
||||
(
|
||||
select
|
||||
dtl.mfg_order_name AS new_sale_order_name,
|
||||
dtl.customer_name AS new_customer_name,
|
||||
dtl.customer_description AS new_customer_description,
|
||||
dtl.package_box_sn AS storagevehicle_code,
|
||||
dtl.demand_date,
|
||||
dtl.UpdatedDateOfProduction AS date_of_FG_inbound,
|
||||
dtl.isRePrintPackageBoxLabel,
|
||||
dtl.isUnPackBox,
|
||||
dtl.pcsn,
|
||||
dtl.seq_no,
|
||||
sa.sect_name AS turnout_sect_name,
|
||||
sa.struct_code AS turnout_struct_code,
|
||||
mb.material_code,
|
||||
mb.material_name
|
||||
FROM
|
||||
st_ivt_structivtchangedtl dtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
LEFT JOIN st_ivt_structattr sa ON sa.storagevehicle_code = dtl.package_box_sn
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.changeinv_id <> ""
|
||||
dtl.changeinv_id = 输入.changeinv_id
|
||||
ENDOPTION
|
||||
OPTION 输入.changeinvdtl_id <> ""
|
||||
dtl.changeinvdtl_id = 输入.changeinvdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.work_status <> ""
|
||||
dtl.work_status <= 输入.work_status
|
||||
ENDOPTION
|
||||
order by dtl.seq_no
|
||||
) dtl2
|
||||
LEFT JOIN (
|
||||
select
|
||||
sub.sale_order_name,
|
||||
sub.customer_name,
|
||||
sub.customer_description,
|
||||
sub.net_weight ,
|
||||
sub.package_box_sn,
|
||||
sub.container_name
|
||||
from
|
||||
pdm_bi_subpackagerelation sub
|
||||
group by
|
||||
sub.sale_order_name,
|
||||
sub.customer_name,
|
||||
sub.customer_description,
|
||||
sub.net_weight,
|
||||
sub.package_box_sn,
|
||||
sub.container_name
|
||||
) sub2 ON (sub2.package_box_sn = dtl2.storagevehicle_code AND sub2.container_name = dtl2.pcsn)
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -79,21 +79,22 @@
|
||||
move.*
|
||||
FROM
|
||||
ST_IVT_MoveInv move
|
||||
inner join (
|
||||
SELECT
|
||||
movedtl.moveinv_id
|
||||
FROM
|
||||
st_ivt_moveinvdtl movedtl
|
||||
INNER JOIN md_me_materialbase mb ON mb.material_id = movedtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.material_code <> ""
|
||||
(mb.material_code LIKE 输入.material_code OR mb.material_name LIKE 输入.material_code)
|
||||
ENDOPTION
|
||||
GROUP BY movedtl.moveinv_id
|
||||
) dtl2 on dtl2.moveinv_id = move.moveinv_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND move.is_delete = '0'
|
||||
AND move.moveinv_id IN (
|
||||
SELECT DISTINCT
|
||||
(movedtl.moveinv_id)
|
||||
FROM
|
||||
st_ivt_moveinvdtl movedtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = movedtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.material_code <> ""
|
||||
(mb.material_code LIKE 输入.material_code OR mb.material_name LIKE 输入.material_code)
|
||||
ENDOPTION
|
||||
)
|
||||
AND move.stor_id in 输入.in_stor_id
|
||||
|
||||
OPTION 输入.bill_code <> ""
|
||||
|
||||
@@ -400,7 +400,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String insertDtl(JSONObject map) {
|
||||
if(MapUtil.getStr(map,"bill_type").equals("1011")) {
|
||||
String iostorinv_id = inserdtlPic(map);
|
||||
String iostorinv_id = inserdtlPic(map);
|
||||
return iostorinv_id ;
|
||||
}
|
||||
|
||||
@@ -5686,7 +5686,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (jo_mst.getString("is_overdue").equals("1")) {
|
||||
dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' and is_overdue = '0' and box_no = '"+jsonSub.getString("package_box_sn")+"'").getResultJSONArray(0);
|
||||
} else {
|
||||
|
||||
|
||||
dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "' and box_no = '"+jsonSub.getString("package_box_sn")+"'").getResultJSONArray(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,121 +88,11 @@
|
||||
##########################################
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios.*,
|
||||
a.plan_qty,
|
||||
IFNULL(c.vbeln,'') as vbeln
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
mst.*,
|
||||
cu.shd_dtl_num,
|
||||
cu.cust_name,
|
||||
cu.cust_simple_name,
|
||||
attr.stor_name AS out_stor_name
|
||||
FROM
|
||||
st_ivt_iostorinv mst
|
||||
LEFT JOIN md_cs_customerbase cu ON mst.cust_code = cu.cust_code
|
||||
LEFT JOIN st_ivt_bsrealstorattr attr ON attr.stor_id = mst.out_stor_id
|
||||
WHERE
|
||||
mst.io_type = '1'
|
||||
and mst.is_delete='0'
|
||||
and mst.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.bill_code <> ""
|
||||
mst.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.cust_code <> ""
|
||||
(cu.cust_code like 输入.cust_code or
|
||||
cu.cust_simple_name like 输入.cust_code)
|
||||
ENDOPTION
|
||||
OPTION 输入.is_upload <> ""
|
||||
mst.is_upload = 输入.is_upload
|
||||
ENDOPTION
|
||||
OPTION 输入.billTypes <> ""
|
||||
mst.bill_type in 输入.billTypes
|
||||
ENDOPTION
|
||||
OPTION 输入.storIds <> ""
|
||||
mst.stor_id in 输入.storIds
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
mst.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.billStatuses <> ""
|
||||
mst.bill_status in 输入.billStatuses
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios
|
||||
LEFT JOIN (
|
||||
select
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
from
|
||||
st_ivt_iostorinvdtl dtl
|
||||
where 1=1
|
||||
OPTION 输入.vbeln <> ""
|
||||
dtl.vbeln like 输入.vbeln
|
||||
ENDOPTION
|
||||
OPTION 输入.vbeln_in <> ""
|
||||
dtl.vbeln IN 输入.vbeln_in
|
||||
ENDOPTION
|
||||
OPTION 输入.width <> ""
|
||||
dtl.width like 输入.width
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
) c ON ios.iostorinv_id = c.iostorinv_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn_in <> ""
|
||||
dis.pcsn IN 输入.pcsn_in
|
||||
ENDOPTION
|
||||
OPTION 输入.box_no <> ""
|
||||
dis.box_no like 输入.box_no
|
||||
ENDOPTION
|
||||
OPTION 输入.box_no_in <> ""
|
||||
dis.box_no IN 输入.box_no_in
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dis.iostorinv_id
|
||||
) b ON b.iostorinv_id = ios.iostorinv_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
SUM(a.plan_qty) AS plan_qty,
|
||||
a.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN ST_IVT_IOStorInv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '1'
|
||||
and b.is_delete='0'
|
||||
and b.is_overdue = '0'
|
||||
GROUP BY a.iostorinv_id
|
||||
) a ON a.iostorinv_id = ios.iostorinv_id
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios.*,
|
||||
a.plan_qty,
|
||||
IFNULL(c.vbeln,'') as vbeln
|
||||
IFNULL(c.vbeln,'') as vbeln
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@@ -248,7 +138,7 @@
|
||||
mst.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios
|
||||
LEFT JOIN (
|
||||
inner JOIN (
|
||||
select
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
@@ -268,12 +158,11 @@
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
) c ON ios.iostorinv_id = c.iostorinv_id
|
||||
LEFT JOIN (
|
||||
inner JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON (sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn AND dis.iostorinv_id = sub.bill_id)
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
@@ -288,12 +177,6 @@
|
||||
OPTION 输入.box_no_in <> ""
|
||||
dis.box_no IN 输入.box_no_in
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn_in <> ""
|
||||
sub.sap_pcsn IN 输入.sap_pcsn_in
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dis.iostorinv_id
|
||||
) b ON b.iostorinv_id = ios.iostorinv_id
|
||||
@@ -310,9 +193,126 @@
|
||||
and b.is_overdue = '0'
|
||||
GROUP BY a.iostorinv_id
|
||||
) a ON a.iostorinv_id = ios.iostorinv_id
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "11"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
ios.*,
|
||||
a.plan_qty,
|
||||
IFNULL(c.vbeln,'') as vbeln
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
mst.*,
|
||||
cu.shd_dtl_num,
|
||||
cu.cust_name,
|
||||
cu.cust_simple_name,
|
||||
attr.stor_name AS out_stor_name
|
||||
FROM
|
||||
st_ivt_iostorinv mst
|
||||
LEFT JOIN md_cs_customerbase cu ON mst.cust_code = cu.cust_code
|
||||
LEFT JOIN st_ivt_bsrealstorattr attr ON attr.stor_id = mst.out_stor_id
|
||||
WHERE
|
||||
mst.io_type = '1'
|
||||
and mst.is_delete='0'
|
||||
and mst.stor_id in 输入.in_stor_id
|
||||
OPTION 输入.bill_code <> ""
|
||||
mst.bill_code like 输入.bill_code
|
||||
ENDOPTION
|
||||
OPTION 输入.cust_code <> ""
|
||||
(cu.cust_code like 输入.cust_code or
|
||||
cu.cust_simple_name like 输入.cust_code)
|
||||
ENDOPTION
|
||||
OPTION 输入.is_upload <> ""
|
||||
mst.is_upload = 输入.is_upload
|
||||
ENDOPTION
|
||||
OPTION 输入.billTypes <> ""
|
||||
mst.bill_type in 输入.billTypes
|
||||
ENDOPTION
|
||||
OPTION 输入.storIds <> ""
|
||||
mst.stor_id in 输入.storIds
|
||||
ENDOPTION
|
||||
OPTION 输入.create_mode <> ""
|
||||
mst.create_mode = 输入.create_mode
|
||||
ENDOPTION
|
||||
OPTION 输入.billStatuses <> ""
|
||||
mst.bill_status in 输入.billStatuses
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.input_time >= 输入.begin_time
|
||||
ENDOPTION
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.input_time <= 输入.end_time
|
||||
ENDOPTION
|
||||
) ios
|
||||
inner JOIN (
|
||||
select
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
from
|
||||
st_ivt_iostorinvdtl dtl
|
||||
where 1=1
|
||||
OPTION 输入.vbeln <> ""
|
||||
dtl.vbeln like 输入.vbeln
|
||||
ENDOPTION
|
||||
OPTION 输入.vbeln_in <> ""
|
||||
dtl.vbeln IN 输入.vbeln_in
|
||||
ENDOPTION
|
||||
OPTION 输入.width <> ""
|
||||
dtl.width like 输入.width
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dtl.iostorinv_id,
|
||||
dtl.vbeln
|
||||
) c ON ios.iostorinv_id = c.iostorinv_id
|
||||
inner JOIN (
|
||||
SELECT
|
||||
dis.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON (sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn AND dis.iostorinv_id = sub.bill_id)
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn_in <> ""
|
||||
dis.pcsn IN 输入.pcsn_in
|
||||
ENDOPTION
|
||||
OPTION 输入.box_no <> ""
|
||||
dis.box_no like 输入.box_no
|
||||
ENDOPTION
|
||||
OPTION 输入.box_no_in <> ""
|
||||
dis.box_no IN 输入.box_no_in
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn <> ""
|
||||
sub.sap_pcsn like 输入.sap_pcsn
|
||||
ENDOPTION
|
||||
OPTION 输入.sap_pcsn_in <> ""
|
||||
sub.sap_pcsn IN 输入.sap_pcsn_in
|
||||
ENDOPTION
|
||||
GROUP BY
|
||||
dis.iostorinv_id
|
||||
) b ON b.iostorinv_id = ios.iostorinv_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
SUM(a.plan_qty) AS plan_qty,
|
||||
a.iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN ST_IVT_IOStorInv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '1'
|
||||
and b.is_delete='0'
|
||||
and b.is_overdue = '0'
|
||||
GROUP BY a.iostorinv_id
|
||||
) a ON a.iostorinv_id = ios.iostorinv_id
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "111"
|
||||
QUERY
|
||||
@@ -426,8 +426,7 @@
|
||||
ENDOPTION
|
||||
|
||||
GROUP BY sub.sale_order_name,spec,ios.iostorinv_id,dtl.iostorinvdtl_id
|
||||
|
||||
|
||||
limit 0,10000
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -693,8 +692,7 @@
|
||||
OPTION 输入.bill_status <> ""
|
||||
dis.work_status <= 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
order by dis.box_no,dis.pcsn
|
||||
order by dis.box_no,dis.pcsn limit 0,10000
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -200,8 +200,9 @@
|
||||
iostorinv_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON (sub.container_name = dis.pcsn AND dis.box_no = sub.package_box_sn AND dis.iostorinv_id = sub.bill_id)
|
||||
WHERE
|
||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON (sub.container_name = dis.pcsn
|
||||
AND dis.box_no = sub.package_box_sn AND dis.iostorinv_id = sub.bill_id)
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.pcsn <> ""
|
||||
dis.pcsn like 输入.pcsn
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
IF 输入.flag = "1"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
mst.stor_name,
|
||||
dis.sect_name,
|
||||
dis.struct_code,
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
IF 输入.flag = "2"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
MAX(mst.stor_name) AS stor_name,
|
||||
MAX(dis.sect_name) AS sect_name,
|
||||
MAX(dis.struct_code) AS struct_code,
|
||||
@@ -340,7 +340,7 @@
|
||||
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
mst.stor_name,
|
||||
dis.sect_name,
|
||||
dis.struct_code,
|
||||
@@ -501,7 +501,7 @@
|
||||
|
||||
IF 输入.flag = "4"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
MAX(mst.stor_name) AS stor_name,
|
||||
MAX(dis.sect_name) AS sect_name,
|
||||
MAX(dis.struct_code) AS struct_code,
|
||||
@@ -631,7 +631,7 @@
|
||||
|
||||
IF 输入.flag = "5"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
mst.stor_name,
|
||||
dis.sect_name,
|
||||
dis.struct_code,
|
||||
@@ -832,7 +832,7 @@
|
||||
|
||||
IF 输入.flag = "6"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
MAX(mst.stor_name) AS stor_name,
|
||||
MAX(dis.sect_name) AS sect_name,
|
||||
MAX(dis.struct_code) AS struct_code,
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
IF 输入.flag = "2"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
SELECT
|
||||
mst.stor_name,
|
||||
dis.sect_name,
|
||||
mst.bill_type,
|
||||
|
||||
Reference in New Issue
Block a user