Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -95,8 +95,8 @@ public class StructivtController {
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void download(@RequestParam Map map, HttpServletResponse response ,String[] product_area) throws IOException {
|
||||
structivtService.download(map, response, product_area);
|
||||
public void download(@RequestParam Map map, HttpServletResponse response ,String[] product_area,String[] ivt_flag) throws IOException {
|
||||
structivtService.download(map, response, product_area,ivt_flag);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,5 +72,5 @@ public interface StructivtService {
|
||||
|
||||
JSONArray getUnits();
|
||||
|
||||
void download(Map map, HttpServletResponse response,String[] product_area) throws IOException;
|
||||
void download(Map map, HttpServletResponse response,String[] product_area,String[] ivt_flag) throws IOException;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class StructivtServiceImpl implements StructivtService {
|
||||
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id", in_stor_id);
|
||||
|
||||
|
||||
JSONObject jsonObject = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "a.instorage_time desc");
|
||||
JSONObject jsonObject = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "a.instorage_time desc,a.package_box_sn");
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ public class StructivtServiceImpl implements StructivtService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(Map whereJson, HttpServletResponse response,String[] product_area) throws IOException {
|
||||
public void download(Map whereJson, HttpServletResponse response,String[] product_area,String[] ivt_flag) throws IOException {
|
||||
String material = MapUtil.getStr(whereJson, "material");
|
||||
String struct = MapUtil.getStr(whereJson, "struct");
|
||||
String stor_id = MapUtil.getStr(whereJson, "stor_id");
|
||||
@@ -246,7 +246,14 @@ public class StructivtServiceImpl implements StructivtService {
|
||||
String in_stor_id = userStorService.getInStor();
|
||||
|
||||
if (ObjectUtil.isNotEmpty(in_stor_id)) map.put("in_stor_id", in_stor_id);
|
||||
if (ObjectUtil.isNotEmpty(rein_flag)) map.put("rein_flag", rein_flag);
|
||||
|
||||
if (ObjectUtil.isNotNull(ivt_flag)){
|
||||
StringJoiner joiner = new StringJoiner(",","(",")");
|
||||
for (String type : ivt_flag){
|
||||
joiner.add("'"+type+"'");
|
||||
}
|
||||
map.put("rein_flag",joiner.toString());
|
||||
}
|
||||
|
||||
JSONArray resultJSONArray = WQL.getWO("QST_STRUCTIVT001").addParamMap(map).process().getResultJSONArray(0);
|
||||
|
||||
|
||||
@@ -162,7 +162,6 @@
|
||||
ivt.frozen_qty > 0
|
||||
ENDOPTION
|
||||
) a
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
@@ -273,6 +272,10 @@
|
||||
OPTION 输入.areas <> ""
|
||||
LEFT(sub.container_name,2) IN 输入.areas
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.rein_flag <> ""
|
||||
IFNULL(sub.sub_type,'') in 输入.rein_flag
|
||||
ENDOPTION
|
||||
) a
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
@@ -285,12 +288,7 @@
|
||||
) b ON a.pcsn = b.pcsn
|
||||
WHERE
|
||||
1=1
|
||||
OPTION 输入.rein_flag = "1"
|
||||
b.bill_type = '0002'
|
||||
ENDOPTION
|
||||
OPTION 输入.rein_flag = "0"
|
||||
b.bill_type <> '0002'
|
||||
ENDOPTION
|
||||
order by a.instorage_time desc,a.package_box_sn
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -45,16 +45,20 @@ public class LmsToBigScreenServiceImpl implements LmsToBigScreenService {
|
||||
|
||||
@Override
|
||||
public JSONArray getStructInfo(JSONObject jo) {
|
||||
JSONArray rows = WQLObject.getWQLObject("st_ivt_structattr").query("sect_code = 'ZC01'").getResultJSONArray(0);
|
||||
JSONArray rows = WQLObject.getWQLObject("st_ivt_structattr").query("sect_code IN ('ZC01','KTP01','ZZ01','PD01')").getResultJSONArray(0);
|
||||
JSONArray data = new JSONArray();
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
JSONObject row = rows.getJSONObject(i);
|
||||
JSONObject json = new JSONObject();
|
||||
String struct_code = row.getString("struct_code");
|
||||
json.put("struct_code", struct_code);
|
||||
json.put("struct_status", "0");
|
||||
String storagevehicle_code = row.getString("storagevehicle_code");
|
||||
if (StrUtil.isNotEmpty(storagevehicle_code)) {
|
||||
json.put("storagevehicle_code", storagevehicle_code);
|
||||
if (storagevehicle_code.startsWith("KTP")){
|
||||
json.put("struct_status", "1");
|
||||
}
|
||||
String struct_id = row.getString("struct_id");
|
||||
JSONArray array = WQL
|
||||
.getWO("QST_STRUCTATTR")
|
||||
@@ -70,6 +74,7 @@ public class LmsToBigScreenServiceImpl implements LmsToBigScreenService {
|
||||
json.put("sale_order_name", object.getString("sale_order_name"));
|
||||
json.put("quanlity_in_box", object.getString("quanlity_in_box"));
|
||||
json.put("box_weight", object.getString("box_weight"));
|
||||
json.put("struct_status", "2");
|
||||
JSONArray detail = new JSONArray();
|
||||
for (int j = 0; j < array.size(); j++) {
|
||||
JSONObject dtl = array.getJSONObject(j);
|
||||
|
||||
@@ -4242,12 +4242,12 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
subTab.update(jsonSub);
|
||||
|
||||
//插入包装关系出入库记录表
|
||||
jsonSub.put("bill_code",jo_mst.getString("bill_code"));
|
||||
jsonSub.put("bill_id",jo_mst.getString("iostorinv_id"));
|
||||
jsonSub.put("bill_type",jo_mst.getString("bill_type"));
|
||||
jsonSub.put("io_type","1");
|
||||
jsonSub.put("insert_time",DateUtil.now());
|
||||
jsonSub.put("record_id",IdUtil.getSnowflake(1, 1).nextId());
|
||||
jsonSub.put("bill_code", jo_mst.getString("bill_code"));
|
||||
jsonSub.put("bill_id", jo_mst.getString("iostorinv_id"));
|
||||
jsonSub.put("bill_type", jo_mst.getString("bill_type"));
|
||||
jsonSub.put("io_type", "1");
|
||||
jsonSub.put("insert_time", DateUtil.now());
|
||||
jsonSub.put("record_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
sub_record.insert(jsonSub);
|
||||
|
||||
// 更新分配明细执行状态为 - 99
|
||||
@@ -4369,9 +4369,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
for (int i = 0; i < dis_rows.size(); i++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(i);
|
||||
String sect_code = dis_row.getString("sect_code");
|
||||
JSONObject sect_jo = WQLObject.getWQLObject("st_ivt_sectattr").query("sect_code = '" + sect_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(sect_jo)) {
|
||||
throw new BadRequestException("未查询到对应的库区!");
|
||||
}
|
||||
//如果是虚拟区的出库,直接把包装关系删除;如果为立库的包装关系,将解绑删除标识置为1。当发货区解绑时,删除包装关系
|
||||
String pcsn = dis_row.getString("pcsn");
|
||||
if (sect_code.equals("XN01")) {
|
||||
if (sect_jo.getString("sect_type_attr").equals("09")) {
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete("container_name = '" + pcsn + "'");
|
||||
} else {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -4698,7 +4702,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
if (ObjectUtil.isEmpty(mst_jo)) {
|
||||
throw new BadRequestException("未查询到对应的出库单据!");
|
||||
} else {
|
||||
if (mst_jo.getString("bill_type").equals("1003") || mst_jo.getString("bill_type").equals("1006")){
|
||||
if (mst_jo.getString("bill_type").equals("1003") || mst_jo.getString("bill_type").equals("1006")) {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("need_delete", "1");
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(map, "package_box_sn = '" + task.getString("vehicle_code") + "'");
|
||||
@@ -5105,7 +5109,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
workBook.fill(new FillWrapper("data", flData), sheet);
|
||||
workBook.finish();
|
||||
} else {
|
||||
|
||||
|
||||
double div = NumberUtil.div(dtlArr.size(), shd_dtl_num);
|
||||
double ceil = Math.ceil(div);
|
||||
Integer integer = Integer.valueOf(String.valueOf(NumberUtil.round(ceil, 0)));
|
||||
|
||||
@@ -182,6 +182,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 返检出库:回传mes
|
||||
if (StrUtil.equals(bill_type, "1006")) {
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
//查询对应的包装关系有没有删除没有删除,进行提示
|
||||
JSONArray box_size = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + json.getString("box_no") + "'").getResultJSONArray(0);
|
||||
if (box_size.size() > 0) {
|
||||
throw new BadRequestException("木箱:" + json.getString("box_no") + "对应的包装关系未删除!");
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
@@ -287,6 +295,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 改切出库:回传mes
|
||||
if (StrUtil.equals(bill_type, "1003")) {
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
//查询对应的包装关系有没有删除没有删除,进行提示
|
||||
JSONArray box_size = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + json.getString("box_no") + "'").getResultJSONArray(0);
|
||||
if (box_size.size() > 0) {
|
||||
throw new BadRequestException("木箱:" + json.getString("box_no") + "对应的包装关系未删除!");
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
@@ -1319,6 +1335,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 改切出库:回传mes
|
||||
if (StrUtil.equals(bill_type, "1003")) {
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
//查询对应的包装关系有没有删除没有删除,进行提示
|
||||
JSONArray box_size = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + json.getString("box_no") + "'").getResultJSONArray(0);
|
||||
if (box_size.size() > 0) {
|
||||
throw new BadRequestException("木箱:" + json.getString("box_no") + "对应的包装关系未删除!");
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
@@ -1346,6 +1370,14 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
// 返检出库:回传mes
|
||||
if (StrUtil.equals(bill_type, "1006")) {
|
||||
JSONArray disArr = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("flag", "2").addParam("iostorinv_id", jo_mst.getString("iostorinv_id")).process().getResultJSONArray(0);
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject json = disArr.getJSONObject(j);
|
||||
//查询对应的包装关系有没有删除没有删除,进行提示
|
||||
JSONArray box_size = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + json.getString("box_no") + "'").getResultJSONArray(0);
|
||||
if (box_size.size() > 0) {
|
||||
throw new BadRequestException("木箱:" + json.getString("box_no") + "对应的包装关系未删除!");
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < disArr.size(); j++) {
|
||||
JSONObject param = new JSONObject();
|
||||
JSONArray details = new JSONArray();
|
||||
|
||||
@@ -684,8 +684,8 @@
|
||||
OPTION 输入.bill_type = "0001"
|
||||
b.bill_type = '0007'
|
||||
ENDOPTION
|
||||
OPTION 输入.bill_type = "0001"
|
||||
(b.bill_type = '0001' OR b.bill_type = '0007')
|
||||
OPTION 输入.bill_type <> "0001"
|
||||
b.bill_type = '-1'
|
||||
ENDOPTION
|
||||
OPTION 输入.pcsn <> ""
|
||||
a.pcsn = 输入.pcsn
|
||||
|
||||
Reference in New Issue
Block a user