This commit is contained in:
zds
2022-11-28 18:19:59 +08:00
parent fb88546733
commit 7b1f9fb61f
27 changed files with 240 additions and 109 deletions

View File

@@ -70,7 +70,7 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
String classIds = classstandardService.getAllChildIdStr(class_idStr);
map.put("classIds", "");
}
JSONObject json = WQL.getWO("QEM_BI_DEVICEMAINTAIN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time DESC");
JSONObject json = WQL.getWO("QEM_BI_DEVICEMAINTAIN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "maint_item_code DESC");
return json;
}

View File

@@ -65,7 +65,7 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
map.put("classIds", "");
}
JSONObject json = WQL.getWO("QEM_BI_DEVICEREPAIRITEMS01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time DESC");
JSONObject json = WQL.getWO("QEM_BI_DEVICEREPAIRITEMS01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "repair_item_code DESC");
return json;
}

View File

@@ -68,9 +68,9 @@ public class ProductProcessParamController {
@Log("删除参数")
@ApiOperation("删除参数")
//@PreAuthorize("@el.check('WorkProcedure:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String ids) {
productProcessParamService.deleteAll(ids);
@PostMapping("/del")
public ResponseEntity<Object> delete(@RequestBody Map map) {
productProcessParamService.deleteAll(map);
return new ResponseEntity<>(HttpStatus.OK);
}

View File

@@ -48,5 +48,5 @@ public interface ProductProcessParamService {
/**
* 删除参数
*/
void deleteAll(String ids);
void deleteAll(Map whereJson);
}

View File

@@ -52,7 +52,7 @@ public class ProductProcessParamServiceImpl implements ProductProcessParamServic
}
WQLObject wo = WQLObject.getWQLObject("MD_ME_MaterialBase");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), where, "update_time desc");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), where, "material_code");
final JSONObject json = rb.pageResult();
//产品工序工艺参数表【PDM_BI_WorkProcedureParaProduct】
@@ -219,14 +219,11 @@ public class ProductProcessParamServiceImpl implements ProductProcessParamServic
}
@Override
public void deleteAll(String ids) {
public void deleteAll(Map whereJson) {
String material_id = (String) whereJson.get("material_id");
String workprocedure_code = (String) whereJson.get("workprocedure_code");
WQLObject wo = WQLObject.getWQLObject("PDM_BI_WorkProcedureParaProduct");
JSONArray jsonArr = wo.query("material_id = '" + ids + "'").getResultJSONArray(0);
for (int i = 0; i < jsonArr.size(); i++) {
JSONObject json = jsonArr.getJSONObject(i);
wo.delete(json);
}
wo.delete("material_id = '" + material_id + "' and workprocedure_code='"+workprocedure_code+"'");
}
}

View File

@@ -93,6 +93,7 @@ public class StorattrServiceImpl implements StorattrService {
dto.setUpdate_optname(nickName);
dto.setUpdate_time(now);
dto.setCreate_time(now);
dto.setSyscompanyid(dto.getSysdeptid());
WQLObject wo = WQLObject.getWQLObject("st_ivt_bsrealstorattr");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));

View File

