代码更新

This commit is contained in:
lyd
2022-11-03 18:34:30 +08:00
parent 36226f36f3
commit d2a2c03f33
9 changed files with 108 additions and 106 deletions

View File

@@ -99,14 +99,14 @@ public class YqxCallMaterialTask extends AbstractAcsTask {
regionIoObj.put("create_time", DateUtil.now()); regionIoObj.put("create_time", DateUtil.now());
regionIoTab.insert(regionIoObj); regionIoTab.insert(regionIoObj);
//完成后将仓位库存删掉 //完成后
//仓位库存表【ST_IVT_StructIvt】 // 物料点位解锁 并设置空位
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt");
ivtTab.delete("point_code = '" + taskObj.getString("point_code1") + "'");
// 点位解锁 并设置空位
material_point.put("lock_type", "1"); material_point.put("lock_type", "1");
material_point.put("point_status", "1"); material_point.put("point_status", "1");
material_point.put("task_id", "");
material_point.put("material_id", "");
material_point.put("vehicle_type", "");
material_point.put("vehicle_code", "");
pointTab.update(material_point); pointTab.update(material_point);
} }
@@ -124,13 +124,13 @@ public class YqxCallMaterialTask extends AbstractAcsTask {
JSONObject taskObj = taskArr.getJSONObject(i); JSONObject taskObj = taskArr.getJSONObject(i);
String material_id = taskObj.getString("material_id"); String material_id = taskObj.getString("material_id");
String vehicle_type = taskObj.getString("vehicle_type"); String vehicle_type = taskObj.getString("vehicle_type");
JSONObject param1 = new JSONObject(); JSONObject queryParam = new JSONObject();
param1.put("flag", "1"); queryParam.put("flag", "1");
param1.put("material_id", material_id); queryParam.put("material_id", material_id);
param1.put("region_code", "YSQA01"); queryParam.put("region_code", "YSQA01");
param1.put("vehicle_type", "%" + vehicle_type + "%"); queryParam.put("vehicle_type", "%" + vehicle_type + "%");
//1、根据物料id查找养生A区物料点 //1、根据物料id查找养生A区物料点
JSONObject json1 = WQL.getWO("QSCH_yqxCallMAterial_01").addParamMap(param1).process().uniqueResult(0); JSONObject json1 = WQL.getWO("QSCH_yqxCallMAterial_01").addParamMap(queryParam).process().uniqueResult(0);
if (ObjectUtil.isNotEmpty(json1)) { if (ObjectUtil.isNotEmpty(json1)) {
// 拿到点位 // 拿到点位
JSONObject material_point = pointTab.query("point_id = '" + json1.getString("point_id") + "' and lock_type = '1'").uniqueResult(0); JSONObject material_point = pointTab.query("point_id = '" + json1.getString("point_id") + "' and lock_type = '1'").uniqueResult(0);
@@ -246,7 +246,7 @@ public class YqxCallMaterialTask extends AbstractAcsTask {
if (ObjectUtil.isNotEmpty(taskObj)) if (ObjectUtil.isNotEmpty(taskObj))
this.updateTaskStatus(taskObj,"0"); this.updateTaskStatus(taskObj,"0");
else { else {
throw new BadRequestException("已完成不能取消!"); throw new BadRequestException("任务已完成不能取消!");
} }
} }
} }

View File

@@ -50,14 +50,13 @@
p.col_num, p.col_num,
p.row_num p.row_num
FROM FROM
ST_IVT_StructIvt ivt SCH_BASE_Point p
LEFT JOIN SCH_BASE_Point p on ivt.point_id = p.point_id
WHERE WHERE
p.is_used = '1' p.is_used = '1'
AND is_delete = '0' AND is_delete = '0'
AND lock_type='1' AND lock_type='1'
OPTION 输入.material_id <> "" OPTION 输入.material_id <> ""
ivt.material_id = 输入.material_id p.material_id = 输入.material_id
ENDOPTION ENDOPTION
OPTION 输入.region_code <> "" OPTION 输入.region_code <> ""
p.region_code = 输入.region_code p.region_code = 输入.region_code

View File

