代码更新
This commit is contained in:
@@ -100,4 +100,6 @@ public class MaterialbaseDto implements Serializable {
|
||||
private Long ass_unit_id;
|
||||
|
||||
private Long product_series;
|
||||
|
||||
private Integer standing_time;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
WQLObject taskTab = WQLObject.getWQLObject("sch_base_task");
|
||||
|
||||
String storagevehicle_code_begin = (String) whereJson.get("storagevehicle_code_begin");
|
||||
String storagevehicle_code_end = (String) whereJson.get("storagevehicle_code_end");
|
||||
String storagevehicle_type = (String) whereJson.get("storagevehicle_type");
|
||||
@@ -51,6 +53,19 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
map.put("storagevehicle_type", storagevehicle_type);
|
||||
map.put("flag", "1");
|
||||
JSONObject json = WQL.getWO("QMD_PB_STORAGEVEHICLEINFO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "s.storagevehicle_code ASC");
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jsonObject = content.getJSONObject(i);
|
||||
JSONObject jsonTask = taskTab.query("vehicle_code = '" + jsonObject.getString("storagevehicle_code") + "' and task_status <> '99' and is_delete = '0'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonTask)) {
|
||||
jsonObject.put("start_point_code", jsonTask.getString("start_point_code"));
|
||||
jsonObject.put("next_point_code", jsonTask.getString("next_point_code"));
|
||||
jsonObject.put("is_task", "1");
|
||||
jsonObject.put("point_code", "");
|
||||
} else {
|
||||
jsonObject.put("is_task", "0");
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,10 +45,17 @@
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
s.*,
|
||||
d.label AS storagevehicle_type_name
|
||||
d.label AS storagevehicle_type_name,
|
||||
mater.material_code,
|
||||
mater.material_name,
|
||||
point.point_code,
|
||||
point.point_name
|
||||
FROM
|
||||
md_pb_storagevehicleinfo s
|
||||
left JOIN sys_dict_detail d ON s.storagevehicle_type = d.value and d.dict_id = '32'
|
||||
LEFT JOIN sys_dict_detail d ON s.storagevehicle_type = d.value and d.dict_id = '32'
|
||||
LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code
|
||||
LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id
|
||||
WHERE
|
||||
s.is_delete = '0'
|
||||
ENDOPTION
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -87,8 +87,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
||||
Long deptId = currentUser.getUser().getDept().getId();
|
||||
|
||||
dto.setWorkprocedure_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setCreate_id(currentUserId);
|
||||
@@ -97,8 +95,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
dto.setSyscompanyid(deptId);
|
||||
dto.setSysdeptid(deptId);
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -159,7 +155,7 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
|
||||
public List<WorkprocedureDto> queryWorkprocedure() {
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
||||
//只查清洗 跟仓储
|
||||
JSONArray arr = wo.query(" is_delete = '0' and workprocedure_code in ('12','08')").getResultJSONArray(0);
|
||||
JSONArray arr = wo.query(" is_delete = '0' and is_used = '1'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(WorkprocedureDto.class);
|
||||
return null;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,6 +15,7 @@ import org.nl.exception.BadRequestException;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.nl.wms.st.in.WorkProcedureEnum;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.wql.util.WqlUtil;
|
||||
@@ -229,33 +230,23 @@ public class PointServiceImpl implements PointService {
|
||||
@Override
|
||||
public Map<String, Object> getEndPoint(Map whereJson, Pageable page) {
|
||||
String search = MapUtil.getStr(whereJson, "search");
|
||||
//String material_id = MapUtil.getStr(whereJson, "material_id");
|
||||
String area_type = MapUtil.getStr(whereJson, "area_type");
|
||||
String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code");
|
||||
String qty = MapUtil.getStr(whereJson, "qty");
|
||||
String loadSeries = "4";
|
||||
//根据重量去找最小的级数在哪个范围
|
||||
if (StrUtil.isNotEmpty(qty) && Double.valueOf(qty) > 0) {
|
||||
loadSeries = this.getLoadSeriesByqty(Double.valueOf(qty));
|
||||
}
|
||||
String workprocedure_id = MapUtil.getStr(whereJson, "workprocedure_id");
|
||||
|
||||
|
||||
WQLObject wo_vehicle = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
||||
String vehicle_type = "";
|
||||
if (StrUtil.isNotEmpty(vehicle_code)) {
|
||||
JSONObject jsonObject = wo_vehicle.query("is_delete = '0' and storagevehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
vehicle_type = jsonObject.getString("storagevehicle_type");
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
|
||||
if (StrUtil.equals(workprocedure_id, WorkProcedureEnum.GJGX.getId())) {
|
||||
map.put("point_code", "YSZCW%");
|
||||
}
|
||||
|
||||
if (StrUtil.equals(workprocedure_id, WorkProcedureEnum.HKGX.getId())) {
|
||||
map.put("point_code", "CPZCW%");
|
||||
}
|
||||
|
||||
map.put("flag", "3");
|
||||
map.put("area_type", area_type);
|
||||
map.put("vehicle_type", vehicle_type);
|
||||
map.put("loadSeries", loadSeries);
|
||||
//map.put("material_id",material_id);
|
||||
if (ObjectUtil.isNotEmpty(search)) {
|
||||
map.put("search", "%" + search + "%");
|
||||
}
|
||||
JSONObject json = WQL.getWO("SCH_Point_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "struct_code");
|
||||
JSONObject json = WQL.getWO("SCH_Point_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point.point_code");
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
输入.flag TYPEAS s_string
|
||||
输入.search TYPEAS s_string
|
||||
输入.point_type TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.area_type TYPEAS s_string
|
||||
输入.point_status TYPEAS s_string
|
||||
输入.lock_type TYPEAS s_string
|
||||
输入.is_used TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.vehicle_type TYPEAS s_string
|
||||
输入.loadSeries TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -93,32 +93,27 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT DISTINCT
|
||||
structattr.struct_id,
|
||||
structattr.struct_code,
|
||||
structattr.struct_name,
|
||||
point.area_type,
|
||||
point.point_type
|
||||
FROM
|
||||
st_ivt_structattr structattr
|
||||
LEFT JOIN sch_base_point point ON point.point_id = structattr.struct_id
|
||||
LEFT JOIN ST_IVT_StructRelaVehicleType rulevehicle ON rulevehicle.struct_id = structattr.struct_id
|
||||
LEFT JOIN ST_IVT_StructAttributeRules ruledis ON ruledis.struct_id = structattr.struct_id
|
||||
WHERE
|
||||
point.lock_type = '00'
|
||||
AND (point.vehicle_code = '' or point.vehicle_code is null)
|
||||
AND point.point_status = '00'
|
||||
AND point.area_type = 输入.area_type
|
||||
AND rulevehicle.vehicle_type = 输入.vehicle_type
|
||||
OPTION 输入.search <> ""
|
||||
(structattr.struct_code like 输入.search or
|
||||
structattr.struct_name like 输入.search)
|
||||
ENDOPTION
|
||||
OPTION 输入.loadSeries <> ""
|
||||
ruledis.load_series >= 输入.loadSeries
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
point.*
|
||||
FROM
|
||||
sch_base_point point
|
||||
WHERE
|
||||
point.lock_type = '00'
|
||||
AND point.is_used = '1'
|
||||
AND point.is_delete = '0'
|
||||
AND point.area_type = 'ZCQ01'
|
||||
|
||||
OPTION 输入.search <> ""
|
||||
(point.point_code like 输入.search or
|
||||
point.point_name like 输入.search)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.point_code <> ""
|
||||
point.point_code like 输入.point_code
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
Binary file not shown.
@@ -7,9 +7,8 @@ import cn.hutool.core.util.StrUtil;
|
||||
*/
|
||||
public enum WorkProcedureEnum {
|
||||
|
||||
BZGX(1, "1535144822984282112", "01", "包装工序", ""),
|
||||
QXGX(2, "1535144552481034240", "02", "清洗工序", ""),
|
||||
CCGX(2, "1535144934791843840", "02", "仓储工序", "");
|
||||
GJGX(1, "1556829396462080000", "01", "共挤工序", ""),
|
||||
HKGX(2, "1556829712439971840", "02", "豪凯工序", "");
|
||||
//顺序号
|
||||
private int index;
|
||||
//工序标识
|
||||
|
||||
@@ -114,4 +114,11 @@ public class WorkprocedureiosController {
|
||||
return new ResponseEntity<>(workprocedureiosService.getEndAareaByworkprocedureId(param.getString("workprocedure_id")),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getWorkProce")
|
||||
@Log("跟据单据类型获取工序")
|
||||
@ApiOperation("跟据单据类型获取工序")
|
||||
public ResponseEntity<Object> getWorkProce(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(workprocedureiosService.getWorkProce(param),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -100,4 +100,6 @@ public interface WorkprocedureiosService {
|
||||
* 根据工序获取终点区域
|
||||
*/
|
||||
Map<String,Object> getEndAareaByworkprocedureId(String workprocedure_id);
|
||||
|
||||
JSONObject getWorkProce(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -90,6 +91,17 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(WorkprocedureiosDto dto) {
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
WQLObject vehicleTab = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo");
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + dto.getMaterial_id() + "'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(dto.getVehicle_code())) {
|
||||
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + dto.getVehicle_code() + "' and is_delete = '0' and is_used= '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonVehicle)) {
|
||||
throw new BadRequestException("载具不存在");
|
||||
}
|
||||
}
|
||||
|
||||
String bill_code = CodeUtil.getNewCode("IN_STORE_CODE");
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
@@ -98,25 +110,6 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
dto.setBill_code(bill_code);
|
||||
dto.setIo_type("0");
|
||||
dto.setBill_status("10");
|
||||
|
||||
Map<String, Object> endMap = this.getEndAareaByworkprocedureId(dto.getWorkprocedure_id().toString());
|
||||
String end_area = dto.getEnd_area();
|
||||
if (StrUtil.isEmpty(end_area)) {
|
||||
String endArea = MapUtil.getStr(endMap, "end_area");
|
||||
if (StrUtil.isEmpty(endArea)) {
|
||||
throw new BadRequestException("终点区域为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
dto.setEnd_area(endArea);
|
||||
}
|
||||
Long qty_unit_id = dto.getQty_unit_id();
|
||||
if (ObjectUtil.isNull(qty_unit_id)) {
|
||||
String unit_id = MapUtil.getStr(endMap, "qty_unit_id");
|
||||
if (StrUtil.isEmpty(unit_id)) {
|
||||
throw new BadRequestException("数量单位为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
qty_unit_id = Long.valueOf(unit_id);
|
||||
dto.setQty_unit_id(qty_unit_id);
|
||||
}
|
||||
dto.setCreate_mode("01");
|
||||
dto.setCreate_id(currentUserId);
|
||||
dto.setCreate_name(nickName);
|
||||
@@ -124,6 +117,7 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
dto.setQty_unit_id(jsonMater.getLongValue("base_unit_id"));
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -136,33 +130,25 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
WorkprocedureiosDto entity = this.findById(dto.getIostorinv_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
WQLObject vehicleTab = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo");
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + dto.getMaterial_id() + "'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(dto.getVehicle_code())) {
|
||||
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + dto.getVehicle_code() + "' and is_delete = '0' and is_used= '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonVehicle)) {
|
||||
throw new BadRequestException("载具不存在");
|
||||
}
|
||||
}
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
dto.setBill_status("10");
|
||||
|
||||
Map<String, Object> endMap = this.getEndAareaByworkprocedureId(dto.getWorkprocedure_id().toString());
|
||||
String end_area = dto.getEnd_area();
|
||||
if (StrUtil.isEmpty(end_area)) {
|
||||
String endArea = MapUtil.getStr(endMap, "end_area");
|
||||
if (StrUtil.isEmpty(endArea)) {
|
||||
throw new BadRequestException("终点区域为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
dto.setEnd_area(endArea);
|
||||
}
|
||||
Long qty_unit_id = dto.getQty_unit_id();
|
||||
if (ObjectUtil.isNull(qty_unit_id)) {
|
||||
String unit_id = MapUtil.getStr(endMap, "qty_unit_id");
|
||||
if (StrUtil.isEmpty(unit_id)) {
|
||||
throw new BadRequestException("数量单位为空,枚举中未查到工序对应区域!");
|
||||
}
|
||||
qty_unit_id = Long.valueOf(unit_id);
|
||||
dto.setQty_unit_id(qty_unit_id);
|
||||
}
|
||||
|
||||
dto.setUpdate_time(now);
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setQty_unit_id(jsonMater.getLongValue("base_unit_id"));
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_workprocedureios");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
@@ -196,35 +182,19 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
|
||||
@Override
|
||||
public JSONArray selectStartPoint(String workprocedureid) {
|
||||
/* WQLObject woDevice = WQLObject.getWQLObject("pdm_base_device");*/
|
||||
JSONArray arrPoint = new JSONArray();
|
||||
WQLObject woPoint = WQLObject.getWQLObject("sch_base_point");
|
||||
//包装工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.CCGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'CPRKW%'").getResultJSONArray(0);
|
||||
// 共挤工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.GJGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'GJX%'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//包装工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.BZGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'CPRKW%'").getResultJSONArray(0);
|
||||
// 豪凯工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.HKGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and point_code like 'HK%'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//清洗工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.QXGX.getId())) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
JSONArray arrDevice = woDevice.query("is_delete = '0' and workprocedure_id = '" + workprocedureid + "'", "device_code").getResultJSONArray(0);
|
||||
JSONArray arrPoint = new JSONArray();
|
||||
for (int i = 0; i < arrDevice.size(); i++) {
|
||||
JSONObject jsonDevice = arrDevice.getJSONObject(i);
|
||||
JSONArray arrPoints = woPoint.query("is_delete = '0' and device_point_type = '02' and device_id = '" + jsonDevice.getString("device_id") + "'", "point_code").getResultJSONArray(0);
|
||||
for (int j = 0; j < arrPoints.size(); j++) {
|
||||
JSONObject jsonPoint = arrPoints.getJSONObject(j);
|
||||
arrPoint.add(jsonPoint);
|
||||
}
|
||||
}*/
|
||||
return arrPoint;
|
||||
}
|
||||
|
||||
@@ -294,33 +264,47 @@ public class WorkprocedureiosServiceImpl implements WorkprocedureiosService {
|
||||
String endArea = "";
|
||||
String qty_unit_id = "";
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
|
||||
// TODO
|
||||
switch (workProcedureEnum) {
|
||||
//包装工序
|
||||
case CCGX:
|
||||
endArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
break;
|
||||
|
||||
//包装工序
|
||||
case BZGX:
|
||||
endArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
break;
|
||||
// 清洗工序
|
||||
case QXGX:
|
||||
endArea = AreaEnum.BCPHJ.getCode();
|
||||
qty_unit_id = BussConstant.YZ_IN_QTY_UNIT_ID;
|
||||
break;
|
||||
default:
|
||||
endArea = null;
|
||||
qty_unit_id = null;
|
||||
break;
|
||||
}
|
||||
// switch (workProcedureEnum) {
|
||||
// //包装工序
|
||||
// case CCGX:
|
||||
// endArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
// break;
|
||||
//
|
||||
// //包装工序
|
||||
// case BZGX:
|
||||
// endArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.HN_IN_QTY_UNIT_ID;
|
||||
// break;
|
||||
// // 清洗工序
|
||||
// case QXGX:
|
||||
// endArea = AreaEnum.BCPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.YZ_IN_QTY_UNIT_ID;
|
||||
// break;
|
||||
// default:
|
||||
// endArea = null;
|
||||
// qty_unit_id = null;
|
||||
// break;
|
||||
// }
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("end_area", endArea);
|
||||
map.put("qty_unit_id", qty_unit_id);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getWorkProce(JSONObject param) {
|
||||
String type = param.getString("type");
|
||||
|
||||
WQLObject tab = WQLObject.getWQLObject("pdm_bi_workprocedure");
|
||||
|
||||
String workprocedure = "";
|
||||
if (StrUtil.equals(type, "001001")) workprocedure = "HK01";
|
||||
if (StrUtil.equals(type, "001002")) workprocedure = "GJ001";
|
||||
|
||||
JSONObject json = tab.query("workprocedure_code = '" + workprocedure + "' and is_used = '1' and is_delete = '0'").uniqueResult(0);
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -199,19 +199,19 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
|
||||
/*WQLObject woDevice = WQLObject.getWQLObject("pdm_base_device");*/
|
||||
JSONArray arrPoint = new JSONArray();
|
||||
WQLObject woPoint = WQLObject.getWQLObject("sch_base_point");
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.CCGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//包装工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.BZGX.getId())) {
|
||||
arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
return arrPoint;
|
||||
}
|
||||
//清洗工序
|
||||
if (StrUtil.equals(workprocedureid, WorkProcedureEnum.QXGX.getId())) {
|
||||
|
||||
}
|
||||
// if (StrUtil.equals(workprocedureid, WorkProcedureEnum.CCGX.getId())) {
|
||||
// arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
// return arrPoint;
|
||||
// }
|
||||
// //包装工序
|
||||
// if (StrUtil.equals(workprocedureid, WorkProcedureEnum.BZGX.getId())) {
|
||||
// arrPoint = woPoint.query("is_used='1' and is_delete='0' and area_type ='KQ006'").getResultJSONArray(0);
|
||||
// return arrPoint;
|
||||
// }
|
||||
// //清洗工序
|
||||
// if (StrUtil.equals(workprocedureid, WorkProcedureEnum.QXGX.getId())) {
|
||||
//
|
||||
// }
|
||||
/* for (int i = 0; i < arrDevice.size(); i++) {
|
||||
JSONObject jsonDevice = arrDevice.getJSONObject(i);
|
||||
JSONArray arrPoints = woPoint.query("is_delete = '0' and device_point_type = '01' and device_id = '" + jsonDevice.getString("device_id") + "'").getResultJSONArray(0);
|
||||
@@ -305,27 +305,27 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
|
||||
String qty_unit_id = "";
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id);
|
||||
// TODO
|
||||
switch (workProcedureEnum) {
|
||||
//包装工序
|
||||
case CCGX:
|
||||
startArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
break;
|
||||
//包装工序
|
||||
case BZGX:
|
||||
startArea = AreaEnum.CPHJ.getCode();
|
||||
qty_unit_id = null;
|
||||
break;
|
||||
// 清洗工序
|
||||
case QXGX:
|
||||
startArea = AreaEnum.BCPHJ.getCode();
|
||||
qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
break;
|
||||
default:
|
||||
startArea = null;
|
||||
qty_unit_id = null;
|
||||
break;
|
||||
}
|
||||
// switch (workProcedureEnum) {
|
||||
// //包装工序
|
||||
// case CCGX:
|
||||
// startArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
// break;
|
||||
// //包装工序
|
||||
// case BZGX:
|
||||
// startArea = AreaEnum.CPHJ.getCode();
|
||||
// qty_unit_id = null;
|
||||
// break;
|
||||
// // 清洗工序
|
||||
// case QXGX:
|
||||
// startArea = AreaEnum.BCPHJ.getCode();
|
||||
// qty_unit_id = BussConstant.YZ_OUT_QTY_UNIT_ID;
|
||||
// break;
|
||||
// default:
|
||||
// startArea = null;
|
||||
// qty_unit_id = null;
|
||||
// break;
|
||||
// }
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("start_area", startArea);
|
||||
map.put("qty_unit_id", qty_unit_id);
|
||||
@@ -346,14 +346,14 @@ public class WorkprocedureiosServiceOutImpl implements WorkprocedureiosOutServic
|
||||
String ivt_workprocedure_id = "";
|
||||
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(param.getString("workprocedureid"));
|
||||
// TODO
|
||||
switch (workProcedureEnum) {
|
||||
case BZGX:
|
||||
ivt_workprocedure_id = WorkProcedureEnum.BZGX.getId();
|
||||
break;
|
||||
case QXGX:
|
||||
ivt_workprocedure_id = WorkProcedureEnum.QXGX.getId();
|
||||
break;
|
||||
}
|
||||
// switch (workProcedureEnum) {
|
||||
// case BZGX:
|
||||
// ivt_workprocedure_id = WorkProcedureEnum.BZGX.getId();
|
||||
// break;
|
||||
// case QXGX:
|
||||
// ivt_workprocedure_id = WorkProcedureEnum.QXGX.getId();
|
||||
// break;
|
||||
// }
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("ivt_workprocedure_id", ivt_workprocedure_id);
|
||||
return map;
|
||||
|
||||
Reference in New Issue
Block a user