@@ -57,6 +57,7 @@ public class StructattrServiceImpl implements StructattrService {
map.put("stor_id", (String) whereJson.get("stor_id"));
map.put("sect_id", (String) whereJson.get("sect_id"));
map.put("sect_id", (String) whereJson.get("sect_id"));
map.put("lock", (String) whereJson.get("lock"));
map.put("lock_type", (String) whereJson.get("lock_type"));
map.put("is_used", (String) whereJson.get("is_used"));
map.put("is_delete", (String) whereJson.get("is_delete"));

View File

@@ -17,6 +17,7 @@
输入.search TYPEAS s_string
输入.stor_id TYPEAS s_string
输入.sect_id TYPEAS s_string
输入.lock TYPEAS s_string
输入.lock_type TYPEAS s_string
输入.storagevehicle_type TYPEAS s_string
输入.is_used TYPEAS s_string
@@ -84,7 +85,7 @@
OPTION 输入.is_delete <> ""
struct.is_delete = 输入.is_delete
ENDOPTION
OPTION 输入.lock_type = "00"
OPTION 输入.lock = "00"
(struct.storagevehicle_code is null or struct.storagevehicle_code = '')
ENDOPTION
ENDSELECT

View File

@@ -601,7 +601,7 @@ public class DailyplanServiceImpl implements DailyplanService {
}
}
//根据工作日和结束日期相同的天数进行更新开始日期dailyplan_id -> 1583321344530059264
//根据工作日和结束日期相同的天数进行更新开始日期
ja_new = new JSONArray();
for (int i = 0; i < ja_new2.size(); i++) {
JSONObject jo = ja_new2.getJSONObject(i);
@@ -617,28 +617,31 @@ public class DailyplanServiceImpl implements DailyplanService {
JSONObject jo = ja_new.getJSONObject(i);
String planstart_date_old = jo.getString("planstart_date");
String planstart_date = jo.getString("planstart_date");
//判断是否有同牌号同开始日期的日计划,直接更新为已经存在的日计划的开始、结束日期
if(map.containsKey(planstart_date)){
JSONObject other = map.get(planstart_date);
jo.put("planstart_date",other.getString("planstart_date"));
jo.put("planend_date",other.getString("planend_date"));
MPS_BD_ProductDailyPlan.insert(jo);
}else{
//更新开始日期为最近的一个工作日
JSONObject last_day = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "7")
.addParam("planstart_date", planstart_date)
.addParam("device_id", jo.getString("device_id"))
.process()
.uniqueResult(0);
if(last_day ==null){
throw new BadRequestException("未配置"+planstart_date+"后的工作日历!");
}
planstart_date = last_day.getString("factory_date");
int days = this.getDays(jo.getString("material_id"));
Date start_date = DateUtil.parse(planstart_date);
Date planend_date = DateUtil.offsetDay(start_date,days-1);
//判断结束日期不重复存在的一天
boolean flag = true;
while(flag){
JSONObject last_day = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "7")
.addParam("planstart_date", planstart_date)
.addParam("device_id", jo.getString("device_id"))
.process()
.uniqueResult(0);
if(last_day ==null){
throw new BadRequestException("未配置"+planstart_date+"后的工作日历!");
}
planstart_date = last_day.getString("factory_date");
int days = this.getDays(jo.getString("material_id"));
Date start_date = DateUtil.parse(planstart_date);
Date planend_date = DateUtil.offsetDay(start_date,days-1);
String str_planend_date = DateUtil.formatDate(planend_date);
JSONObject last_planend_date = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "7")
@@ -649,24 +652,23 @@ public class DailyplanServiceImpl implements DailyplanService {
if(last_planend_date == null){
throw new BadRequestException("未配置"+str_planend_date.substring(0,10)+"后的工作日历!");
}
jo.put("planend_date", last_planend_date.getString("factory_date"));
String factory_date = last_planend_date.getString("factory_date");
JSONArray lasts = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "8")
.addParam("device_id", jo.getString("device_id"))
.addParam("planend_date", jo.getString("planend_date"))
.addParam("planend_date", factory_date)
.process()
.getResultJSONArray(0);
if(lasts.size()==0){
jo.put("planend_date", factory_date);
jo.put("planstart_date",planstart_date);
map.put(planstart_date_old,jo);
MPS_BD_ProductDailyPlan.insert(jo);
flag = false;
}else{
start_date = DateUtil.offsetDay(start_date,1);
planstart_date = DateUtil.formatDate(start_date);
planend_date = DateUtil.offsetDay(planend_date,1);
}
}
}
}

View File

@@ -820,28 +820,31 @@ public class ProducetaskprocServiceImpl implements ProducetaskprocService {
JSONObject jo = ja_new.getJSONObject(i);
String planstart_date_old = jo.getString("planstart_date");
String planstart_date = jo.getString("planstart_date");
//判断是否有同牌号同开始日期的日计划,直接更新为已经存在的日计划的开始、结束日期
if(map.containsKey(planstart_date)){
JSONObject other = map.get(planstart_date);
jo.put("planstart_date",other.getString("planstart_date"));
jo.put("planend_date",other.getString("planend_date"));
MPS_BD_ProductDailyPlan.insert(jo);
}else{
//更新开始日期为最近的一个工作日
JSONObject last_day = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "7")
.addParam("planstart_date", planstart_date)
.addParam("device_id", jo.getString("device_id"))
.process()
.uniqueResult(0);
if(last_day ==null){
throw new BadRequestException("未配置"+planstart_date+"后的工作日历!");
}
planstart_date = last_day.getString("factory_date");
int days = this.getDays(jo.getString("material_id"));
Date start_date = DateUtil.parse(planstart_date);
Date planend_date = DateUtil.offsetDay(start_date,days-1);
//判断结束日期不重复存在的一天
boolean flag = true;
while(flag){
JSONObject last_day = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "7")
.addParam("planstart_date", planstart_date)
.addParam("device_id", jo.getString("device_id"))
.process()
.uniqueResult(0);
if(last_day ==null){
throw new BadRequestException("未配置"+planstart_date+"后的工作日历!");
}
planstart_date = last_day.getString("factory_date");
int days = this.getDays(jo.getString("material_id"));
Date start_date = DateUtil.parse(planstart_date);
Date planend_date = DateUtil.offsetDay(start_date,days-1);
String str_planend_date = DateUtil.formatDate(planend_date);
JSONObject last_planend_date = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "7")
@@ -852,24 +855,23 @@ public class ProducetaskprocServiceImpl implements ProducetaskprocService {
if(last_planend_date == null){
throw new BadRequestException("未配置"+str_planend_date.substring(0,10)+"后的工作日历!");
}
jo.put("planend_date", last_planend_date.getString("factory_date"));
String factory_date = last_planend_date.getString("factory_date");
JSONArray lasts = WQL.getWO("QPDM_PRODUCTPLANPROC")
.addParam("flag", "8")
.addParam("device_id", jo.getString("device_id"))
.addParam("planend_date", jo.getString("planend_date"))
.addParam("planend_date", factory_date)
.process()
.getResultJSONArray(0);
if(lasts.size()==0){
jo.put("planend_date", factory_date);
jo.put("planstart_date",planstart_date);
map.put(planstart_date_old,jo);
MPS_BD_ProductDailyPlan.insert(jo);
flag = false;
}else{
start_date = DateUtil.offsetDay(start_date,1);
planstart_date = DateUtil.formatDate(start_date);
planend_date = DateUtil.offsetDay(planend_date,1);
}
}
}
}
});

