Merge branch 'master' of http://121.40.234.130:8899/root/wuHanXinRui
This commit is contained in:
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -62,6 +62,7 @@ public class InspectionsheetmstServiceImpl implements InspectionsheetmstService
|
||||
map.put("flag", "1");
|
||||
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
|
||||
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
|
||||
map.put("is_pass", MapUtil.getStr(whereJson, "is_pass"));
|
||||
String inspection_code = MapUtil.getStr(whereJson, "inspection_code");
|
||||
String material_code = MapUtil.getStr(whereJson, "material_code");
|
||||
String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.bill_status TYPEAS s_string
|
||||
输入.inspection_id TYPEAS s_string
|
||||
输入.is_pass TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -95,6 +96,10 @@
|
||||
mst.bill_status = 输入.bill_status
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.is_pass <> ""
|
||||
dtl.result = 输入.is_pass
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
Binary file not shown.
@@ -60,6 +60,7 @@ public class AutoCreateUpkeep {
|
||||
param.put("plan_start_date",jsonPlanMst.getString("plan_start_date"));
|
||||
param.put("source_bill_id",jsonPlanMst.getString("maint_plan_id"));
|
||||
param.put("source_bill_code",jsonPlanMst.getString("maint_plan_code"));
|
||||
param.put("maint_object",jsonPlanMst.getString("maint_object"));
|
||||
|
||||
// 计算 当前日期 - 保养计划日期 后的天数
|
||||
String num = String.valueOf(NumberUtil.sub(today, plan_start_date));
|
||||
@@ -96,6 +97,8 @@ public class AutoCreateUpkeep {
|
||||
param.put("plan_start_date",jsonPlanMst.getString("plan_start_date"));
|
||||
param.put("source_bill_id",jsonPlanMst.getString("maint_plan_id"));
|
||||
param.put("source_bill_code",jsonPlanMst.getString("maint_plan_code"));
|
||||
param.put("maint_object",jsonPlanMst.getString("maint_object"));
|
||||
|
||||
// 计算 当前日期 - 保养实际结束 后的天数
|
||||
String num = String.valueOf(NumberUtil.sub(today, rep_real_end_date));
|
||||
|
||||
@@ -152,6 +155,7 @@ public class AutoCreateUpkeep {
|
||||
jsonMainMst.put("maintenancecycle",json.getString("maintenancecycle"));
|
||||
jsonMainMst.put("invstatus","01");
|
||||
jsonMainMst.put("plan_start_date",json.getString("plan_start_date"));
|
||||
jsonMainMst.put("maint_object",json.getString("maint_object"));
|
||||
jsonMainMst.put("detail_count",planDtlArr.size());
|
||||
jsonMainMst.put("source_bill_id",json.get("source_bill_id"));
|
||||
jsonMainMst.put("source_bill_type","BYJH");
|
||||
|
||||
@@ -93,7 +93,7 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
||||
json.put("dept_name_jm", "0");
|
||||
}
|
||||
// 当前日期
|
||||
json.put("device_date", run_date);
|
||||
json.put("device_date", run_date.substring(5, 10));
|
||||
|
||||
resultArr.add(json);
|
||||
}
|
||||
@@ -298,8 +298,13 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
||||
jsonObject.put("not_num", jsonObject.getString("need_num"));
|
||||
|
||||
// 完成率:已保养台数/需保养台数
|
||||
String div = NumberUtil.div(jsonObject.getShort("end_num"), jsonObject.getShort("need_num")).toString();
|
||||
jsonObject.put("confirm_rate", NumberUtil.round(NumberUtil.mul(div, "100"), 2));
|
||||
try {
|
||||
String div = NumberUtil.div(jsonObject.getShort("end_num"), jsonObject.getShort("need_num")).toString();
|
||||
jsonObject.put("confirm_rate", NumberUtil.round(NumberUtil.mul(div, "100"), 2));
|
||||
} catch (Exception e) {
|
||||
jsonObject.put("confirm_rate", "0.0");
|
||||
}
|
||||
|
||||
|
||||
resultArr.add(jsonObject);
|
||||
}
|
||||
@@ -418,12 +423,17 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
||||
String one_all_time = "0"; // 一台设备30天的维修时间
|
||||
JSONArray jsonReArr = WQL.getWO("EM_DEVICEBIGSCREEN_03").addParamMap(map).process().getResultJSONArray(0);
|
||||
for (int k = 0; k < jsonReArr.size(); k++) {
|
||||
JSONObject jsonObject = jsonReArr.getJSONObject(k);
|
||||
Object o = jsonReArr.get(k);
|
||||
JSONObject jsonObject = JSONObject.parseObject(o.toString());
|
||||
|
||||
Date date_finish_time = DateUtil.parse(jsonObject.getString("finish_time")); // 报修完成时间
|
||||
Date date_create_time = DateUtil.parse(jsonObject.getString("create_time")); // 报修时间
|
||||
// 一台设备一天的维修时间
|
||||
long one_day_time = DateUtil.between(date_create_time, date_finish_time, DateUnit.HOUR, false);
|
||||
long one_day_time = 0;
|
||||
try {
|
||||
one_day_time = DateUtil.between(date_create_time, date_finish_time, DateUnit.HOUR, false);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
one_all_time = NumberUtil.add(one_all_time,String.valueOf(one_day_time)).toString();
|
||||
}
|
||||
|
||||
@@ -66,6 +66,14 @@ public class DevicerepairmstController {
|
||||
return new ResponseEntity<>(devicerepairmstService.query4(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/query5")
|
||||
@Log("查询维修单维护5")
|
||||
@ApiOperation("查询维修单维护5")
|
||||
//@PreAuthorize("@el.check('devicerepairmst:list')")
|
||||
public ResponseEntity<Object> query5(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(devicerepairmstService.query5(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/queryBom")
|
||||
@Log("查询备件bom")
|
||||
@ApiOperation("查询备件bom")
|
||||
|
||||
@@ -202,4 +202,13 @@ public interface DevicerepairmstService {
|
||||
*/
|
||||
Map<String, Object> query4(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> query5(Map whereJson, Pageable page);
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.security.service.dto.JwtUserDto;
|
||||
import org.nl.modules.system.service.DeptService;
|
||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
@@ -364,6 +365,9 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
||||
jsonObject.put("measure", measure);
|
||||
recordTab.insert(jsonObject);
|
||||
|
||||
// 保存明细
|
||||
this.submitRepair(whereJson);
|
||||
|
||||
// 1.判断维修单明细中是否完成 都为是,不是则报错
|
||||
JSONArray reDtlArr = reDtlTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isEmpty(reDtlArr)) throw new BadRequestException("明细为空");
|
||||
@@ -549,6 +553,7 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
||||
|
||||
JSONObject jsonMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
||||
jsonMst.put("invstatus", "05");
|
||||
jsonMst.put("outsourceback_remark", whereJson.getString("outsourceback_remark"));
|
||||
jsonMst.put("outsourceback_optid", currentUserId);
|
||||
jsonMst.put("outsourceback_optname", nickName);
|
||||
jsonMst.put("outsourceback_time", DateUtil.now());
|
||||
@@ -991,4 +996,44 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> query5(Map whereJson, Pageable page) {
|
||||
DeptService deptService = SpringContextHolder.getBean(DeptService.class);
|
||||
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
String repair_code = MapUtil.getStr(whereJson, "repair_code");
|
||||
String maintenancecycle = MapUtil.getStr(whereJson, "maintenancecycle");
|
||||
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||
String class_idStr = (String) whereJson.get("class_idStr");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "9");
|
||||
map.put("maintenancecycle",maintenancecycle);
|
||||
map.put("invstatus",invstatus);
|
||||
map.put("begin_time",begin_time);
|
||||
map.put("end_time",end_time);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||
if (ObjectUtil.isNotEmpty(repair_code)) map.put("repair_code","%"+repair_code+"%");
|
||||
//处理物料当前节点的所有子节点
|
||||
if (!StrUtil.isEmpty(material_type_id)) {
|
||||
map.put("material_type_id", material_type_id);
|
||||
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||
map.put("classIds", classIds);
|
||||
} else if (ObjectUtil.isNotEmpty(class_idStr)) {
|
||||
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
// 归属部门
|
||||
String dept_id = MapUtil.getStr(whereJson, "dept_id");
|
||||
if (!StrUtil.isEmpty(dept_id)) {
|
||||
String deptIds = deptService.getChildIdStr(Long.parseLong(dept_id));
|
||||
map.put("deptIds", deptIds);
|
||||
}
|
||||
JSONObject json = WQL.getWO("EM_BI_DEVICEREPAIR001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||
String repair_type = MapUtil.getStr(whereJson, "repair_type");
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
String maintenancecycle = MapUtil.getStr(whereJson, "maintenancecycle");
|
||||
String repair_plan_code = MapUtil.getStr(whereJson, "repair_plan_code");
|
||||
@@ -62,6 +63,7 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
||||
map.put("is_active", is_active);
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
map.put("repair_type", repair_type);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||
if (ObjectUtil.isNotEmpty(repair_plan_code)) map.put("repair_plan_code","%"+repair_plan_code+"%");
|
||||
//处理物料当前节点的所有子节点
|
||||
@@ -128,6 +130,7 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
||||
jsonMst.put("repair_plan_name",whereJson.getString("repair_plan_name"));
|
||||
jsonMst.put("devicerecord_id",whereJson.get("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle",whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("repair_type",whereJson.getString("repair_type"));
|
||||
jsonMst.put("plan_start_date",whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("detail_count",tableData.size());
|
||||
jsonMst.put("create_id",currentUserId);
|
||||
@@ -169,6 +172,7 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
||||
jsonMst.put("repair_plan_name",whereJson.getString("repair_plan_name"));
|
||||
jsonMst.put("devicerecord_id",whereJson.get("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle",whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("repair_type",whereJson.getString("repair_type"));
|
||||
jsonMst.put("plan_start_date",whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("detail_count",tableData.size());
|
||||
jsonMst.put("update_optid",currentUserId);
|
||||
@@ -268,6 +272,7 @@ public class DevicerepairplanmstServiceImpl implements DevicerepairplanmstServic
|
||||
jsonMst.put("repair_plan_name",whereJson.getString("repair_plan_name"));
|
||||
jsonMst.put("devicerecord_id",whereJson.get("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle",whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("repair_type",whereJson.getString("repair_type"));
|
||||
jsonMst.put("plan_start_date",whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("detail_count",tableData.size());
|
||||
jsonMst.put("create_id",currentUserId);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
输入.sparepart_only_id TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.devicerecord_id TYPEAS s_string
|
||||
输入.deptIds TYPEAS f_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -372,6 +373,65 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "9"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
mst.*,
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceRepairMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.invstatus = '06'
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.repair_code <> ""
|
||||
(mst.repair_code like 输入.repair_code or
|
||||
mst.repair_code like 输入.repair_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.invstatus <> ""
|
||||
mst.invstatus = 输入.invstatus
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maintenancecycle <> ""
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.deptIds <> ""
|
||||
d2.dept_id in 输入.deptIds
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
输入.is_active TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.repair_type TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -80,6 +81,10 @@
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.repair_type <> ""
|
||||
mst.repair_type = 输入.repair_type
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.is_active <> ""
|
||||
mst.is_active = 输入.is_active
|
||||
ENDOPTION
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND ISNULL(MST.is_passed)
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
|
||||
@@ -66,4 +66,13 @@ public class DevicerunrecordController {
|
||||
devicerunrecordService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/submit")
|
||||
@Log("填报")
|
||||
@ApiOperation("填报")
|
||||
public ResponseEntity<Object> submit(@RequestBody JSONObject whereJson) {
|
||||
devicerunrecordService.submit(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,4 +71,12 @@ public interface DevicerunrecordService {
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 填报
|
||||
*
|
||||
* @param whereJson /
|
||||
*/
|
||||
void submit(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
package org.nl.wms.sb.run.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.system.service.DeptService;
|
||||
import org.nl.utils.PageUtil;
|
||||
import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||
import org.nl.wms.sb.run.service.DevicerunrecordService;
|
||||
import org.nl.wms.sb.run.service.dto.DevicerunrecordDto;
|
||||
@@ -18,9 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
@@ -46,16 +48,16 @@ public class DevicerunrecordServiceImpl implements DevicerunrecordService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
DeptService deptService = SpringContextHolder.getBean(DeptService.class);
|
||||
|
||||
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||
String class_idStr = MapUtil.getStr(whereJson, "class_idStr");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time").substring(0,10);
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time").substring(0,10);
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
map.put("flag", "2");
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||
//处理物料当前节点的所有子节点
|
||||
if (!StrUtil.isEmpty(material_type_id)) {
|
||||
@@ -66,7 +68,40 @@ public class DevicerunrecordServiceImpl implements DevicerunrecordService {
|
||||
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
JSONObject json = WQL.getWO("EM_DEVICERUNRECORD001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "file.device_code ASC,run.run_date ASC");
|
||||
// 归属部门
|
||||
String dept_id = MapUtil.getStr(whereJson, "dept_id");
|
||||
if (!StrUtil.isEmpty(dept_id)) {
|
||||
String deptIds = deptService.getChildIdStr(Long.parseLong(dept_id));
|
||||
map.put("deptIds", deptIds);
|
||||
}
|
||||
|
||||
ArrayList<Object> objects = new ArrayList<>();
|
||||
|
||||
Date begin_date = DateUtil.parse(begin_time);
|
||||
Date end_date = DateUtil.parse(end_time);
|
||||
long betweenDay = DateUtil.between(begin_date, end_date, DateUnit.DAY);
|
||||
|
||||
if (betweenDay == 0) {
|
||||
// 如果是某天则直接查
|
||||
map.put("run_date", begin_time);
|
||||
JSONArray arr = WQL.getWO("EM_DEVICERUNRECORD001").addParamMap(map).process().getResultJSONArray(0);
|
||||
objects.addAll(arr);
|
||||
} else {
|
||||
// 如果不是则根据日期递增循环查出 然后合并
|
||||
for (int i = 0; i <= betweenDay; i++) {
|
||||
String day_time = DateUtil.offsetDay(begin_date, i).toString().substring(0,10);
|
||||
map.put("run_date",day_time);
|
||||
JSONArray arr = WQL.getWO("EM_DEVICERUNRECORD001").addParamMap(map).process().getResultJSONArray(0);
|
||||
objects.addAll(arr);
|
||||
}
|
||||
}
|
||||
|
||||
// 组织分页查询并返回
|
||||
Map<String, Object> json = PageUtil.toPage(
|
||||
PageUtil.toPage(page.getPageNumber(), page.getPageSize(), objects),
|
||||
objects.size()
|
||||
);
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -158,6 +193,12 @@ public class DevicerunrecordServiceImpl implements DevicerunrecordService {
|
||||
public void update(JSONObject whereJson) {
|
||||
WQLObject tab = WQLObject.getWQLObject("EM_BI_DeviceRunRecord");
|
||||
String devicerecord_id = whereJson.getString("devicerecord_id");
|
||||
String runrecord_id = whereJson.getString("runrecord_id");
|
||||
|
||||
JSONObject jsonObject = tab.query("runrecord_id = '" + runrecord_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(jsonObject)) {
|
||||
throw new BadRequestException("请先填报");
|
||||
}
|
||||
|
||||
JSONObject jsonFile = WQLObject.getWQLObject("EM_BI_EquipmentFile").query("devicerecord_id = '" + devicerecord_id + "'").uniqueResult(0);
|
||||
|
||||
@@ -203,4 +244,59 @@ public class DevicerunrecordServiceImpl implements DevicerunrecordService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void submit(JSONObject whereJson) {
|
||||
WQLObject tab = WQLObject.getWQLObject("EM_BI_DeviceRunRecord");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
String devicerecord_id = whereJson.getString("devicerecord_id");
|
||||
String run_date = whereJson.getString("run_date");
|
||||
|
||||
JSONObject jsonFile = WQLObject.getWQLObject("EM_BI_EquipmentFile").query("devicerecord_id = '" + devicerecord_id + "'").uniqueResult(0);
|
||||
String status = jsonFile.getString("status");
|
||||
if (!"10,11,20,30,40".contains(status)) {
|
||||
throw new BadRequestException("此设备不能填报");
|
||||
}
|
||||
|
||||
double run_times = whereJson.getDoubleValue("run_times"); //生产时间
|
||||
double prepare_times = whereJson.getDoubleValue("prepare_times");//准备时间
|
||||
double error_times = whereJson.getDoubleValue("error_times"); //故障时间
|
||||
double adjust_times = whereJson.getDoubleValue("adjust_times"); //工装调整时间
|
||||
double product_qty = whereJson.getDoubleValue("product_qty"); //生产总量
|
||||
double nok_qty = whereJson.getDoubleValue("nok_qty"); //不合格数
|
||||
double theory_beat = jsonFile.getDoubleValue("theory_beat"); // 理论节拍
|
||||
|
||||
JSONObject jsonMst = tab.query("devicerecord_id = '" + devicerecord_id + "' and run_date = '" + run_date + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonMst)) throw new BadRequestException("填报信息已存在");
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("runrecord_id", IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("devicerecord_id", whereJson.get("devicerecord_id"));
|
||||
json.put("run_date", whereJson.getString("run_date"));
|
||||
json.put("run_times", whereJson.get("run_times"));
|
||||
json.put("prepare_times", whereJson.get("prepare_times"));
|
||||
json.put("error_times", whereJson.get("error_times"));
|
||||
json.put("adjust_times", whereJson.get("adjust_times"));
|
||||
json.put("product_qty", whereJson.get("product_qty"));
|
||||
json.put("nok_qty", whereJson.get("nok_qty"));
|
||||
json.put("remark", whereJson.getString("remark"));
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", nickName);
|
||||
json.put("create_time", now);
|
||||
// 计算OEE指标
|
||||
try {
|
||||
BigDecimal div = NumberUtil.div(NumberUtil.sub(run_times, prepare_times, error_times, adjust_times), NumberUtil.sub(run_times, prepare_times, adjust_times));
|
||||
BigDecimal div1 = NumberUtil.div(NumberUtil.mul(div, theory_beat, product_qty), NumberUtil.sub(run_times, prepare_times, error_times, adjust_times));
|
||||
BigDecimal oee_value = NumberUtil.mul(div1, NumberUtil.div(NumberUtil.sub(product_qty, nok_qty), product_qty));
|
||||
json.put("oee_value", oee_value);
|
||||
} catch (Exception e) {
|
||||
json.put("oee_value", 0);
|
||||
}
|
||||
tab.insert(json);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
输入.device_code TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.run_date TYPEAS s_string
|
||||
输入.deptIds TYPEAS f_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -77,5 +79,52 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
file.devicerecord_id,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
class.class_name,
|
||||
输入.run_date AS run_date,
|
||||
run.runrecord_id,
|
||||
run.run_times,
|
||||
run.prepare_times,
|
||||
run.error_times,
|
||||
run.adjust_times,
|
||||
run.product_qty,
|
||||
run.nok_qty,
|
||||
run.oee_value,
|
||||
run.remark,
|
||||
run.create_name,
|
||||
run.create_time,
|
||||
d1.name AS dept_name
|
||||
FROM
|
||||
EM_BI_EquipmentFile file
|
||||
LEFT JOIN EM_BI_DeviceRunRecord run ON file.devicerecord_id = run.devicerecord_id AND 输入.run_date = run.run_date
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.use_groupid = d1.dept_id
|
||||
WHERE
|
||||
file.is_delete = '0'
|
||||
AND file.status not in ('90','91')
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.deptIds <> ""
|
||||
d1.dept_id in 输入.deptIds
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -75,14 +75,43 @@ public class DevicefaultcaeServiceImpl implements DevicefaultcaeService {
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("EM_DEVICEFAULTCAE01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "re.devicerecord_id DESC");
|
||||
// 处理平均故障间隔时间 && 平均故障修复时间
|
||||
WQLObject tab = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest");
|
||||
/* // 处理平均故障间隔时间 && 平均故障修复时间
|
||||
WQLObject tab = WQLObject.getWQLObject("EM_BI_DeviceRepairRequest");*/
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jsonObject = content.getJSONObject(i);
|
||||
String devicerecord_id = jsonObject.getString("devicerecord_id");
|
||||
JSONArray arr = tab.query("devicerecord_id = '" + devicerecord_id + "' and is_delete = '0'").getResultJSONArray(0);
|
||||
/*
|
||||
* 平均故障间隔时间:运行时间/故障次数(运行时间查运行记录表,故障次数查报修单)
|
||||
* 平均故障修复时间:故障时间/故障次数(故障时间查运行记录表)
|
||||
*/
|
||||
// 根据此设备查询运行记录表计算 运行时间和故障时间
|
||||
map.put("flag", "4");
|
||||
map.put("devicerecord_id", devicerecord_id);
|
||||
JSONObject runAndErr_time = WQL.getWO("EM_DEVICEFAULTCAE01").addParamMap(map).process().uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(runAndErr_time)) {
|
||||
String run_times = runAndErr_time.getString("run_times"); // 运行时间
|
||||
String error_times = runAndErr_time.getString("error_times"); // 故障时间时间
|
||||
String error_num = jsonObject.getString("nunm"); // 故障次数
|
||||
|
||||
try {
|
||||
// 计算平均故障间隔时间
|
||||
String avgVal_time = NumberUtil.div(NumberUtil.div(run_times, error_num).toString(), "60").toString();
|
||||
jsonObject.put("avgVal_time",NumberUtil.round(avgVal_time,2).toString());
|
||||
} catch (Exception e) {
|
||||
jsonObject.put("avgVal_time","0");
|
||||
}
|
||||
|
||||
try {
|
||||
// 平均故障修复时间
|
||||
String avgRep_time = NumberUtil.div(NumberUtil.div(error_times, error_num).toString(), "60").toString();
|
||||
jsonObject.put("avgRep_time",NumberUtil.round(avgRep_time,2).toString());
|
||||
} catch (Exception e) {
|
||||
jsonObject.put("avgRep_time","0");
|
||||
}
|
||||
}
|
||||
/*JSONArray arr = tab.query("devicerecord_id = '" + devicerecord_id + "' and is_delete = '0'").getResultJSONArray(0);
|
||||
// 计算平均故障修复时间
|
||||
String nunm = jsonObject.getString("nunm");
|
||||
String create_time_all = "0";
|
||||
@@ -114,7 +143,7 @@ public class DevicefaultcaeServiceImpl implements DevicefaultcaeService {
|
||||
|
||||
BigDecimal add = NumberUtil.add(NumberUtil.sub(re_end_time, re_begin_time).toString(), "1");
|
||||
BigDecimal avgVal_time = NumberUtil.div(NumberUtil.mul(add, 24).toString(), nunm);
|
||||
jsonObject.put("avgVal_time",avgVal_time.toString());
|
||||
jsonObject.put("avgVal_time",avgVal_time.toString());*/
|
||||
}
|
||||
json.put("content",content);
|
||||
return json;
|
||||
|
||||
@@ -144,6 +144,34 @@
|
||||
WHERE
|
||||
is_delete = '0'
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "4"
|
||||
QUERY
|
||||
SELECT
|
||||
SUM(re.run_times) AS run_times,
|
||||
SUM(re.error_times) AS error_times
|
||||
FROM
|
||||
EM_BI_DeviceRunRecord re
|
||||
WHERE
|
||||
1=1
|
||||
|
||||
OPTION 输入.devicerecord_id <> ""
|
||||
re.devicerecord_id = 输入.devicerecord_id
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
re.run_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
re.run_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
group by re.devicerecord_id
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
@@ -340,6 +340,7 @@
|
||||
WHEN '99' THEN '审核完毕'
|
||||
END
|
||||
)
|
||||
ELSE '报修'
|
||||
END
|
||||
) AS invstatus,
|
||||
mst.real_start_date,
|
||||
@@ -367,8 +368,6 @@
|
||||
WHERE
|
||||
st.is_delete = '0'
|
||||
AND (st.status <> '99')
|
||||
AND mst.source_bill_type = 'BXD'
|
||||
AND st.is_passed = '1'
|
||||
|
||||
UNION
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ public class DevicemaintenancemstController {
|
||||
private final DevicemaintenancemstService devicemaintenancemstService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询设备保养单")
|
||||
@ApiOperation("查询设备保养单")
|
||||
@Log("查询设备保养单(维修班)")
|
||||
@ApiOperation("查询设备保养单(维修班)")
|
||||
//@PreAuthorize("@el.check('devicemaintenancemst:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(devicemaintenancemstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
@@ -52,13 +52,29 @@ public class DevicemaintenancemstController {
|
||||
|
||||
|
||||
@GetMapping("query3")
|
||||
@Log("查询设备保养单")
|
||||
@ApiOperation("查询设备保养单")
|
||||
@Log("查询设备保养单填报(维修班)")
|
||||
@ApiOperation("查询设备保养单填报(维修班)")
|
||||
//@PreAuthorize("@el.check('devicemaintenancemst:list')")
|
||||
public ResponseEntity<Object> query3(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(devicemaintenancemstService.query3(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("query4")
|
||||
@Log("查询设备保养单(班组)")
|
||||
@ApiOperation("查询设备保养单(班组)")
|
||||
//@PreAuthorize("@el.check('devicemaintenancemst:list')")
|
||||
public ResponseEntity<Object> query4(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(devicemaintenancemstService.query4(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("query5")
|
||||
@Log("查询设备保养单填报(班组)")
|
||||
@ApiOperation("查询设备保养单填报(班组)")
|
||||
//@PreAuthorize("@el.check('devicemaintenancemst:list')")
|
||||
public ResponseEntity<Object> query5(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(devicemaintenancemstService.query5(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增设备保养单")
|
||||
@ApiOperation("新增设备保养单")
|
||||
|
||||
@@ -146,4 +146,22 @@ public interface DevicemaintenancemstService {
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> query3(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> query4(Map whereJson, Pageable page);
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @param page 分页参数
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> query5(Map whereJson, Pageable page);
|
||||
}
|
||||
|
||||
@@ -169,6 +169,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
jsonMst.put("maintenancecycle", whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("invstatus", "01");
|
||||
jsonMst.put("plan_start_date", whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("maint_object", whereJson.getString("maint_object"));
|
||||
jsonMst.put("detail_count", tableData.size());
|
||||
jsonMst.put("input_optid", currentUserId);
|
||||
jsonMst.put("input_optname", nickName);
|
||||
@@ -203,6 +204,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
jsonMst.put("devicerecord_id", whereJson.get("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle", whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("plan_start_date", whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("maint_object", whereJson.getString("maint_object"));
|
||||
jsonMst.put("detail_count", tableData.size());
|
||||
mstTab.update(jsonMst);
|
||||
|
||||
@@ -270,6 +272,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
// 更新保养单主表
|
||||
JSONObject jsonMainMst = mainMstTab.query("maint_id = '" + whereJson.getString("maint_id") + "'").uniqueResult(0);
|
||||
jsonMainMst.put("invstatus", "03");
|
||||
jsonMainMst.put("update_optname",whereJson.getString("update_optname") );
|
||||
jsonMainMst.put("real_start_date", DateUtil.now());
|
||||
mainMstTab.update(jsonMainMst);
|
||||
|
||||
@@ -318,6 +321,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
WQLObject lifeTab = WQLObject.getWQLObject("EM_BI_DeviceLifeCycle"); // 设备声明周期表
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("EM_BI_DeviceMaintenanceDtl");
|
||||
|
||||
this.submitMain(whereJson);
|
||||
|
||||
// 1.明细中的是否完成 :必须为全部完成
|
||||
JSONArray dtlArr = dtlTab.query("maint_id = '" + maint_id + "'").getResultJSONArray(0);
|
||||
@@ -529,6 +533,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
String maint_object = MapUtil.getStr(whereJson, "maint_object");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "4");
|
||||
@@ -536,6 +541,39 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
map.put("invstatus", invstatus);
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
map.put("maint_object", maint_object);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
||||
//处理物料当前节点的所有子节点
|
||||
if (!StrUtil.isEmpty(material_type_id)) {
|
||||
map.put("material_type_id", material_type_id);
|
||||
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||
map.put("classIds", classIds);
|
||||
} else if (ObjectUtil.isNotEmpty(class_idStr)) {
|
||||
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
JSONObject json = WQL.getWO("EM_BIDEVICEMAINTENANCE001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "input_time DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> query4(Map whereJson, Pageable page) {
|
||||
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||
String class_idStr = MapUtil.getStr(whereJson, "class_idStr");
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
String maintenancecycle = MapUtil.getStr(whereJson, "maintenancecycle");
|
||||
String maint_code = MapUtil.getStr(whereJson, "maint_code");
|
||||
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "5");
|
||||
map.put("maintenancecycle", maintenancecycle);
|
||||
map.put("invstatus", invstatus);
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
||||
//处理物料当前节点的所有子节点
|
||||
@@ -551,4 +589,38 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> query5(Map whereJson, Pageable page) {
|
||||
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||
String class_idStr = MapUtil.getStr(whereJson, "class_idStr");
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
String maintenancecycle = MapUtil.getStr(whereJson, "maintenancecycle");
|
||||
String maint_code = MapUtil.getStr(whereJson, "maint_code");
|
||||
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
String maint_object = MapUtil.getStr(whereJson, "maint_object");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("flag", "6");
|
||||
map.put("maintenancecycle", maintenancecycle);
|
||||
map.put("invstatus", invstatus);
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
map.put("maint_object", maint_object);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
||||
//处理物料当前节点的所有子节点
|
||||
if (!StrUtil.isEmpty(material_type_id)) {
|
||||
map.put("material_type_id", material_type_id);
|
||||
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||
map.put("classIds", classIds);
|
||||
} else if (ObjectUtil.isNotEmpty(class_idStr)) {
|
||||
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||
map.put("classIds", classIds);
|
||||
}
|
||||
JSONObject json = WQL.getWO("EM_BIDEVICEMAINTENANCE001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "input_time DESC");
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
String is_active = MapUtil.getStr(whereJson, "is_active");
|
||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
String maint_object = MapUtil.getStr(whereJson, "maint_object");
|
||||
String class_idStr = (String) whereJson.get("class_idStr");
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
@@ -64,6 +65,7 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
map.put("is_active", is_active);
|
||||
map.put("begin_time", begin_time);
|
||||
map.put("end_time", end_time);
|
||||
map.put("maint_object", maint_object);
|
||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||
if (ObjectUtil.isNotEmpty(maint_plan_code)) map.put("maint_plan_code","%"+maint_plan_code+"%");
|
||||
//处理物料当前节点的所有子节点
|
||||
@@ -132,6 +134,7 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
jsonMst.put("devicerecord_id", whereJson.getString("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle", whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("plan_start_date", whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("maint_object", whereJson.getString("maint_object"));
|
||||
jsonMst.put("detail_count", tableData.size());
|
||||
jsonMst.put("create_id", currentUserId);
|
||||
jsonMst.put("create_name", nickName);
|
||||
@@ -174,6 +177,7 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
jsonMst.put("devicerecord_id", whereJson.getString("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle", whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("plan_start_date", whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("maint_object", whereJson.getString("maint_object"));
|
||||
jsonMst.put("detail_count", tableData.size());
|
||||
jsonMst.put("update_optid", currentUserId);
|
||||
jsonMst.put("update_optname", nickName);
|
||||
@@ -268,9 +272,12 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
|
||||
// 获取当前登陆用户
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String dept_str = deptService.getChildIdStr(currentUserId);
|
||||
if (ObjectUtil.isNotEmpty(dept_str)) {
|
||||
map.put("dept_str",dept_str);
|
||||
JSONObject jsonUser = WQLObject.getWQLObject("sys_user").query("user_id = '" + currentUserId + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonUser)) {
|
||||
String dept_str = deptService.getChildIdStr(jsonUser.getLong("dept_id"));
|
||||
if (ObjectUtil.isNotEmpty(dept_str)) {
|
||||
map.put("dept_str",dept_str);
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject json = WQL.getWO("EM_BIDEVICEMAINTENANCEPLAN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "file.update_time DESC");
|
||||
@@ -331,6 +338,7 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
||||
jsonMst.put("devicerecord_id", whereJson.getString("devicerecord_id"));
|
||||
jsonMst.put("maintenancecycle", whereJson.getString("maintenancecycle"));
|
||||
jsonMst.put("plan_start_date", whereJson.getString("plan_start_date"));
|
||||
jsonMst.put("maint_object", whereJson.getString("maint_object"));
|
||||
jsonMst.put("detail_count", tableData.size());
|
||||
jsonMst.put("create_id", currentUserId);
|
||||
jsonMst.put("create_name", nickName);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
输入.invstatus TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.maint_object TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -65,6 +66,7 @@
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.maint_object = '02'
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
@@ -193,6 +195,7 @@
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.maint_object = '02'
|
||||
AND mst.invstatus not in ('01')
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
@@ -213,6 +216,237 @@
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_object <> ""
|
||||
mst.maint_object = 输入.maint_object
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.invstatus <> ""
|
||||
mst.invstatus = 输入.invstatus
|
||||
ENDOPTION
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
mst.*,
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceMaintenanceMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.maint_object = '01'
|
||||
AND mst.invstatus in ('04')
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_code <> ""
|
||||
(mst.maint_code like 输入.maint_code or
|
||||
mst.maint_code like 输入.maint_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maintenancecycle <> ""
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_object <> ""
|
||||
mst.maint_object = 输入.maint_object
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.invstatus <> ""
|
||||
mst.invstatus = 输入.invstatus
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "5"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
mst.*,
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceMaintenanceMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.maint_object = '01'
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_code <> ""
|
||||
(mst.maint_code like 输入.maint_code or
|
||||
mst.maint_code like 输入.maint_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maintenancecycle <> ""
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.invstatus <> ""
|
||||
mst.invstatus = 输入.invstatus
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "6"
|
||||
PAGEQUERY
|
||||
SELECT
|
||||
mst.*,
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceMaintenanceMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.maint_object = '01'
|
||||
AND mst.invstatus not in ('01')
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_code <> ""
|
||||
(mst.maint_code like 输入.maint_code or
|
||||
mst.maint_code like 输入.maint_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maintenancecycle <> ""
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_object <> ""
|
||||
mst.maint_object = 输入.maint_object
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.end_time <> ""
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.invstatus <> ""
|
||||
mst.invstatus = 输入.invstatus
|
||||
ENDOPTION
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
mst.*,
|
||||
class.class_name,
|
||||
file.device_code,
|
||||
file.device_name,
|
||||
file.extend_code,
|
||||
d1.name AS dept_name,
|
||||
d2.name AS use_name
|
||||
FROM
|
||||
EM_BI_DeviceMaintenanceMst mst
|
||||
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||
WHERE
|
||||
mst.is_delete = '0'
|
||||
AND file.is_delete = '0'
|
||||
AND mst.maint_object = '02'
|
||||
AND mst.invstatus in ('04')
|
||||
|
||||
OPTION 输入.device_code <> ""
|
||||
(file.device_code like 输入.device_code or
|
||||
file.device_name like 输入.device_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_code <> ""
|
||||
(mst.maint_code like 输入.maint_code or
|
||||
mst.maint_code like 输入.maint_code)
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.classIds <> ""
|
||||
class.class_id in 输入.classIds
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maintenancecycle <> ""
|
||||
mst.maintenancecycle = 输入.maintenancecycle
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_object <> ""
|
||||
mst.maint_object = 输入.maint_object
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.begin_time <> ""
|
||||
mst.plan_start_date >= 输入.begin_time
|
||||
ENDOPTION
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
输入.is_active TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.maint_object TYPEAS s_string
|
||||
|
||||
|
||||
[临时表]
|
||||
@@ -95,6 +96,10 @@
|
||||
mst.plan_start_date <= 输入.end_time
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.maint_object <> ""
|
||||
mst.maint_object = 输入.maint_object
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -141,7 +141,7 @@ public class PhysicalQueryServiceImpl implements PhysicalQueryService {
|
||||
JSONObject jsonResult1 = new JSONObject();
|
||||
jsonResult1.put("prop", "0");
|
||||
jsonResult1.put("label", "质检单号");
|
||||
jsonResultArr.add(jsonResult1);
|
||||
// jsonResultArr.add(jsonResult1);
|
||||
JSONObject jsonResult2 = new JSONObject();
|
||||
jsonResult2.put("prop", "1");
|
||||
jsonResult2.put("label", "物料编码");
|
||||
@@ -163,8 +163,8 @@ public class PhysicalQueryServiceImpl implements PhysicalQueryService {
|
||||
JSONObject jsonResult19 = new JSONObject();
|
||||
jsonResult19.put("prop", "19");
|
||||
jsonResult19.put("label", "金相备注");
|
||||
jsonResultArr.add(jsonResult2);
|
||||
jsonResultArr.add(jsonResult20);
|
||||
// jsonResultArr.add(jsonResult2);
|
||||
// jsonResultArr.add(jsonResult20);
|
||||
jsonResultArr.add(jsonResult21);
|
||||
jsonResultArr.add(jsonResult3);
|
||||
jsonResultArr.add(jsonResult4);
|
||||
|
||||
@@ -71,6 +71,27 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
||||
jsonResult.put(jsonDtl.getString("material_id") +"formula_qty",jsonDtl.getString("formula_qty"));
|
||||
}
|
||||
}
|
||||
// 碳平衡
|
||||
jsonResult.put("3", json.getString("c_balance"));
|
||||
// 时间
|
||||
jsonResult.put("4", json.getString("ball_time"));
|
||||
// 球料比
|
||||
jsonResult.put("5", json.getString("ball_rate"));
|
||||
// 液料比
|
||||
jsonResult.put("6", json.getString("liquid_rate"));
|
||||
// 球磨机号
|
||||
HashMap<String, String> map1 = new HashMap<>();
|
||||
map1.put("flag", "3");
|
||||
map1.put("product_series_id", json.getString("product_series_id"));
|
||||
map1.put("workprocedure_id", "1472449856613257216");
|
||||
JSONObject jsonDevice1 = WQL.getWO("QPF_POINTCARD01").addParamMap(map1).process().uniqueResult(0);
|
||||
map1.put("flag", "4");
|
||||
JSONObject jsonDevice2= WQL.getWO("QPF_POINTCARD01").addParamMap(map1).process().uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonDevice1) && ObjectUtil.isNotEmpty(jsonDevice2)) {
|
||||
String device_code_1 = jsonDevice1.getString("device_code").substring(4, 6);
|
||||
String device_code_2 = jsonDevice2.getString("device_code").substring(4, 6);
|
||||
jsonResult.put("7", device_code_1 + "-" + device_code_2);
|
||||
}
|
||||
jsonResultArr.add(jsonResult);
|
||||
}
|
||||
resultJson.put("content",jsonResultArr);
|
||||
@@ -81,19 +102,6 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
||||
public JSONArray getHeader() {
|
||||
JSONArray jsonResultArr = new JSONArray();
|
||||
|
||||
JSONObject jsonResult1 = new JSONObject();
|
||||
jsonResult1.put("prop", "0");
|
||||
jsonResult1.put("label", "日期");
|
||||
jsonResultArr.add(jsonResult1);
|
||||
JSONObject jsonResult2 = new JSONObject();
|
||||
jsonResult2.put("prop", "1");
|
||||
jsonResult2.put("label", "产品编码");
|
||||
jsonResultArr.add(jsonResult2);
|
||||
JSONObject jsonResult3 = new JSONObject();
|
||||
jsonResult3.put("prop", "2");
|
||||
jsonResult3.put("label", "批号");
|
||||
jsonResultArr.add(jsonResult3);
|
||||
|
||||
String classIds = classstandardService.getAllChildIdStr(MaterOptTypeEnum.YL_AND_FL.getClass_idStr());
|
||||
String RF = classstandardService.getAllChildIdStr(MaterOptTypeEnum.RF.getClass_idStr());
|
||||
JSONArray resultJSONArray = WQL.getWO("QP_POWDERORDERQUERY01").addParam("flag", "2").addParam("classIds", classIds).addParam("rf", RF).process().getResultJSONArray(0);
|
||||
@@ -104,10 +112,10 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
||||
jsonResult4.put("prop",json.getString("material_id"));
|
||||
jsonResult4.put("label","物料" + NumberUtil.add(String.valueOf(i), "1") + "");
|
||||
jsonResultArr.add(jsonResult4);
|
||||
JSONObject jsonResult5 = new JSONObject();
|
||||
jsonResult5.put("prop",json.getString("material_code")+"");
|
||||
jsonResult5.put("label","物料编码");
|
||||
jsonResultArr.add(jsonResult5);
|
||||
// JSONObject jsonResult5 = new JSONObject();
|
||||
// jsonResult5.put("prop",json.getString("material_code")+"");
|
||||
// jsonResult5.put("label","物料编码");
|
||||
// jsonResultArr.add(jsonResult5);
|
||||
JSONObject jsonResult6 = new JSONObject();
|
||||
jsonResult6.put("prop",json.getString("material_id")+"pcsn");
|
||||
jsonResult6.put("label","批次");
|
||||
@@ -117,6 +125,28 @@ public class PowderOrderQueryServiceImpl implements PowderOrderQueryService {
|
||||
jsonResult7.put("label","重量");
|
||||
jsonResultArr.add(jsonResult7);
|
||||
}
|
||||
|
||||
JSONObject jsonResult1 = new JSONObject();
|
||||
jsonResult1.put("prop", "3");
|
||||
jsonResult1.put("label", "碳平衡(%)");
|
||||
jsonResultArr.add(jsonResult1);
|
||||
JSONObject jsonResult2 = new JSONObject();
|
||||
jsonResult2.put("prop", "4");
|
||||
jsonResult2.put("label", "时间(h)");
|
||||
jsonResultArr.add(jsonResult2);
|
||||
JSONObject jsonResult3 = new JSONObject();
|
||||
jsonResult3.put("prop", "5");
|
||||
jsonResult3.put("label", "球料比");
|
||||
jsonResultArr.add(jsonResult3);
|
||||
JSONObject jsonResult8 = new JSONObject();
|
||||
jsonResult8.put("prop", "6");
|
||||
jsonResult8.put("label", "液料比");
|
||||
jsonResultArr.add(jsonResult8);
|
||||
JSONObject jsonResult9 = new JSONObject();
|
||||
jsonResult9.put("prop", "7");
|
||||
jsonResult9.put("label", "球磨机号");
|
||||
jsonResultArr.add(jsonResult9);
|
||||
|
||||
return jsonResultArr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class RawUatWcQueryServiceImpl implements RawUatWcQueryService {
|
||||
// JSONArray jsonArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "2").addParam("inspection_scheme_code",inspection_scheme_code).process().getResultJSONArray(0);
|
||||
JSONArray jsonArr = WQL.getWO("RaUatWc_query_01").addParam("flag", "5").process().getResultJSONArray(0);
|
||||
JSONArray jonsResuftArr = new JSONArray();
|
||||
JSONObject jsonResuft1 = new JSONObject();
|
||||
/* JSONObject jsonResuft1 = new JSONObject();
|
||||
jsonResuft1.put("prop", "1");
|
||||
jsonResuft1.put("label", "物料编码");
|
||||
JSONObject jsonResuft2 = new JSONObject();
|
||||
@@ -139,14 +139,14 @@ public class RawUatWcQueryServiceImpl implements RawUatWcQueryService {
|
||||
jsonResuft3.put("label", "批号");
|
||||
JSONObject jsonResuft4 = new JSONObject();
|
||||
jsonResuft4.put("prop", "4");
|
||||
jsonResuft4.put("label", "重量");
|
||||
jsonResuft4.put("label", "重量");*/
|
||||
JSONObject jsonResuft5 = new JSONObject();
|
||||
jsonResuft5.put("prop", "5");
|
||||
jsonResuft5.put("label", "厂家");
|
||||
jonsResuftArr.add(jsonResuft1);
|
||||
/* jonsResuftArr.add(jsonResuft1);
|
||||
jonsResuftArr.add(jsonResuft2);
|
||||
jonsResuftArr.add(jsonResuft3);
|
||||
jonsResuftArr.add(jsonResuft4);
|
||||
jonsResuftArr.add(jsonResuft4);*/
|
||||
jonsResuftArr.add(jsonResuft5);
|
||||
for (int i = 0; i < jsonArr.size(); i++) {
|
||||
JSONObject json = jsonArr.getJSONObject(i);
|
||||
|
||||
@@ -51,11 +51,17 @@
|
||||
work.create_time,
|
||||
mater.material_code,
|
||||
work.pcsn,
|
||||
mst.formula_id
|
||||
mst.formula_id,
|
||||
mst.ball_time,
|
||||
mst.product_series_id,
|
||||
ext.c_balance,
|
||||
ext.ball_rate,
|
||||
ext.liquid_rate
|
||||
FROM
|
||||
PDM_BI_WorkOrder work
|
||||
LEFT JOIN PDM_BI_Formula mst ON mst.workorder_id = work.workorder_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = work.material_id
|
||||
LEFT JOIN MD_ME_ProducMaterialExt ext ON mater.material_id = ext.material_id
|
||||
|
||||
WHERE
|
||||
mst.is_delete= '0'
|
||||
|
||||
Reference in New Issue
Block a user