rev:回传飞书
This commit is contained in:
@@ -39,6 +39,16 @@ public class DeviceStatusController {
|
||||
return new ResponseEntity<>(deviceStatusService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增客户基础表")
|
||||
@ApiOperation("新增客户基础表")
|
||||
//@PreAuthorize("@el.check('customerbase:add')")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject jo) {
|
||||
deviceStatusService.create(jo);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
|
||||
@PutMapping
|
||||
@Log("修改客户基础表")
|
||||
@ApiOperation("修改客户基础表")
|
||||
|
||||
@@ -30,9 +30,15 @@ public interface DeviceStatusService {
|
||||
*/
|
||||
List<CustomerbaseDto> queryAll(Map whereJson);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param jo /
|
||||
*/
|
||||
void create(JSONObject jo);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param dto /
|
||||
* @param jo /
|
||||
*/
|
||||
void update(JSONObject jo);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.wms.basedata.master.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
@@ -10,6 +11,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.ResultBean;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
@@ -20,6 +22,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.sql.SQLIntegrityConstraintViolationException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -38,13 +41,21 @@ public class DeviceStatusServiceImpl implements DeviceStatusService {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
String where = "";
|
||||
String where = "1=1";
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String search = (String) whereJson.get("search");
|
||||
if (!StrUtil.isEmpty(search)) {
|
||||
where = "AND (device_code like '%" + search + "%' OR device_name like '%" + search + "%')";
|
||||
where += " AND (device_code like '%" + search + "%' OR device_name like '%" + search + "%')";
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "1=1" + where, "device_code desc");
|
||||
String product_area = (String) whereJson.get("product_area");
|
||||
if (!StrUtil.isEmpty(product_area)) {
|
||||
where += " AND product_area = '"+product_area+"'";
|
||||
}
|
||||
String device_type = (String) whereJson.get("device_type");
|
||||
if (!StrUtil.isEmpty(device_type)) {
|
||||
where += " AND device_type = '"+device_type+"'";
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), where, "device_code desc");
|
||||
final JSONObject json = rb.pageResult();
|
||||
return json;
|
||||
}
|
||||
@@ -59,10 +70,9 @@ public class DeviceStatusServiceImpl implements DeviceStatusService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(JSONObject jo) {
|
||||
public void create(JSONObject jo) {
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String device_code = jo.getString("device_code");
|
||||
if (!jo.containsKey("need_update_flag")){
|
||||
if (ObjectUtil.isNotEmpty(jo.getJSONArray("upload_user"))){
|
||||
JSONArray rows = jo.getJSONArray("upload_user");
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
String msg = "";
|
||||
@@ -73,10 +83,39 @@ public class DeviceStatusServiceImpl implements DeviceStatusService {
|
||||
msg += rows.getString(i);
|
||||
}
|
||||
}
|
||||
map.put("upload_user",msg);
|
||||
wo.update(map,"device_code = '"+device_code+"'");
|
||||
}else {
|
||||
wo.update(jo);
|
||||
jo.put("upload_user",msg);
|
||||
}
|
||||
try {
|
||||
wo.insert(jo);
|
||||
}catch (Exception e){
|
||||
throw new BadRequestException("存在相同的设备编码!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(JSONObject jo) {
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String device_code = jo.getString("device_code");
|
||||
try {
|
||||
if (!jo.containsKey("need_update_flag")){
|
||||
JSONArray rows = jo.getJSONArray("upload_user");
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
String msg = "";
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
if (i!=rows.size()-1){
|
||||
msg += rows.getString(i)+",";
|
||||
}else {
|
||||
msg += rows.getString(i);
|
||||
}
|
||||
}
|
||||
map.put("upload_user",msg);
|
||||
wo.update(map,"device_code = '"+device_code+"'");
|
||||
}else {
|
||||
wo.update(jo);
|
||||
}
|
||||
}catch (Exception e){
|
||||
throw new BadRequestException("存在相同的设备编码!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -371,8 +371,25 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
1层:解锁当前点位和2层点位
|
||||
2层:直接解锁当前点位
|
||||
*/
|
||||
|
||||
//查询对应的包装关系,如果为需要解绑删除的则删除包装关系
|
||||
JSONArray sub_rows = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '"+whereJson.getString("vehicle_code")+"'").getResultJSONArray(0);
|
||||
for (int i = 0; i < sub_rows.size(); i++) {
|
||||
JSONObject sub_row = sub_rows.getJSONObject(i);
|
||||
if (StrUtil.isNotEmpty(sub_row.getString("need_delete")) && sub_row.getString("need_delete").equals("1")){
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete(sub_row);
|
||||
}
|
||||
}
|
||||
if (StrUtil.equals(jsonPoint.getString("layer_num"), "1")) {
|
||||
JSONObject jsonPoint2 = pointTab.query("device_code = '" + jsonPoint.getString("device_code") + "' and layer_num = '2'").uniqueResult(0);
|
||||
//查询对应的包装关系,如果为需要解绑删除的则删除包装关系
|
||||
JSONArray sub_rows2 = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '"+jsonPoint2.getString("vehicle_code")+"'").getResultJSONArray(0);
|
||||
for (int i = 0; i < sub_rows2.size(); i++) {
|
||||
JSONObject sub_row = sub_rows2.getJSONObject(i);
|
||||
if (StrUtil.isNotEmpty(sub_row.getString("need_delete")) && sub_row.getString("need_delete").equals("1")){
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete(sub_row);
|
||||
}
|
||||
}
|
||||
jsonPoint2.put("point_status", "1");
|
||||
jsonPoint2.put("lock_type", "1");
|
||||
jsonPoint2.put("vehicle_code", "");
|
||||
|
||||
@@ -810,6 +810,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public JSONObject sendDeviceStatus(JSONObject whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String device_code = whereJson.getString("device_code");
|
||||
String device_name = whereJson.getString("device_name");
|
||||
String product_area = whereJson.getString("product_area");
|
||||
String device_type = whereJson.getString("device_type");
|
||||
if (StrUtil.isEmpty(device_code)) {
|
||||
log.info("未传入设备号,输入参数为:" + whereJson.toString());
|
||||
JSONObject result = new JSONObject();
|
||||
@@ -819,7 +822,23 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
JSONObject device = wo.query("device_code = '" + device_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(device)) {
|
||||
log.info("未查询到对应的设备:" + device_code);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code",device_code);
|
||||
jo.put("device_name",device_name);
|
||||
jo.put("product_area",product_area);
|
||||
jo.put("device_type",device_type);
|
||||
jo.put("plan","1");
|
||||
jo.put("upload_flag","1");
|
||||
if (whereJson.containsKey("mode")) {
|
||||
jo.put("mode", whereJson.getString("mode"));
|
||||
jo.put("mode_update_time", DateUtil.now());
|
||||
}
|
||||
if (whereJson.containsKey("error")) {
|
||||
jo.put("error", whereJson.getString("error"));
|
||||
jo.put("error_msg", whereJson.getString("error_msg"));
|
||||
jo.put("error_update_time", DateUtil.now());
|
||||
}
|
||||
wo.insert(jo);
|
||||
} else {
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
if (whereJson.containsKey("mode")) {
|
||||
|
||||
@@ -9,16 +9,13 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.checkerframework.checker.units.qual.K;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.ext.acs.service.impl.WmsToAcsServiceImpl;
|
||||
import org.nl.wms.ext.mes.service.MesToLmsService;
|
||||
import org.nl.wms.pda.mps.service.InService;
|
||||
import org.nl.wms.pda.mps.service.OutService;
|
||||
@@ -256,7 +253,6 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject momRollBakeNextSpecTransfer(JSONObject param) {
|
||||
log.info("momRollBakeNextSpecTransfer接口输入参数为:-------------------" + param.toString());
|
||||
JSONObject result = new JSONObject();
|
||||
@@ -320,7 +316,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
jsonParam.put("point_code", point_code);
|
||||
|
||||
// 调用手持接口
|
||||
BakingServiceImpl bakingService = new BakingServiceImpl();
|
||||
BakingServiceImpl bakingService = SpringContextHolder.getBean(BakingServiceImpl.class);
|
||||
bakingService.ovenInAndOut(jsonParam);
|
||||
} else {
|
||||
/*
|
||||
@@ -346,7 +342,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
|
||||
jsonParam.put("container_name", containerName);
|
||||
|
||||
// 调用手持接口
|
||||
BakingServiceImpl bakingService = new BakingServiceImpl();
|
||||
BakingServiceImpl bakingService = SpringContextHolder.getBean(BakingServiceImpl.class);
|
||||
bakingService.inCoolIvt(jsonParam);
|
||||
} else {
|
||||
log.info("当前AGV启用参数为否");
|
||||
|
||||
@@ -57,6 +57,8 @@ public class BakingServiceImpl implements BakingService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject ovenInAndOut(JSONObject whereJson) {
|
||||
|
||||
//RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
|
||||
|
||||
String option = whereJson.getString("option"); // 1-入箱 2-出箱
|
||||
|
||||
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); // 点位表
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
point_code
|
||||
FROM
|
||||
SCH_BASE_Point po
|
||||
LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code
|
||||
LEFT JOIN sch_base_task task ON task.point_code2 = po.point_code
|
||||
AND task.task_status < '07'
|
||||
AND task.is_delete = '0'
|
||||
WHERE
|
||||
@@ -112,7 +112,7 @@
|
||||
point_code
|
||||
FROM
|
||||
SCH_BASE_Point po
|
||||
LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code
|
||||
LEFT JOIN sch_base_task task ON task.point_code3 = po.point_code
|
||||
AND task.task_status < '07'
|
||||
AND task.is_delete = '0'
|
||||
WHERE
|
||||
|
||||
@@ -402,6 +402,15 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
|
||||
if (ObjectUtil.isEmpty(json)) throw new BadRequestException("木箱不存在或任务不存在!");
|
||||
|
||||
//查询对应的包装关系,如果为需要解绑删除的则删除包装关系
|
||||
JSONArray sub_rows = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '"+vehicle_code+"'").getResultJSONArray(0);
|
||||
for (int i = 0; i < sub_rows.size(); i++) {
|
||||
JSONObject sub_row = sub_rows.getJSONObject(i);
|
||||
if (StrUtil.isNotEmpty(sub_row.getString("need_delete")) && sub_row.getString("need_delete").equals("1")){
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete(sub_row);
|
||||
}
|
||||
}
|
||||
|
||||
// 下发给acs
|
||||
JSONObject jsonParam = new JSONObject();
|
||||
jsonParam.put("device_code", json.getString("point_code2"));
|
||||
|
||||
@@ -64,8 +64,26 @@ public class ProductionOutServiceImpl implements ProductionOutService {
|
||||
1层:解锁当前点位和2层点位
|
||||
2层:直接解锁当前点位
|
||||
*/
|
||||
|
||||
//查询对应的包装关系,如果为需要解绑删除的则删除包装关系
|
||||
JSONArray sub_rows = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '"+box_no+"'").getResultJSONArray(0);
|
||||
for (int i = 0; i < sub_rows.size(); i++) {
|
||||
JSONObject sub_row = sub_rows.getJSONObject(i);
|
||||
if (StrUtil.isNotEmpty(sub_row.getString("need_delete")) && sub_row.getString("need_delete").equals("1")){
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete(sub_row);
|
||||
}
|
||||
}
|
||||
|
||||
if (StrUtil.equals(jsonPoint.getString("layer_num"), "1")) {
|
||||
JSONObject jsonPoint2 = pointTab.query("device_code = '" + jsonPoint.getString("device_code") + "' and layer_num = '2'").uniqueResult(0);
|
||||
//查询对应的包装关系,如果为需要解绑删除的则删除包装关系
|
||||
JSONArray sub_rows2 = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '"+jsonPoint2.getString("vehicle_code")+"'").getResultJSONArray(0);
|
||||
for (int i = 0; i < sub_rows2.size(); i++) {
|
||||
JSONObject sub_row = sub_rows2.getJSONObject(i);
|
||||
if (StrUtil.isNotEmpty(sub_row.getString("need_delete")) && sub_row.getString("need_delete").equals("1")){
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete(sub_row);
|
||||
}
|
||||
}
|
||||
jsonPoint2.put("point_status", "1");
|
||||
jsonPoint2.put("lock_type", "1");
|
||||
jsonPoint2.put("vehicle_code", "");
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,81 @@
|
||||
package org.nl.wms.sch.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AutoQueryBillInfo {
|
||||
public void run() {
|
||||
//查询已经处于分配中、分配完但还未回传给MES的销售出库单
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_iostorinv");
|
||||
String nofity_day = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("NOFITY_DAY").getValue();
|
||||
JSONArray send_rows = new JSONArray();
|
||||
if (Integer.parseInt(nofity_day) == 0) {
|
||||
send_rows = wo.query("bill_type = '1001' AND bill_status = '99' AND stor_code = 'CP01' AND upload_sap = '0' AND is_delete = '0' AND (IFNULL(carno,'') = '' OR IFNULL(trans_code,'') = '' OR IFNULL(estimated_freight,'') = '' OR IFNULL(order_number,'') = '' OR IFNULL(car_type,'') = '')").getResultJSONArray(0);
|
||||
} else {
|
||||
send_rows = wo.query("bill_type = '1001' AND bill_status = '99' AND stor_code = 'CP01' AND upload_sap = '0' AND is_delete = '0' AND (IFNULL(carno,'') = '' OR IFNULL(trans_code,'') = '' OR IFNULL(estimated_freight,'') = '' OR IFNULL(order_number,'') = '' OR IFNULL(car_type,'') = '') AND TIMESTAMPDIFF(DAY,confirm_time,NOW()) = " + nofity_day).getResultJSONArray(0);
|
||||
}
|
||||
this.sendInfo(send_rows);
|
||||
}
|
||||
|
||||
void sendInfo(JSONArray send_rows) {
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String device_code = "BILL_INFO";
|
||||
JSONObject device_jo = wo.query("device_code = '" + device_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(device_jo.getString("upload_user"))) {
|
||||
return;
|
||||
}
|
||||
String upload_user = device_jo.getString("upload_user");
|
||||
String[] split = upload_user.split(",");
|
||||
JSONArray UserList = new JSONArray();
|
||||
if (split.length > 0) {
|
||||
for (String s : split) {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("User", s);
|
||||
UserList.add(jo);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < send_rows.size(); i++) {
|
||||
JSONObject row = send_rows.getJSONObject(i);
|
||||
String bill_code = row.getString("bill_code");
|
||||
String Message = "出库单号为:" + bill_code + "的单据还未填写必填的发货信息并回传SAP,请及时回传!";
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("SendType", "L");
|
||||
jo.put("Title", "发货信息填写");
|
||||
jo.put("WarnType", "string");
|
||||
jo.put("MessageType", "P");
|
||||
jo.put("UserList", UserList);
|
||||
jo.put("Message", Message);
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||
String api = "/FeiShuNoticesWebApi/CommunalApi";
|
||||
url = url + api;
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(jo))
|
||||
.execute().body();
|
||||
log.info("飞书输入参数为:-------------------" + jo);
|
||||
log.info("飞书输出参数为:-------------------" + resultMsg);
|
||||
} catch (Exception e) {
|
||||
log.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package org.nl.wms.sch.manage;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AutoQueryUpload {
|
||||
public void run() {
|
||||
//查询已经处于分配中、分配完但还未回传给MES的销售出库单
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_iostorinv");
|
||||
JSONArray send_rows = wo.query("mst.bill_type = '1001' AND mst.bill_status IN ( '30', '40' ) AND mst.stor_code = 'CP01' AND upload_mes = '0' AND is_delete = '0'").getResultJSONArray(0);
|
||||
this.sendInfo(send_rows);
|
||||
}
|
||||
|
||||
void sendInfo(JSONArray send_rows) {
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
String device_code = "UPLOAD_INFO";
|
||||
JSONObject device_jo = wo.query("device_code = '" + device_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(device_jo.getString("upload_user"))) {
|
||||
return;
|
||||
}
|
||||
String upload_user = device_jo.getString("upload_user");
|
||||
String[] split = upload_user.split(",");
|
||||
JSONArray UserList = new JSONArray();
|
||||
if (split.length > 0) {
|
||||
for (String s : split) {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("User", s);
|
||||
UserList.add(jo);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < send_rows.size(); i++) {
|
||||
JSONObject row = send_rows.getJSONObject(i);
|
||||
String bill_code = row.getString("bill_code");
|
||||
String Message = "出库单号为:" + bill_code + "的单据还未进行质量报告回传,请及时回传!";
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("SendType", "L");
|
||||
jo.put("Title", "质量报告回传信息");
|
||||
jo.put("WarnType", "string");
|
||||
jo.put("MessageType", "P");
|
||||
jo.put("UserList", UserList);
|
||||
jo.put("Message", Message);
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||
String api = "/FeiShuNoticesWebApi/CommunalApi";
|
||||
url = url + api;
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(jo))
|
||||
.execute().body();
|
||||
log.info("飞书输入参数为:-------------------" + jo);
|
||||
log.info("飞书输出参数为:-------------------" + resultMsg);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("is_upload", "1");
|
||||
map.put("upload_time", DateUtil.now());
|
||||
wo.update(map, "device_code = '" + device_code + "'");
|
||||
} catch (Exception e) {
|
||||
log.info(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -30,12 +30,12 @@ public class AutoSendFeiShu {
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicestatus");
|
||||
//查询故障了还未发送的
|
||||
JSONArray send_rows = wo.query("error = '1' AND is_upload = '0' AND upload_flag = '1'").getResultJSONArray(0);
|
||||
JSONArray send_rows = wo.query("error > '0' AND is_upload = '0' AND upload_flag = '1'").getResultJSONArray(0);
|
||||
this.sendInfo(send_rows);
|
||||
|
||||
//查询已经发送了但是还是故障中的
|
||||
String resend_time = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("FEISHU_URL").getValue();
|
||||
JSONArray resend_rows = wo.query("error = '1' AND is_upload = '1' AND upload_flag = '1' AND TIMESTAMPDIFF(MINUTE,upload_time,NOW()) > " + resend_time).getResultJSONArray(0);
|
||||
String resend_time = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("RESEND_TIME").getValue();
|
||||
JSONArray resend_rows = wo.query("error > '0' AND is_upload = '1' AND upload_flag = '1' AND TIMESTAMPDIFF(MINUTE,upload_time,NOW()) > " + resend_time).getResultJSONArray(0);
|
||||
this.sendInfo(resend_rows);
|
||||
|
||||
|
||||
|
||||
@@ -4344,8 +4344,17 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
JSONArray dis_rows = WQLObject.getWQLObject("ST_IVT_IOStorInvDis").query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
for (int i = 0; i < dis_rows.size(); i++) {
|
||||
JSONObject dis_row = dis_rows.getJSONObject(i);
|
||||
String sect_code = dis_row.getString("sect_code");
|
||||
//如果是虚拟区的出库,直接把包装关系删除;如果为立库的包装关系,将解绑删除标识置为1。当发货区解绑时,删除包装关系
|
||||
String pcsn = dis_row.getString("pcsn");
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete("container_name = '"+pcsn+"'");
|
||||
if (sect_code.equals("XN01")){
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").delete("container_name = '"+pcsn+"'");
|
||||
}else {
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("need_delete","1");
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(map,"container_name = '"+pcsn+"'");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,17 +216,17 @@ public class InBillQueryServiceImpl implements InBillQueryService {
|
||||
}else {
|
||||
mp.put("木箱规格/尺寸", "");
|
||||
}
|
||||
mp.put("毛重合计", NumberUtil.round(json.getString("box_weight"), 1));
|
||||
mp.put("净重(KG)", NumberUtil.round(json.getString("net_weight"), 1));
|
||||
mp.put("毛重合计", NumberUtil.round(StrUtil.isEmpty(json.getString("box_weight")) ? "0" : json.getString("box_weight"), 1));
|
||||
mp.put("净重(KG)", NumberUtil.round(StrUtil.isEmpty(json.getString("net_weight")) ? "0" : json.getString("net_weight"), 1));
|
||||
mp.put("卷数", json.getString("quanlity_in_box"));
|
||||
mp.put("品级", "A");
|
||||
mp.put("小卷号", json.getString("pcsn"));
|
||||
mp.put("箱号", json.getString("box_no"));
|
||||
mp.put("母卷号", json.getString("parent_container_name"));
|
||||
mp.put("基重(g/m³)(面密度)", NumberUtil.round(json.getString("mass_per_unit_area"), 2));
|
||||
mp.put("基重(g/m³)(面密度)", NumberUtil.round(StrUtil.isEmpty(json.getString("mass_per_unit_area")) ? "0" : json.getString("mass_per_unit_area"), 1));
|
||||
mp.put("居中度(mm)", "±1");
|
||||
mp.put("塌边(mm)", "≤10");
|
||||
mp.put("米数(长度)", NumberUtil.round(json.getString("length"), 1));
|
||||
mp.put("米数(长度)", NumberUtil.round(StrUtil.isEmpty(json.getString("length")) ? "0" : json.getString("length"), 1));
|
||||
mp.put("生产实际抗拉值", json.getString("actual_value"));
|
||||
mp.put("内控标准抗拉下限", json.getString("standard_limit"));
|
||||
mp.put("客户需求抗拉下限", json.getString("demand_limit"));
|
||||
|
||||
@@ -100,22 +100,19 @@
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
pcsn,
|
||||
MAX(iostorinv_id) AS iostorinv_id,
|
||||
MAX(sect_id) AS sect_id,
|
||||
MAX(material_id) AS material_id,
|
||||
MAX(box_no) AS box_no,
|
||||
MAX(sect_name) AS sect_name,
|
||||
MAX(struct_code) AS struct_code,
|
||||
MAX(struct_name) AS struct_name,
|
||||
MAX(qty_unit_name) AS qty_unit_name
|
||||
FROM
|
||||
st_ivt_iostorinvdis
|
||||
WHERE
|
||||
1 = 1
|
||||
GROUP BY pcsn
|
||||
) AS dis
|
||||
SELECT
|
||||
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '0'
|
||||
AND b.bill_type = 输入.bill_type
|
||||
AND b.bill_status = '99'
|
||||
GROUP BY
|
||||
pcsn
|
||||
) AS c
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinvdis_id = c.iostorinvdis_id
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
|
||||
@@ -213,23 +210,20 @@
|
||||
END AS confirm_time_class
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
pcsn,
|
||||
MAX(iostorinv_id) AS iostorinv_id,
|
||||
MAX(sect_id) AS sect_id,
|
||||
MAX(material_id) AS material_id,
|
||||
MAX(box_no) AS box_no,
|
||||
MAX(sect_name) AS sect_name,
|
||||
MAX(struct_code) AS struct_code,
|
||||
MAX(struct_name) AS struct_name,
|
||||
MAX(qty_unit_name) AS qty_unit_name
|
||||
FROM
|
||||
st_ivt_iostorinvdis
|
||||
WHERE
|
||||
1 = 1
|
||||
GROUP BY pcsn
|
||||
) AS dis
|
||||
(
|
||||
SELECT
|
||||
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '0'
|
||||
AND b.bill_type = 输入.bill_type
|
||||
AND b.bill_status = '99'
|
||||
GROUP BY
|
||||
pcsn
|
||||
) AS c
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinvdis_id = c.iostorinvdis_id
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
|
||||
@@ -343,22 +337,19 @@
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
pcsn,
|
||||
MAX(iostorinv_id) AS iostorinv_id,
|
||||
MAX(sect_id) AS sect_id,
|
||||
MAX(material_id) AS material_id,
|
||||
MAX(box_no) AS box_no,
|
||||
MAX(sect_name) AS sect_name,
|
||||
MAX(struct_code) AS struct_code,
|
||||
MAX(struct_name) AS struct_name,
|
||||
MAX(qty_unit_name) AS qty_unit_name
|
||||
FROM
|
||||
st_ivt_iostorinvdis
|
||||
WHERE
|
||||
1 = 1
|
||||
GROUP BY pcsn
|
||||
) AS dis
|
||||
SELECT
|
||||
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '0'
|
||||
AND b.bill_type = 输入.bill_type
|
||||
AND b.bill_status = '99'
|
||||
GROUP BY
|
||||
pcsn
|
||||
) AS c
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinvdis_id = c.iostorinvdis_id
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
|
||||
@@ -459,22 +450,19 @@
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
pcsn,
|
||||
MAX(iostorinv_id) AS iostorinv_id,
|
||||
MAX(sect_id) AS sect_id,
|
||||
MAX(material_id) AS material_id,
|
||||
MAX(box_no) AS box_no,
|
||||
MAX(sect_name) AS sect_name,
|
||||
MAX(struct_code) AS struct_code,
|
||||
MAX(struct_name) AS struct_name,
|
||||
MAX(qty_unit_name) AS qty_unit_name
|
||||
FROM
|
||||
st_ivt_iostorinvdis
|
||||
WHERE
|
||||
1 = 1
|
||||
GROUP BY pcsn
|
||||
) AS dis
|
||||
SELECT
|
||||
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
|
||||
FROM
|
||||
st_ivt_iostorinvdis a
|
||||
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
|
||||
WHERE
|
||||
b.io_type = '0'
|
||||
AND b.bill_type = 输入.bill_type
|
||||
AND b.bill_status = '99'
|
||||
GROUP BY
|
||||
pcsn
|
||||
) AS c
|
||||
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinvdis_id = c.iostorinvdis_id
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN st_ivt_sectattr sect ON sect.sect_id = dis.sect_id
|
||||
LEFT JOIN md_me_materialbase mater ON mater.material_id = dis.material_id
|
||||
|
||||
@@ -2,36 +2,143 @@
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
size="mini"
|
||||
placeholder="输入设备编码或设备名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
<rrOperation />
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="关键字">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="输入设备编码或设备名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="车间区域">
|
||||
<el-select
|
||||
v-model="query.product_area"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in agvRegionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select
|
||||
v-model="query.device_type"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<crudOperation :permission="permission"/>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="1100px"
|
||||
width="1300px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="140px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备编码" prop="device_code">
|
||||
<el-input v-model="form.device_code" disabled style="width: 200px;" />
|
||||
<el-input v-model="form.device_code" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备名称" prop="device_name">
|
||||
<el-input v-model="form.device_name" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="区域" prop="product_area">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in agvRegionList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备类型" prop="device_type">
|
||||
<el-select
|
||||
v-model="form.device_type"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deviceType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否上报" prop="upload_flag">
|
||||
<el-select
|
||||
v-model="form.upload_flag"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in isOrNot"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="upload_user">
|
||||
<el-select v-model="form.upload_user" placeholder="请选择" filterable multiple clearable style="width: 250px">
|
||||
<el-select v-model="form.upload_user" placeholder="请选择" filterable multiple clearable
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.username"
|
||||
@@ -60,16 +167,16 @@
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip width="150px" />
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip width="150px" />
|
||||
<el-table-column prop="product_area" label="区域" show-overflow-tooltip />
|
||||
<el-table-column prop="device_type" label="设备类型" show-overflow-tooltip />
|
||||
<el-table-column prop="mode" label="工作状态" show-overflow-tooltip />
|
||||
<el-table-column prop="mode_update_time" label="工作状态变更时间" show-overflow-tooltip width="150px" />
|
||||
<el-table-column prop="error" label="故障状态" show-overflow-tooltip />
|
||||
<el-table-column prop="error_msg" label="故障信息" width="180px" show-overflow-tooltip />
|
||||
<el-table-column prop="error_update_time" label="故障状态更新时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="error_update_time" label="故障状态更新时间" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip width="150px"/>
|
||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip width="150px"/>
|
||||
<el-table-column prop="product_area" label="区域" show-overflow-tooltip/>
|
||||
<el-table-column prop="device_type" label="设备类型" :formatter="typeFormatter" show-overflow-tooltip/>
|
||||
<el-table-column prop="mode" label="工作状态" :formatter="modeFormatter" show-overflow-tooltip/>
|
||||
<el-table-column prop="mode_update_time" label="工作状态变更时间" show-overflow-tooltip width="150px"/>
|
||||
<el-table-column prop="error" label="故障状态" :formatter="erroFormatter" show-overflow-tooltip/>
|
||||
<el-table-column prop="error_msg" label="故障信息" width="180px" show-overflow-tooltip/>
|
||||
<el-table-column prop="error_update_time" label="故障状态更新时间" width="150px" show-overflow-tooltip/>
|
||||
<el-table-column prop="error_update_time" label="故障状态更新时间" width="150px" show-overflow-tooltip/>
|
||||
<el-table-column label="是否上报" align="center" prop="upload_flag">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@@ -82,7 +189,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="upload_user" label="负责人" width="150px" show-overflow-tooltip />
|
||||
<el-table-column prop="upload_user" label="负责人" width="150px" show-overflow-tooltip/>
|
||||
<el-table-column
|
||||
v-permission="['admin','customerbase:edit','customerbase:del']"
|
||||
label="操作"
|
||||
@@ -99,7 +206,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
<pagination/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -140,6 +247,24 @@ export default {
|
||||
permission: {},
|
||||
classes: [],
|
||||
userList: [],
|
||||
agvRegionList: [
|
||||
{ 'label': 'A1', 'value': 'A1' },
|
||||
{ 'label': 'A2', 'value': 'A2' },
|
||||
{ 'label': 'A3', 'value': 'A3' },
|
||||
{ 'label': 'A4', 'value': 'A4' },
|
||||
{ 'label': 'LK', 'value': 'LK' }
|
||||
],
|
||||
isOrNot: [
|
||||
{ 'label': '否', 'value': '0' },
|
||||
{ 'label': '是', 'value': '1' }
|
||||
],
|
||||
deviceType: [
|
||||
{ 'label': '输送线', 'value': '1' },
|
||||
{ 'label': 'RGV', 'value': '2' },
|
||||
{ 'label': '四向车', 'value': '3' },
|
||||
{ 'label': 'AGV', 'value': '4' },
|
||||
{ 'label': '其他', 'value': '5' }
|
||||
],
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
@@ -150,7 +275,12 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
this.getUserList()
|
||||
form.upload_user = form.upload_user.split(',')
|
||||
debugger
|
||||
if (form.upload_user && form.upload_user !== '') {
|
||||
form.upload_user = form.upload_user.split(',')
|
||||
} else {
|
||||
form.upload_user = null
|
||||
}
|
||||
},
|
||||
// 改变状态
|
||||
getUserList() {
|
||||
@@ -158,6 +288,41 @@ export default {
|
||||
this.userList = res
|
||||
})
|
||||
},
|
||||
typeFormatter(row) {
|
||||
if (row.device_type === '1') {
|
||||
return '输送线'
|
||||
} else if (row.device_type === '2') {
|
||||
return 'RGV'
|
||||
} else if (row.device_type === '3') {
|
||||
return '四向车'
|
||||
} else if (row.device_type === '4') {
|
||||
return 'AGV'
|
||||
} else if (row.device_type === '5') {
|
||||
return '其他'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
modeFormatter(row) {
|
||||
if (row.mode === '0') {
|
||||
return '脱机'
|
||||
} else if (row.mode === '2') {
|
||||
return '待机'
|
||||
} else if (row.mode === '3') {
|
||||
return '运行中'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
erroFormatter(row) {
|
||||
if (row.error === '0') {
|
||||
return '无故障'
|
||||
} else if (row.error > 0) {
|
||||
return '故障中'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
changeEnabled(data, val) {
|
||||
this.$confirm('此操作将 "' + this.dict.label.is_used[val] + '" ' + data.device_code + ', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
:disabled="confirm_flag"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
v-permission="permission.confirm"
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
@@ -347,7 +348,8 @@ export default {
|
||||
permission: {
|
||||
add: ['admin', 'checkoutbill:add'],
|
||||
edit: ['admin', 'checkoutbill:edit'],
|
||||
del: ['admin', 'checkoutbill:del']
|
||||
del: ['admin', 'checkoutbill:del'],
|
||||
confirm: ['admin', 'checkoutbill:confirm']
|
||||
},
|
||||
openMoneyDialog: false,
|
||||
loadingConfirm: false,
|
||||
|
||||
Reference in New Issue
Block a user