View File

@@ -48,8 +48,12 @@ public class ProductprocessrouteServiceImpl implements ProductprocessrouteServic
if (StrUtil.isNotEmpty(material_code)) {
map.put("material_code", "%" + material_code + "%");
}
String processroute_code = MapUtil.getStr(whereJson, "processroute_code");
if (StrUtil.isNotEmpty(processroute_code)) {
map.put("processroute_code", "%" + processroute_code + "%");
}
JSONObject jo = WQL.getWO("QPDM_BI_PRODUCTROUTE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time desc");
JSONObject jo = WQL.getWO("QPDM_BI_PRODUCTROUTE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_code");
return jo;
}

View File

@@ -103,9 +103,9 @@
WHERE
pp.is_delete = '0'
OPTION 输入.processroute_code <> ""
(pp.processroute_code = 输入.processroute_code
(pp.processroute_code like 输入.processroute_code
OR
pp.processroute_name = 输入.processroute_code
pp.processroute_name like 输入.processroute_code
)
ENDOPTION
OPTION 输入.productprocess_status <> ""

View File

@@ -272,7 +272,7 @@
ProductDailyPlan.device_id = 输入.device_id
ENDOPTION
OPTION 输入.planend_date <> ""
ProductDailyPlan.planend_date >= 输入.planend_date
ProductDailyPlan.planend_date = 输入.planend_date
ENDOPTION
ENDSELECT
ENDQUERY

View File

@@ -53,7 +53,7 @@ public class FormingmaterialServiceImpl implements FormingmaterialService {
map.put("classIds", classIds);
}
JSONObject json = WQL.getWO("QMD_FORMING01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time DESC");
JSONObject json = WQL.getWO("QMD_FORMING01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "formingtype_code");
return json;
}

View File

@@ -55,7 +55,7 @@ public class ProductbomServiceImpl implements ProductbomService {
map.put("flag", "1");
map.put("old_mark", old_mark);
map.put("is_used", is_used);
JSONObject json = WQL.getWO("QMD_PD_PRODUCTBOM01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bom.update_time desc");
JSONObject json = WQL.getWO("QMD_PD_PRODUCTBOM01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bom.material_code");
return json;
}

View File

@@ -56,7 +56,7 @@ public class ProductmaterialsetServiceImpl implements ProductmaterialsetService
}
map.put("set_type", set_type);
JSONObject json = WQL.getWO("QPD_PD_PRODUCTMATERIALSET01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mater.update_time desc");
JSONObject json = WQL.getWO("QPD_PD_PRODUCTMATERIALSET01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mater.material_code");
return json;
}

View File

@@ -39,6 +39,7 @@ public class PointServiceImpl implements PointService {
map.put("flag", "1");
map.put("area_type", whereJson.get("area_type"));
map.put("ids", whereJson.get("ids"));
map.put("lock", (String) whereJson.get("lock"));
map.put("lock_type", whereJson.get("lock_type"));
map.put("point_status", whereJson.get("point_status"));
map.put("is_used", whereJson.get("is_used"));

View File

@@ -16,6 +16,7 @@
输入.flag TYPEAS s_string
输入.area_type TYPEAS s_string
输入.lock_type TYPEAS s_string
输入.lock TYPEAS s_string
输入.name TYPEAS s_string
输入.point_type TYPEAS s_string
输入.point_status TYPEAS s_string
@@ -94,6 +95,9 @@
OPTION 输入.lock_type <> ""
point.lock_type = 输入.lock_type
ENDOPTION
OPTION 输入.lock = "00"
(point.vehicle_code is null or point.vehicle_code = '')
ENDOPTION
OPTION 输入.point_status <> ""
point.point_status = 输入.point_status
ENDOPTION