@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.common.utils.SecurityUtils;
import org.nl.modules.system.util.CodeUtil; import org.nl.modules.system.util.CodeUtil;
import org.nl.modules.wql.WQL; import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
@@ -56,11 +57,18 @@ public class CpOutTask extends AbstractAcsTask {
taskObj.put("task_status", TaskStatusEnum.FINISHED.getCode()); taskObj.put("task_status", TaskStatusEnum.FINISHED.getCode());
taskObj.put("remark", "任务已取消"); taskObj.put("remark", "任务已取消");
taskTab.update(taskObj); taskTab.update(taskObj);
if (ObjectUtil.isNotEmpty(point2Obj)) {
// 释放终点点位 // 释放终点点位
point2Obj.put("lock_type", "1"); point2Obj.put("lock_type", "1");
point2Obj.put("point_status", "1"); point2Obj.put("point_status", "1");
point2Obj.put("task_id", "");
point2Obj.put("material_id", "");
point2Obj.put("vehicle_type", "");
point2Obj.put("vehicle_code", "");
pointTab.update(point2Obj); pointTab.update(point2Obj);
} }
}
if ("1".equals(status)) { if ("1".equals(status)) {
// 更新任务状态为执行中 // 更新任务状态为执行中
@@ -76,7 +84,7 @@ public class CpOutTask extends AbstractAcsTask {
taskObj.put("update_time", DateUtil.now()); taskObj.put("update_time", DateUtil.now());
taskTab.update(taskObj); taskTab.update(taskObj);
// 任务表的点位1 // 任务表的点位1:成品库区点
String point_code1 = taskObj.getString("point_code1"); // 起点编码 String point_code1 = taskObj.getString("point_code1"); // 起点编码
JSONObject point1Obj = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);// 起点 JSONObject point1Obj = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);// 起点
@@ -86,25 +94,41 @@ public class CpOutTask extends AbstractAcsTask {
String point_code2 = taskObj.getString("point_code2"); // 终点编码:出库点位 String point_code2 = taskObj.getString("point_code2"); // 终点编码:出库点位
JSONObject point2Obj = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);// 终点 JSONObject point2Obj = pointTab.query("point_code = '" + point_code2 + "'").uniqueResult(0);// 终点
// 修改区域出入库 - 起点点位解锁、点位状态更新 - 终点锁、更新状态 // 修改区域出入库 - 起点点位解锁、点位状态更新 - 终点锁、更新状态
//区域出入表【st_ivt_regionIO】 //区域出入表【st_ivt_regionIO】
regionIoObject.put("end_point_code", point_code2); regionIoObject.put("end_point_code", point_code2);
regionIoObject.put("start_region_id", point1Obj.getString("region_id")); // 点区域 regionIoObject.put("start_region_id", point1Obj.getString("region_id")); // 点区域
regionIoObject.put("end_region_id", point2Obj.getString("region_id")); // 终点区域 regionIoObject.put("end_region_id", point2Obj.getString("region_id")); // 终点区域
regionIoObject.put("bill_status", "3"); // 单据状态 regionIoObject.put("bill_status", "3"); // 单据状态
regionIoObject.put("task_id", task_id); // 任务id regionIoObject.put("task_id", task_id); // 任务id
regionIoObject.put("update_optid", SecurityUtils.getCurrentUserId());
regionIoObject.put("update_optname", SecurityUtils.getCurrentNickName());
regionIoObject.put("update_time", DateUtil.now());
regionIoTab.update(regionIoObject); regionIoTab.update(regionIoObject);
//完成后将仓位库存删掉 //完成后修改点位
//仓位库存表【ST_IVT_StructIvt】
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt");
ivtTab.delete("point_code = '" + taskObj.getString("point_code1") + "'");
// 点位解锁 并设置空位 // 点位解锁 并设置空位
// 货位点
point2Obj.put("lock_type", "2");
point2Obj.put("point_status", "3");
point2Obj.put("material_id", point1Obj.getString("material_id"));
point2Obj.put("pcsn", point1Obj.getString("pcsn"));
point2Obj.put("ivt_qty", point1Obj.getString("ivt_qty"));
point2Obj.put("instorage_time", point1Obj.getString("instorage_time"));
point2Obj.put("vehicle_type", point1Obj.getString("vehicle_type"));
point2Obj.put("vehicle_code", point1Obj.getString("vehicle_code"));
point2Obj.put("standing_time", point1Obj.getString("standing_time"));
// 起点
point1Obj.put("lock_type", "1"); point1Obj.put("lock_type", "1");
point1Obj.put("point_status", "1"); point1Obj.put("point_status", "1");
point2Obj.put("lock_type", "1"); point1Obj.put("material_id", "");
point2Obj.put("point_status", "3"); point1Obj.put("pcsn", "");
point1Obj.put("ivt_qty", "0");
point1Obj.put("instorage_time", "");
point1Obj.put("vehicle_type", "");
point1Obj.put("vehicle_code", "");
point1Obj.put("standing_time", 0);
pointTab.update(point1Obj); pointTab.update(point1Obj);
pointTab.update(point2Obj); pointTab.update(point2Obj);
} }
@@ -177,11 +201,16 @@ public class CpOutTask extends AbstractAcsTask {
@Override @Override
public String createTask(JSONObject whereJson) { public String createTask(JSONObject whereJson) {
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
WQLObject regionIoTab = WQLObject.getWQLObject("st_ivt_regionIO"); WQLObject regionIoTab = WQLObject.getWQLObject("st_ivt_regionIO");
String point_code1 = whereJson.getString("point_code1"); // 起点 String point_code1 = whereJson.getString("point_code1"); // 起点
String vehicle_type = whereJson.getString("vehicle_type");
String vehicle_code = whereJson.getString("vehicle_code"); String vehicle_code = whereJson.getString("vehicle_code");
String iostorinv_id = whereJson.getString("iostorinv_id"); String iostorinv_id = whereJson.getString("iostorinv_id");
String material_id = whereJson.getString("material_id");
JSONObject point = pointTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
String vehicle_type = point.getString("vehicle_type");
SchTaskDto dto = SchTaskDto.builder() SchTaskDto dto = SchTaskDto.builder()
.task_id(IdUtil.getLongId()) .task_id(IdUtil.getLongId())
@@ -193,6 +222,7 @@ public class CpOutTask extends AbstractAcsTask {
.vehicle_code(vehicle_code) .vehicle_code(vehicle_code)
.vehicle_type(vehicle_type) .vehicle_type(vehicle_type)
.handle_class(THIS_CLASS) .handle_class(THIS_CLASS)
.material_id(Long.valueOf(material_id))
.create_time(DateUtil.now()) .create_time(DateUtil.now())
.request_param(whereJson.toJSONString()) .request_param(whereJson.toJSONString())
.table_name("st_ivt_regionIO") .table_name("st_ivt_regionIO")
@@ -207,6 +237,9 @@ public class CpOutTask extends AbstractAcsTask {
// 单据设置执行中 // 单据设置执行中
JSONObject iostorinv = regionIoTab.query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0); JSONObject iostorinv = regionIoTab.query("iostorinv_id = '" + iostorinv_id + "'").uniqueResult(0);
iostorinv.put("bill_status", "2"); iostorinv.put("bill_status", "2");
iostorinv.put("update_optid", SecurityUtils.getCurrentUserId());
iostorinv.put("update_optname", SecurityUtils.getCurrentNickName());
iostorinv.put("update_time", DateUtil.now());
regionIoTab.update(iostorinv); regionIoTab.update(iostorinv);
//创建好立即下发 //创建好立即下发
@@ -221,7 +254,7 @@ public class CpOutTask extends AbstractAcsTask {
if (ObjectUtil.isNotEmpty(taskObj)) if (ObjectUtil.isNotEmpty(taskObj))
this.updateTaskStatus(taskObj,"2"); this.updateTaskStatus(taskObj,"2");
else { else {
throw new BadRequestException("未找到该任务或者任务已完成"); throw new BadRequestException("未找到该任务或者任务已完成!");
} }
} }
@@ -231,5 +264,6 @@ public class CpOutTask extends AbstractAcsTask {
JSONObject taskObj = taskTab.query("task_id = '" + task_id + "' and is_delete = '0' and task_status <> " + TaskStatusEnum.FINISHED.getCode()).uniqueResult(0); JSONObject taskObj = taskTab.query("task_id = '" + task_id + "' and is_delete = '0' and task_status <> " + TaskStatusEnum.FINISHED.getCode()).uniqueResult(0);
if (ObjectUtil.isNotEmpty(taskObj)) if (ObjectUtil.isNotEmpty(taskObj))
this.updateTaskStatus(taskObj,"0"); this.updateTaskStatus(taskObj,"0");
else throw new BadRequestException("任务已完成不能取消!");
} }
} }

View File

@@ -122,27 +122,16 @@ public class GjxSendMaterialTask extends AbstractAcsTask {
//完成后入库 //完成后入库
//仓位库存表【ST_IVT_StructIvt】
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt");
JSONObject ivtObj = new JSONObject();
ivtObj.put("stockrecord_id", IdUtil.getLongId());
ivtObj.put("point_id", endPoint.getString("point_id"));
ivtObj.put("point_code", endPoint.getString("point_code"));
ivtObj.put("point_name", endPoint.getString("point_name"));
ivtObj.put("region_id", endPoint.getString("region_id"));
ivtObj.put("region_code", endPoint.getString("region_code"));
ivtObj.put("region_name", endPoint.getString("region_name"));
ivtObj.put("instorage_time", DateUtil.now());
ivtObj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd"));
ivtObj.put("ivt_qty", requestObj.getString("qty"));
ivtObj.put("standing_time", workorderObj.getString("standing_time"));
ivtObj.put("material_id", workorderObj.getString("material_id"));
ivtTab.insert(ivtObj);
// 点位解锁 // 点位解锁
endPoint.put("lock_type", "1"); endPoint.put("lock_type", "1");
endPoint.put("point_status", "3"); endPoint.put("point_status", "3");
endPoint.put("material_id", taskObj.getString("material_id")); endPoint.put("material_id", taskObj.getString("material_id"));
endPoint.put("instorage_time", DateUtil.now());
endPoint.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd"));
endPoint.put("ivt_qty", requestObj.getString("qty"));
endPoint.put("standing_time", workorderObj.getString("standing_time"));
endPoint.put("vehicle_code", taskObj.getString("vehicle_code"));
endPoint.put("vehicle_type", taskObj.getString("vehicle_type"));
pointTab.update(endPoint); pointTab.update(endPoint);
//释放整列货位 //释放整列货位
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
@@ -352,7 +341,7 @@ public class GjxSendMaterialTask extends AbstractAcsTask {
if (ObjectUtil.isNotEmpty(taskObj)) { if (ObjectUtil.isNotEmpty(taskObj)) {
this.updateTaskStatus(taskObj, "0"); this.updateTaskStatus(taskObj, "0");
} else { } else {
throw new BadRequestException("已完成不能取消!"); throw new BadRequestException("任务已完成不能取消!");
} }
} }

View File

@@ -108,24 +108,13 @@ public class HkxSendMaterialTask extends AbstractAcsTask {
regionIoObj.put("create_time", DateUtil.now()); regionIoObj.put("create_time", DateUtil.now());
regionIoTab.insert(regionIoObj); regionIoTab.insert(regionIoObj);
//完成后入库 //完成后入库
//仓位库存表【ST_IVT_StructIvt】 point2Obj.put("instorage_time", DateUtil.now());
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt"); point2Obj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd"));
JSONObject ivtObj = new JSONObject(); point2Obj.put("ivt_qty", requestObj.getString("qty"));
ivtObj.put("stockrecord_id", IdUtil.getLongId()); point2Obj.put("standing_time", workorderObj.getString("standing_time"));
ivtObj.put("point_id", point2Obj.getString("point_id")); point2Obj.put("material_id", workorderObj.getString("material_id"));
ivtObj.put("point_code", point2Obj.getString("point_code")); point2Obj.put("vehicle_code", taskObj.getString("vehicle_code"));
ivtObj.put("point_name", point2Obj.getString("point_name"));
ivtObj.put("region_id", point2Obj.getString("region_id"));
ivtObj.put("region_code", point2Obj.getString("region_code"));
ivtObj.put("region_name", point2Obj.getString("region_name"));
ivtObj.put("instorage_time", DateUtil.now());
ivtObj.put("pcsn", DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyyMMdd"));
ivtObj.put("ivt_qty", requestObj.getString("qty"));
ivtObj.put("standing_time", workorderObj.getString("standing_time"));
ivtObj.put("material_id", workorderObj.getString("material_id"));
ivtTab.insert(ivtObj);
// 终点解锁 // 终点解锁
point2Obj.put("lock_type", "1"); point2Obj.put("lock_type", "1");

View File

@@ -50,7 +50,7 @@ public class RegionIoServiceImpl implements RegionIoService {
map.put("bill_status", whereJson.get("bill_status")); map.put("bill_status", whereJson.get("bill_status"));
map.put("begin_time", whereJson.get("begin_time")); map.put("begin_time", whereJson.get("begin_time"));
map.put("end_time", whereJson.get("end_time")); map.put("end_time", whereJson.get("end_time"));
JSONObject json = WQL.getWO("ST_IVT_REGIONIO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time asc"); JSONObject json = WQL.getWO("ST_IVT_REGIONIO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time desc");
return json; return json;
} }
@@ -147,17 +147,17 @@ public class RegionIoServiceImpl implements RegionIoService {
*/ */
@Override @Override
public void makeTask(JSONArray dto) { public void makeTask(JSONArray dto) {
WQLObject regionIoTab = WQLObject.getWQLObject("st_ivt_regionIO"); WQLObject regionIoTab = WQLObject.getWQLObject("st_ivt_regionIO"); // 出入库表
for (int i = 0; i < dto.size(); i++) { for (int i = 0; i < dto.size(); i++) {
JSONObject dtoJSONObject = dto.getJSONObject(i); JSONObject regionIoObj = dto.getJSONObject(i);
JSONObject iostorinv = regionIoTab.query("iostorinv_id = '" + dtoJSONObject.getString("iostorinv_id") + "'").uniqueResult(0); JSONObject iostorInvObj = regionIoTab.query("iostorinv_id = '" + regionIoObj.getString("iostorinv_id") + "'").uniqueResult(0);
if (ObjectUtil.equal(iostorinv.getString("bill_status"), "3")) if (ObjectUtil.equal(iostorInvObj.getString("bill_status"), "3"))
throw new BadRequestException("没有单据或者已出库"); throw new BadRequestException("没有单据或者已出库");
JSONObject param = new JSONObject(); JSONObject param = new JSONObject();
param.put("point_code1", dtoJSONObject.getString("start_point_code")); param.put("point_code1", regionIoObj.getString("start_point_code"));
param.put("vehicle_code", dtoJSONObject.getString("vehicle_code")); param.put("vehicle_code", regionIoObj.getString("vehicle_code"));
// param.put("vehicle_type", vehicle_type); param.put("material_id", regionIoObj.getString("material_id"));
param.put("iostorinv_id", dtoJSONObject.getString("iostorinv_id")); param.put("iostorinv_id", regionIoObj.getString("iostorinv_id"));
CpOutTask taskBean = SpringContextHolder.getBean(CpOutTask.class); CpOutTask taskBean = SpringContextHolder.getBean(CpOutTask.class);
String task_id = taskBean.createTask(param); String task_id = taskBean.createTask(param);
} }

View File

@@ -247,41 +247,38 @@ public class StructivtServiceImpl implements StructivtService {
* @param jsonArray * @param jsonArray
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public void outInventory(JSONArray jsonArray) { public void outInventory(JSONArray jsonArray) {
WQLObject structIvtTab = WQLObject.getWQLObject("ST_IVT_STRUCTIVT"); WQLObject regionIoTab = WQLObject.getWQLObject("ST_IVT_REGIONIO"); // 出入库表
WQLObject regionIoTab = WQLObject.getWQLObject("ST_IVT_REGIONIO"); WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
String in_store_code = CodeUtil.getNewCode("IN_STORE_CODE"); String in_store_code = CodeUtil.getNewCode("IN_STORE_CODE");
for (int i = 0; i < jsonArray.size(); i++) { for (int i = 0; i < jsonArray.size(); i++) { // 每个对象就是点位
JSONObject structivts = jsonArray.getJSONObject(i); JSONObject pointObj = jsonArray.getJSONObject(i);
// 如果是空位或者锁定就跳过 // 如果是空位或者锁定就跳过
if (structivts.getString("lock_type").equals("2") || !structivts.getString("point_status").equals("3")) continue; if (pointObj.getString("lock_type").equals("2") || !pointObj.getString("point_status").equals("3")) throw new BadRequestException("点位无物料或者已出库");
// 插入regionIO - 未锁定,有料位 // 插入regionIO - 未锁定,有料位
JSONObject regionIoObj = new JSONObject(); JSONObject regionIoObj = new JSONObject();
regionIoObj.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId()); regionIoObj.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
regionIoObj.put("bill_code", in_store_code); // 批量新增相同 regionIoObj.put("bill_code", in_store_code); // 批量新增相同
regionIoObj.put("buss_date", DateUtil.today()); regionIoObj.put("buss_date", DateUtil.today());
regionIoObj.put("io_type", "2"); regionIoObj.put("io_type", "2");
regionIoObj.put("material_id", structivts.getString("material_id")); regionIoObj.put("material_id", pointObj.getString("material_id")); // 点位表的物料id是空的仓位表有物料id
regionIoObj.put("pcsn", structivts.getString("pcsn")); regionIoObj.put("pcsn", pointObj.getString("pcsn"));
regionIoObj.put("vehicle_code", structivts.getString("vehicle_code")); regionIoObj.put("vehicle_code", pointObj.getString("vehicle_code"));
regionIoObj.put("qty", structivts.getString("ivt_qty")); regionIoObj.put("qty", pointObj.getString("ivt_qty"));
regionIoObj.put("qty_unit_id", structivts.getString("qty_unit_id")); regionIoObj.put("qty_unit_id", pointObj.getString("qty_unit_id"));
regionIoObj.put("bill_status", "1"); regionIoObj.put("bill_status", "1");
regionIoObj.put("start_point_code", structivts.getString("point_code")); // 起点 regionIoObj.put("start_point_code", pointObj.getString("point_code")); // 起点
String start_region_id = pointTab.query("point_code = '" + structivts.getString("point_code") + "'").uniqueResult(0).getString("region_id"); regionIoObj.put("region_id", pointObj.getString("region_id"));
if (ObjectUtil.isNotEmpty(start_region_id)) regionIoObj.put("region_code", pointObj.getString("region_code"));
regionIoObj.put("region_id", structivts.getString("region_id")); regionIoObj.put("region_name", pointObj.getString("region_name"));
regionIoObj.put("region_code", structivts.getString("region_code"));
regionIoObj.put("region_name", structivts.getString("region_name"));
regionIoObj.put("create_mode", "2"); regionIoObj.put("create_mode", "2");
regionIoObj.put("create_id", SecurityUtils.getCurrentUserId()); regionIoObj.put("create_id", SecurityUtils.getCurrentUserId());
regionIoObj.put("create_name", SecurityUtils.getCurrentNickName()); regionIoObj.put("create_name", SecurityUtils.getCurrentNickName());
regionIoObj.put("create_time", DateUtil.now()); regionIoObj.put("create_time", DateUtil.now());
regionIoTab.insert(regionIoObj); regionIoTab.insert(regionIoObj);
// 上锁 // 上锁
JSONObject point = pointTab.query("point_id = '" + structivts.getString("point_id") + "'").uniqueResult(0); JSONObject point = pointTab.query("point_id = '" + pointObj.getString("point_id") + "'").uniqueResult(0);
point.put("lock_type", "2"); point.put("lock_type", "2");
pointTab.update(point); pointTab.update(point);
} }

View File

@@ -16,6 +16,7 @@
输入.flag TYPEAS s_string 输入.flag TYPEAS s_string
输入.io_region TYPEAS f_string 输入.io_region TYPEAS f_string
输入.region_code TYPEAS f_string 输入.region_code TYPEAS f_string
输入.point_code TYPEAS s_string
输入.begin_time TYPEAS s_string 输入.begin_time TYPEAS s_string
输入.end_time TYPEAS s_string 输入.end_time TYPEAS s_string
输入.bill_code TYPEAS s_string 输入.bill_code TYPEAS s_string
@@ -52,16 +53,9 @@
IF 输入.flag = "1" IF 输入.flag = "1"
PAGEQUERY PAGEQUERY
SELECT SELECT
point.*, point.*
str.stockrecord_id,
str.pcsn,
str.ivt_qty,
str.qty_unit_id,
str.instorage_time,
str.standing_time
FROM FROM
sch_base_point point sch_base_point point
LEFT JOIN st_ivt_structivt str ON str.point_id = point.point_id
WHERE WHERE
point.region_code IN 输入.region_code point.region_code IN 输入.region_code
OPTION 输入.point_code <> "" OPTION 输入.point_code <> ""
@@ -94,10 +88,10 @@
point.is_used = 输入.is_used point.is_used = 输入.is_used
ENDOPTION ENDOPTION
OPTION 输入.begin_time <> "" OPTION 输入.begin_time <> ""
str.instorage_time >= 输入.begin_time point.instorage_time >= 输入.begin_time
ENDOPTION ENDOPTION
OPTION 输入.end_time <> "" OPTION 输入.end_time <> ""
str.instorage_time <= 输入.end_time point.instorage_time <= 输入.end_time
ENDOPTION ENDOPTION
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY

View File

@@ -233,7 +233,7 @@
<span v-show="showTab">{{scope.row.material_code}}</span> <span v-show="showTab">{{scope.row.material_code}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="material_name" label="物料名称" /> <el-table-column prop="material_name" label="物料名称" min-width="120"/>
<el-table-column prop="instorage_time" label="入库时间" min-width="150" show-overflow-tooltip/> <el-table-column prop="instorage_time" label="入库时间" min-width="150" show-overflow-tooltip/>
<el-table-column prop="point_status_name" label="点位状态" width="120"> <el-table-column prop="point_status_name" label="点位状态" width="120">
<template slot-scope="scope"> <template slot-scope="scope">