fix: 新增车间区域管理
This commit is contained in:
@@ -22,7 +22,6 @@ public class UserAreaController {
|
|||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@Log("查询用户信息")
|
@Log("查询用户信息")
|
||||||
|
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(userAreaService.pageQuery(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(userAreaService.pageQuery(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -58,15 +58,16 @@ public class AcsUtil {
|
|||||||
result = JSONObject.parseObject(resultMsg);
|
result = JSONObject.parseObject(resultMsg);
|
||||||
log.info("下发acs任务成功,返回参数----------------------------------------+" + api + ",---" + result.toString());
|
log.info("下发acs任务成功,返回参数----------------------------------------+" + api + ",---" + result.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
//acs抛异常这里
|
||||||
String msg = e.getMessage();
|
String msg = e.getMessage();
|
||||||
//ConnectException: Connection refused: connect
|
//ConnectException: Connection refused: connect
|
||||||
//网络不通
|
//网络不通
|
||||||
result.put("status", HttpStatus.BAD_REQUEST);
|
result.put("status", HttpStatus.BAD_REQUEST);
|
||||||
result.put("message", "网络不通,操作失败!");
|
result.put("message", "网络不通,操作失败!");
|
||||||
result.put("data", new JSONObject());
|
result.put("data", new JSONObject());
|
||||||
|
log.error("ACS出现异常: {}", e);
|
||||||
log.info("下发ACS任务失败,原因是:----------------------------------------+"+ msg);
|
log.info("下发ACS任务失败,原因是:----------------------------------------+"+ msg);
|
||||||
}
|
}
|
||||||
//acs抛异常这里
|
|
||||||
if (!StrUtil.equals(result.getString("status"), "200")) {
|
if (!StrUtil.equals(result.getString("status"), "200")) {
|
||||||
log.info("下发acs任务失败,原因是:----------------------------------------+"+ result.getString("message"));
|
log.info("下发acs任务失败,原因是:----------------------------------------+"+ result.getString("message"));
|
||||||
throw new BadRequestException(result.getString("message"));
|
throw new BadRequestException(result.getString("message"));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.nl.wms.sch.tasks;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -11,7 +10,6 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.CodeUtil;
|
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
|||||||
@@ -43,6 +43,11 @@
|
|||||||
<artifactId>dynamic-tp-spring-boot-starter-adapter-webserver</artifactId>
|
<artifactId>dynamic-tp-spring-boot-starter-adapter-webserver</artifactId>
|
||||||
<version>1.1.6.1</version>
|
<version>1.1.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.jeffreyning</groupId>
|
||||||
|
<artifactId>mybatisplus-plus</artifactId>
|
||||||
|
<version>1.5.1-RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 日志链路追踪 https://tlog.yomahub.com/pages/f62a84/#%E5%90%8C%E6%AD%A5%E6%97%A5%E5%BF%97-->
|
<!-- 日志链路追踪 https://tlog.yomahub.com/pages/f62a84/#%E5%90%8C%E6%AD%A5%E6%97%A5%E5%BF%97-->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.nl.common.logging.annotation;
|
package org.nl.common.logging.annotation;
|
||||||
|
|
||||||
|
import org.nl.common.logging.domain.InterfaceLogType;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
@@ -28,4 +30,34 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Log {
|
public @interface Log {
|
||||||
String value() default "";
|
String value() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否打印到日志文件
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean isPrintToLogFile() default false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否插入操作日志表
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean isAddLogTable() default true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否接口日志
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean isInterfaceLog() default false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口日志类型
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InterfaceLogType interfaceLogType() default InterfaceLogType.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package org.nl.common.logging.domain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: lyd
|
||||||
|
* @description:
|
||||||
|
* @Date: 2022/10/11
|
||||||
|
*/
|
||||||
|
public enum InterfaceLogType {
|
||||||
|
DEFAULT("默认"),
|
||||||
|
LMS_TO_MES("LMS请求MES"),
|
||||||
|
MES_TO_LMS("MES请求LMS"),
|
||||||
|
LMS_TO_CRM("LMS请求CRM"),
|
||||||
|
CRM_TO_LMS("CRM请求LMS"),
|
||||||
|
LMS_TO_SAP("LMS请求SAP"),
|
||||||
|
SAP_TO_LMS("SAP请求LMS"),
|
||||||
|
LMS_TO_ACS("LMS请求ACS"),
|
||||||
|
ACS_TO_LMS("ACS请求LMS");
|
||||||
|
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
InterfaceLogType(String desc) {
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package org.nl.system.service.user.dao;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
@@ -158,5 +159,6 @@ public class SysUser implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String extuser_id;
|
private String extuser_id;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.system.service.user.dao.mapper;
|
package org.nl.system.service.user.dao.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
@@ -70,4 +71,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|||||||
* @return List<String>
|
* @return List<String>
|
||||||
*/
|
*/
|
||||||
List<String> getUserIdByDeptId(String deptId);
|
List<String> getUserIdByDeptId(String deptId);
|
||||||
|
|
||||||
|
|
||||||
|
IPage<SysUser> selectPageLeftJoinAndDept(IPage<SysUser> pages, Map whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,4 +140,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectPageLeftJoinAndDept" resultType="org.nl.system.service.user.dao.SysUser">
|
||||||
|
SELECT
|
||||||
|
sys_user.*,
|
||||||
|
dept.name
|
||||||
|
FROM
|
||||||
|
sys_user sys_user
|
||||||
|
LEFT JOIN sys_user_dept sdept ON sdept.user_id = sys_user.user_id
|
||||||
|
LEFT JOIN sys_dept dept ON dept.dept_id = sdept.dept_id
|
||||||
|
WHERE
|
||||||
|
sys_user.is_used = '1'
|
||||||
|
<if test="whereJson.blurry != null">
|
||||||
|
AND (username LIKE '%${whereJson.blurry}%'
|
||||||
|
OR person_name LIKE '%${whereJson.blurry}%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package org.nl.wms.basedata.st.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.base.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.logging.annotation.Log;
|
||||||
|
import org.nl.wms.basedata.st.service.IUserAreaService;
|
||||||
|
import org.nl.wms.basedata.st.service.dao.UserArea;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/userArea")
|
||||||
|
public class UserAreaController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUserAreaService userAreaService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询用户区域绑定")
|
||||||
|
//@SaCheckPermission("userarea:list")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(userAreaService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryUserArea")
|
||||||
|
@Log("查询用户对应区域")
|
||||||
|
public ResponseEntity<Object> queryUserArea(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(userAreaService.queryUserArea(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增用户区域绑定")
|
||||||
|
//@SaCheckPermission("userarea:add")
|
||||||
|
public ResponseEntity<Object> create(@Validated @RequestBody UserArea entity){
|
||||||
|
userAreaService.create(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/save")
|
||||||
|
@Log("保存用户仓库信息")
|
||||||
|
public ResponseEntity<Object> save(@RequestBody JSONObject whereJson) {
|
||||||
|
userAreaService.saveAreaAuthority(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改用户区域绑定")
|
||||||
|
//@SaCheckPermission("userarea:edit")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody UserArea entity){
|
||||||
|
userAreaService.update(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除用户区域绑定")
|
||||||
|
//@SaCheckPermission("userarea:del")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||||
|
userAreaService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package org.nl.wms.basedata.st.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
|
import org.nl.wms.basedata.st.service.dao.UserArea;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
public interface IUserAreaService extends IService<UserArea> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return IPage<Userarea>
|
||||||
|
*/
|
||||||
|
IPage<SysUser> queryAll(Map whereJson, PageQuery pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void create(UserArea entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void update(UserArea entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Set<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询用户对应仓库
|
||||||
|
*
|
||||||
|
* @param whereJson /
|
||||||
|
*/
|
||||||
|
List<UserArea> queryUserArea(JSONObject whereJson);
|
||||||
|
|
||||||
|
void saveAreaAuthority(JSONObject whereJson);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package org.nl.wms.basedata.st.service.dao;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: lyd
|
||||||
|
* @Description:
|
||||||
|
* @Date: 2024/8/6
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CompositeKey implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String product_area;
|
||||||
|
private String user_id;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package org.nl.wms.basedata.st.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description /
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("st_ivt_userarea")
|
||||||
|
public class UserArea implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 生产区域 */
|
||||||
|
@MppMultiId
|
||||||
|
private String product_area;
|
||||||
|
|
||||||
|
/** 人员标识 */
|
||||||
|
@MppMultiId
|
||||||
|
private String user_id;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package org.nl.wms.basedata.st.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
|
import org.nl.wms.basedata.st.service.dao.UserArea;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
public interface UserareaMapper extends BaseMapper<UserArea> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="org.nl.wms.basedata.st.service.dao.mapper.UserareaMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package org.nl.wms.basedata.st.service.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description /
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class UserareaDto implements Serializable {
|
||||||
|
|
||||||
|
/** 生产区域 */
|
||||||
|
private String product_area;
|
||||||
|
|
||||||
|
/** 人员标识 */
|
||||||
|
private String user_id;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.nl.wms.basedata.st.service.dto;
|
||||||
|
|
||||||
|
import org.nl.common.domain.query.BaseQuery;
|
||||||
|
import org.nl.wms.basedata.st.service.dao.UserArea;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
public class UserareaQuery extends BaseQuery<UserArea> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package org.nl.wms.basedata.st.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.config.language.LangProcess;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.system.service.user.ISysUserService;
|
||||||
|
import org.nl.system.service.user.dao.SysUser;
|
||||||
|
import org.nl.system.service.user.dao.mapper.SysUserMapper;
|
||||||
|
import org.nl.wms.basedata.st.service.IUserAreaService;
|
||||||
|
import org.nl.wms.basedata.st.service.dao.mapper.UserareaMapper;
|
||||||
|
import org.nl.wms.basedata.st.service.dao.UserArea;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务实现
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-08-06
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class UserareaServiceImpl extends ServiceImpl<UserareaMapper, UserArea> implements IUserAreaService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserareaMapper userareaMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserMapper userMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<SysUser> queryAll(Map whereJson, PageQuery page){
|
||||||
|
IPage<SysUser> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
pages = userMapper.selectPageLeftJoinAndDept(pages, whereJson);
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(UserArea entity) {
|
||||||
|
entity.setUser_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
userareaMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(UserArea entity) {
|
||||||
|
UserArea dto = userareaMapper.selectById(entity.getUser_id());
|
||||||
|
if (dto == null) {
|
||||||
|
throw new BadRequestException(LangProcess.msg("error_SystemAuthError"));
|
||||||
|
}
|
||||||
|
userareaMapper.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAll(Set<String> ids) {
|
||||||
|
// 真删除
|
||||||
|
userareaMapper.deleteBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserArea> queryUserArea(JSONObject whereJson) {
|
||||||
|
String user_id = whereJson.getString("user_id");
|
||||||
|
return userareaMapper.selectList(new LambdaQueryWrapper<UserArea>()
|
||||||
|
.eq(UserArea::getUser_id, user_id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void saveAreaAuthority(JSONObject whereJson) {
|
||||||
|
JSONObject jo = whereJson.getJSONObject("jo");
|
||||||
|
JSONArray rows = whereJson.getJSONArray("rows");
|
||||||
|
|
||||||
|
String user_id = jo.getString("user_id");
|
||||||
|
userareaMapper.delete(new LambdaQueryWrapper<UserArea>()
|
||||||
|
.eq(UserArea::getUser_id, user_id));
|
||||||
|
List<UserArea> userAreas = new ArrayList<>();
|
||||||
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
|
JSONObject row = rows.getJSONObject(i);
|
||||||
|
String product_area = row.getString("product_area");
|
||||||
|
UserArea userArea = new UserArea();
|
||||||
|
userArea.setUser_id(user_id);
|
||||||
|
userArea.setProduct_area(product_area);
|
||||||
|
userAreas.add(userArea);
|
||||||
|
}
|
||||||
|
saveBatch(userAreas);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,10 +2,9 @@ package org.nl.wms.ext.acs.controller;
|
|||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.logging.annotation.Log;
|
import org.nl.common.logging.annotation.Log;
|
||||||
|
import org.nl.common.logging.domain.InterfaceLogType;
|
||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -16,21 +15,117 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: lyd
|
* @author ludj
|
||||||
* @Description: acs请求lms接口
|
* @date 2021-07-21
|
||||||
* @Date: 2023/6/16
|
**/
|
||||||
*/
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/wms")
|
@RequestMapping("/api/wms/task")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AcsToWmsController {
|
public class AcsToWmsController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AcsToWmsService acsToWmsService;
|
private AcsToWmsService acsToWmsService;
|
||||||
|
|
||||||
@PostMapping("/apply")
|
@PostMapping("/status")
|
||||||
|
@Log(value = "ACS给WMS反馈任务状态", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> apply(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String string) {
|
||||||
return new ResponseEntity<>(acsToWmsService.acsApply(param), HttpStatus.OK);
|
log.info("ACS给WMS反馈任务状态:{}", string);
|
||||||
|
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/apply")
|
||||||
|
@Log(value = "申请任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/againApply")
|
||||||
|
@Log(value = "二次申请任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> againApply(@RequestBody String task_id) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.againApply(task_id), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/deviceApply")
|
||||||
|
@Log(value = "申请贴标、捆扎", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> deviceApply(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.deviceApply(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/process")
|
||||||
|
@Log(value = "RCS上报密集库任务异常处理", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> process(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.process(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/shipDeviceUpdate")
|
||||||
|
// @Log(value = "输送线光电无货上报", isInterfaceLog = true,interfaceLogType= InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> shipDeviceUpdate(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.shipDeviceUpdate(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sendDeviceStatus")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> sendDeviceStatus(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.sendDeviceStatus(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sendCBZInfo")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> sendCBZInfo(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.sendCBZInfo(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/sendGetGoalStruct")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> sendGetGoalStruct(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.sendGetGoalStruct(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/actionFinishRequest")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> actionFinishRequest(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.actionFinishRequest(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/actionFinishRequest2")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> actionFinishRequest2(@RequestBody JSONObject jo) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.actionFinishRequest2(jo), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
@PostMapping("/initialize")
|
||||||
|
@Log(value = "仓位初始化", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> initialize(@RequestBody JSONObject json) {
|
||||||
|
acsToWmsService.initialize(json);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/initPoint")
|
||||||
|
@Log(value = "点位初始化", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> initPoint() {
|
||||||
|
acsToWmsService.initPoint();
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/slitterApply")
|
||||||
|
@Log(value = "二期分切请求", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> slitterApply(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.slitterApply(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/feedbackSubVolumeWeightApply")
|
||||||
|
@Log(value = "二期ACS反馈子卷重量", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> feedbackSubVolumeWeightApply(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.feedbackSubVolumeWeightApply(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,121 @@
|
|||||||
package org.nl.wms.ext.acs.service;
|
package org.nl.wms.ext.acs.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
|
|
||||||
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest;
|
|
||||||
|
|
||||||
/**
|
import java.util.Map;
|
||||||
* @Author: lyd
|
|
||||||
* @Description: acs请求wms
|
|
||||||
* @Date: 2023/6/26
|
|
||||||
*/
|
|
||||||
public interface AcsToWmsService {
|
public interface AcsToWmsService {
|
||||||
/**
|
|
||||||
* ACS请求接口
|
|
||||||
* @param param
|
|
||||||
* @return BaseResponse
|
|
||||||
*/
|
|
||||||
BaseResponse acsApply(JSONObject param);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务反馈
|
* ACS客户端--->WMS服务端
|
||||||
* @param param
|
* ACS向WMS反馈任务状态
|
||||||
* @return BaseResponse
|
*
|
||||||
|
* @param string ACS反馈的任务数组
|
||||||
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
BaseResponse feedbackTaskStatus(JSONObject param);
|
|
||||||
|
Map<String, Object> receiveTaskStatusAcs(String string);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实时修改点位状态
|
* @param task_id: 任务标识
|
||||||
* @param param
|
* @return 二次申请的点位
|
||||||
* @return BaseResponse
|
|
||||||
*/
|
*/
|
||||||
BaseResponse realTimeSetPoint(JSONObject param);
|
String againApply(String task_id);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->WMS服务端
|
||||||
|
* ACS向WMS反馈点位状态
|
||||||
|
*
|
||||||
|
* @param jsonObject 条件
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
|
||||||
|
Map<String, Object> receivePointStatusFromAcs(Map<String, String> jsonObject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->LMS服务端
|
||||||
|
* 任务申请
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject apply(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->LMS服务端
|
||||||
|
* 申请贴标、捆扎
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject deviceApply(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->LMS服务端
|
||||||
|
* RCS上报密集库任务异常处理
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject process(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->LMS服务端
|
||||||
|
* 输送线光电无货上报
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject shipDeviceUpdate(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->LMS服务端
|
||||||
|
* 输送线光电无货上报
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject sendDeviceStatus(JSONObject whereJson);
|
||||||
|
|
||||||
|
JSONObject sendCBZInfo(JSONObject whereJson);
|
||||||
|
|
||||||
|
JSONObject sendGetGoalStruct(JSONObject whereJson);
|
||||||
|
|
||||||
|
JSONObject actionFinishRequest(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位初始化
|
||||||
|
*/
|
||||||
|
void initialize(JSONObject json);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位初始化
|
||||||
|
*/
|
||||||
|
void initPoint();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二期分切请求
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject slitterApply(JSONObject param);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二期ACS反馈子卷重量
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject feedbackSubVolumeWeightApply(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二楼取货完成请求
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject actionFinishRequest2(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,165 +1,94 @@
|
|||||||
package org.nl.wms.ext.acs.service.impl;
|
package org.nl.wms.ext.acs.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import cn.hutool.http.HttpStatus;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.SneakyThrows;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.exception.BadRequestException;
|
|
||||||
import org.nl.config.language.LangProcess;
|
|
||||||
import org.nl.system.service.notice.ISysNoticeService;
|
|
||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.nl.wms.ext.acs.service.dto.to.BaseResponse;
|
|
||||||
import org.nl.wms.ext.acs.service.dto.to.wms.FeedBackTaskStatusRequest;
|
|
||||||
import org.nl.wms.ext.record.service.ISysInteractRecordService;
|
|
||||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
|
||||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
|
||||||
import org.nl.wms.sch.task_manage.AbstractTask;
|
|
||||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
|
||||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
|
||||||
import org.nl.wms.sch.task_manage.task.TaskFactory;
|
|
||||||
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: lyd
|
|
||||||
* @Description: acs请求wms的实现类
|
|
||||||
* @Date: 2023/6/26
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Service
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
public class AcsToWmsServiceImpl implements AcsToWmsService {
|
public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||||
|
|
||||||
/**
|
|
||||||
* 将解析的整数与结果相乘
|
|
||||||
*/
|
|
||||||
private Map<String, Method> methodCache = new ConcurrentHashMap<>();
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISchBaseTaskService taskService;
|
|
||||||
@Autowired
|
|
||||||
private TaskFactory taskFactory;
|
|
||||||
@Autowired
|
|
||||||
private ISysNoticeService noticeService;
|
|
||||||
@Autowired
|
|
||||||
private ISysInteractRecordService interactRecordService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始化反射方法
|
|
||||||
*/
|
|
||||||
@PostConstruct
|
|
||||||
public void initCacheMethod() {
|
|
||||||
for (Method method : this.getClass().getMethods()) {
|
|
||||||
if (method.getParameterCount() == 1 && method.getParameterTypes()[0] == JSONObject.class) {
|
|
||||||
methodCache.put(method.getName(), method);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse acsApply(JSONObject param) {
|
public Map<String, Object> receiveTaskStatusAcs(String string) {
|
||||||
String requestNo = param.getString("requestNo");
|
|
||||||
String requestMethodName = param.getString("request_medthod_name");
|
|
||||||
BaseResponse result = BaseResponse.build(requestNo);
|
|
||||||
try {
|
|
||||||
// 获取请求方法名
|
|
||||||
String requestMethodCode = param.getString("request_medthod_code");
|
|
||||||
Method method = methodCache.get(StrUtil.toCamelCase(requestMethodCode));
|
|
||||||
if (method == null) {
|
|
||||||
throw new BadRequestException(LangProcess.msg("error_isNull",requestMethodCode));
|
|
||||||
}
|
|
||||||
result = (BaseResponse) method.invoke(this, param);
|
|
||||||
} catch (Exception e) {
|
|
||||||
String message = ObjectUtil.isEmpty(e.getMessage())
|
|
||||||
? ((InvocationTargetException) e).getTargetException().getMessage()
|
|
||||||
: e.getMessage();
|
|
||||||
log.error("ACS请求LMS出现错误: {}", message);
|
|
||||||
result.setCode(HttpStatus.HTTP_BAD_REQUEST);
|
|
||||||
result.setMessage(message);
|
|
||||||
result.setRequestNo(requestNo);
|
|
||||||
// 消息通知
|
|
||||||
noticeService.createNotice("异常信息:" + message, "acsApply: " + param.getString("request_medthod_code"),
|
|
||||||
NoticeTypeEnum.EXCEPTION.getCode());
|
|
||||||
}
|
|
||||||
// acs对接记录
|
|
||||||
interactRecordService.saveRecord(requestMethodName, param, result, GeneralDefinition.ACS_LMS);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 提前要料
|
|
||||||
*
|
|
||||||
* @param param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public BaseResponse pressRequestMaterial2(JSONObject param) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务反馈
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse feedbackTaskStatus(JSONObject param) {
|
public String againApply(String task_id) {
|
||||||
// todo: action暂未维护
|
return null;
|
||||||
String requestNo = param.getString("requestNo");
|
|
||||||
FeedBackTaskStatusRequest taskStatusRequest = param.toJavaObject(FeedBackTaskStatusRequest.class);
|
|
||||||
JSONObject taskInfo = taskStatusRequest.getTask_info();
|
|
||||||
if (ObjectUtil.isEmpty(taskInfo)) {
|
|
||||||
throw new BadRequestException("任务信息不能为空!");
|
|
||||||
}
|
|
||||||
SchBaseTask taskObj = taskService.getByCode(taskInfo.getString("task_code"));
|
|
||||||
if (ObjectUtil.isEmpty(taskObj)) {
|
|
||||||
throw new BadRequestException("未找到任务编码为 [" + taskInfo.getString("task_code") + "] 的任务");
|
|
||||||
}
|
|
||||||
// 任务处理类
|
|
||||||
String processingClass = taskObj.getConfig_code();
|
|
||||||
//1:执行中,2:完成 ,3:acs取消
|
|
||||||
String acsTaskStatus = param.getString("task_status");
|
|
||||||
String message = "";
|
|
||||||
TaskStatus status = TaskStatus.APPLY;
|
|
||||||
switch (acsTaskStatus) {
|
|
||||||
case "1":
|
|
||||||
status = TaskStatus.EXECUTING;
|
|
||||||
break;
|
|
||||||
case "2":
|
|
||||||
status = TaskStatus.FINISHED;
|
|
||||||
break;
|
|
||||||
case "3":
|
|
||||||
status = TaskStatus.CANCELED;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// 根据配置去工厂类获得类对象
|
|
||||||
AbstractTask abstractTask = taskFactory.getTask(processingClass);
|
|
||||||
// 更新任务
|
|
||||||
try {
|
|
||||||
abstractTask.updateTaskStatus(taskInfo, status);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("任务状态更新失败: {}", message);
|
|
||||||
return BaseResponse.responseError(requestNo, "任务:[" + taskInfo.getString("task_code") + "]状态更新失败," + message);
|
|
||||||
}
|
|
||||||
return BaseResponse.responseOk(requestNo, "任务状态反馈成功!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 实时修改点位状态
|
|
||||||
*/
|
|
||||||
@SneakyThrows
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse realTimeSetPoint(JSONObject param) {
|
public Map<String, Object> receivePointStatusFromAcs(Map<String, String> jsonObject) {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject apply(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject deviceApply(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject process(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject shipDeviceUpdate(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject sendDeviceStatus(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject sendCBZInfo(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject sendGetGoalStruct(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject actionFinishRequest(JSONObject whereJson) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(JSONObject json) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initPoint() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject slitterApply(JSONObject param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject feedbackSubVolumeWeightApply(JSONObject param) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject actionFinishRequest2(JSONObject param) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ public class PdmBiRawfoilworkorder extends Model<PdmBiRawfoilworkorder> {
|
|||||||
* 请求入半成品库
|
* 请求入半成品库
|
||||||
*/
|
*/
|
||||||
private String is_instor;
|
private String is_instor;
|
||||||
|
private String wind_roll;
|
||||||
|
private String order_type;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package org.nl.wms.util;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.nl.config.SpringContextHolder;
|
||||||
|
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||||
|
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API 接口地址枚举
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum URLEnum {
|
||||||
|
//
|
||||||
|
ACS_URL_A1("A1", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A1").getValue());
|
||||||
|
|
||||||
|
private final String product_area;
|
||||||
|
|
||||||
|
private final Supplier<String> acs_url;
|
||||||
|
|
||||||
|
public static String find(String product_area) {
|
||||||
|
for (URLEnum value : URLEnum.values()) {
|
||||||
|
if (product_area.equals(value.getProduct_area())) {
|
||||||
|
return value.getAcs_url().get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ nl:
|
|||||||
port: 3306
|
port: 3306
|
||||||
username: root
|
username: root
|
||||||
password: 12356
|
password: 12356
|
||||||
database: nl-platform
|
database: ldnx_lms2
|
||||||
redis:
|
redis:
|
||||||
ip: 127.0.0.1
|
ip: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<contextName>nlAdmin</contextName>
|
<contextName>nlAdmin</contextName>
|
||||||
<property name="log.charset" value="utf-8"/>
|
<property name="log.charset" value="utf-8"/>
|
||||||
<property name="log.pattern"
|
<property name="log.pattern"
|
||||||
value="%cyan(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %blue(%msg%n)"/>
|
value="%cyan(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss.SSS}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}) - %cyan(%msg%n)"/>
|
||||||
<property name="LOG_HOME" value="${logPath}"/>
|
<property name="LOG_HOME" value="${logPath}"/>
|
||||||
<!--引入默认的一些设置-->
|
<!--引入默认的一些设置-->
|
||||||
<!--<include resource="log/XrToMes.xml"/>
|
<!--<include resource="log/XrToMes.xml"/>
|
||||||
|
|||||||
@@ -0,0 +1,323 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-input
|
||||||
|
v-model="query.blurry"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
placeholder="输入名称或者描述搜索"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
<rrOperation/>
|
||||||
|
</div>
|
||||||
|
<crudOperation :permission="permission"/>
|
||||||
|
</div>
|
||||||
|
<!-- 表单渲染 -->
|
||||||
|
<el-row :gutter="15">
|
||||||
|
<!--角色管理-->
|
||||||
|
<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="17" style="margin-bottom: 10px">
|
||||||
|
<el-card class="box-card" shadow="never">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span class="role-span">角色列表</span>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
highlight-current-row
|
||||||
|
style="width: 100%;"
|
||||||
|
:data="crud.data"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
>
|
||||||
|
<el-table-column show-overflow-tooltip prop="username" label="用户名"/>
|
||||||
|
<el-table-column show-overflow-tooltip prop="person_name" label="姓名"/>
|
||||||
|
<el-table-column prop="name" label="部门"/>
|
||||||
|
<!--<el-table-column show-overflow-tooltip prop="dept" label="部门">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.row.dept.name }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination/>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<!-- 菜单授权 -->
|
||||||
|
<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="7">
|
||||||
|
<el-card class="box-card" shadow="never">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<el-tooltip class="item" effect="dark" content="选择指定角色分配菜单" placement="top">
|
||||||
|
<span class="role-span">区域选择</span>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-button
|
||||||
|
v-permission="['admin','roles:edit']"
|
||||||
|
:disabled="!showButton"
|
||||||
|
:loading="menuLoading"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
style="float: right; padding: 6px 9px"
|
||||||
|
type="primary"
|
||||||
|
@click="saveMenu"
|
||||||
|
>保存
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="tableData"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="product_area" label="区域" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudUserArea from '@/views/wms/basedata/product/userArea/userArea'
|
||||||
|
import { getDepts, getDeptSuperior } from '@/views/system/dept/dept'
|
||||||
|
import { getChild, getMenusTree } from '@/views/system/menu/menu'
|
||||||
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||||
|
|
||||||
|
const defaultForm = { id: null, name: null, depts: [], description: null, dataScope: '全部', level: 3 }
|
||||||
|
export default {
|
||||||
|
name: 'UserStor',
|
||||||
|
components: { Treeselect, pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '角色',
|
||||||
|
url: 'api/userArea',
|
||||||
|
crudMethod: { ...crudUserArea },
|
||||||
|
optShow: { add: false, reset: false, edit: false, del: false }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
level: 3,
|
||||||
|
currentId: 0, menuLoading: false, showButton: false,
|
||||||
|
menus: [], menuIds: [], depts: [], deptDatas: [], // 多选时使用
|
||||||
|
tableData: [{ 'product_area': 'A1' }, { 'product_area': 'A2' }, { 'product_area': 'A3' }, { 'product_area': 'A4' }, { 'product_area': 'LK' }, { 'product_area': 'B1' }, { 'product_area': 'B2' }, { 'product_area': 'B3' }, { 'product_area': 'B4' }, { 'product_area': 'BLK' }],
|
||||||
|
currentRow: null,
|
||||||
|
permission: {
|
||||||
|
add: ['admin', 'roles:add'],
|
||||||
|
edit: ['admin', 'roles:edit'],
|
||||||
|
del: ['admin', 'roles:del']
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
permission: [
|
||||||
|
{ required: true, message: '请输入权限', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getMenuDatas(node, resolve) {
|
||||||
|
setTimeout(() => {
|
||||||
|
getMenusTree(node.data.id ? node.data.id : 0).then(res => {
|
||||||
|
resolve(res)
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
},
|
||||||
|
[CRUD.HOOK.afterRefresh]() {
|
||||||
|
this.$refs.menu.setCheckedKeys([])
|
||||||
|
},
|
||||||
|
// 新增前初始化部门信息
|
||||||
|
[CRUD.HOOK.beforeToAdd]() {
|
||||||
|
this.deptDatas = []
|
||||||
|
},
|
||||||
|
// 编辑前初始化自定义数据权限的部门信息
|
||||||
|
[CRUD.HOOK.beforeToEdit](crud, form) {
|
||||||
|
this.deptDatas = []
|
||||||
|
if (form.dataScope === '自定义') {
|
||||||
|
this.getSupDepts(form.depts)
|
||||||
|
}
|
||||||
|
const _this = this
|
||||||
|
form.depts.forEach(function(dept) {
|
||||||
|
_this.deptDatas.push(dept.id)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 提交前做的操作
|
||||||
|
[CRUD.HOOK.afterValidateCU](crud) {
|
||||||
|
if (crud.form.dataScope === '自定义' && this.deptDatas.length === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '自定义数据权限不能为空',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return false
|
||||||
|
} else if (crud.form.dataScope === '自定义') {
|
||||||
|
const depts = []
|
||||||
|
this.deptDatas.forEach(function(data) {
|
||||||
|
const dept = { id: data }
|
||||||
|
depts.push(dept)
|
||||||
|
})
|
||||||
|
crud.form.depts = depts
|
||||||
|
} else {
|
||||||
|
crud.form.depts = []
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
// 触发单选
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
if (val) {
|
||||||
|
this.showButton = true
|
||||||
|
this.$refs.multipleTable.clearSelection()
|
||||||
|
this.currentRow = val
|
||||||
|
crudUserArea.queryUserArea(val).then(res => {
|
||||||
|
res.forEach(row => {
|
||||||
|
this.tableData.forEach(selected => {
|
||||||
|
if (selected.product_area === row.product_area) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(selected, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
menuChange(menu) {
|
||||||
|
// 获取该节点的所有子节点,id 包含自身
|
||||||
|
getChild(menu.id).then(childIds => {
|
||||||
|
// 判断是否在 menuIds 中,如果存在则删除,否则添加
|
||||||
|
if (this.menuIds.indexOf(menu.id) !== -1) {
|
||||||
|
for (let i = 0; i < childIds.length; i++) {
|
||||||
|
const index = this.menuIds.indexOf(childIds[i])
|
||||||
|
if (index !== -1) {
|
||||||
|
this.menuIds.splice(index, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < childIds.length; i++) {
|
||||||
|
const index = this.menuIds.indexOf(childIds[i])
|
||||||
|
if (index === -1) {
|
||||||
|
this.menuIds.push(childIds[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$refs.menu.setCheckedKeys(this.menuIds)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 保存菜单
|
||||||
|
saveMenu() {
|
||||||
|
const row = {}
|
||||||
|
row.jo = this.currentRow
|
||||||
|
row.rows = this.$refs.multipleTable.selection
|
||||||
|
crudUserArea.save(row).then(res => {
|
||||||
|
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 改变数据
|
||||||
|
update() {
|
||||||
|
// 无刷新更新 表格数据
|
||||||
|
crudRoles.get(this.currentId).then(res => {
|
||||||
|
for (let i = 0; i < this.crud.data.length; i++) {
|
||||||
|
if (res.id === this.crud.data[i].id) {
|
||||||
|
this.crud.data[i] = res
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取部门数据
|
||||||
|
getDepts() {
|
||||||
|
getDepts({ enabled: true }).then(res => {
|
||||||
|
this.depts = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getSupDepts(depts) {
|
||||||
|
const ids = []
|
||||||
|
depts.forEach(dept => {
|
||||||
|
ids.push(dept.id)
|
||||||
|
})
|
||||||
|
getDeptSuperior(ids).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.buildDepts(date)
|
||||||
|
this.depts = date
|
||||||
|
})
|
||||||
|
},
|
||||||
|
buildDepts(depts) {
|
||||||
|
depts.forEach(data => {
|
||||||
|
if (data.children) {
|
||||||
|
this.buildDepts(data.children)
|
||||||
|
}
|
||||||
|
if (data.hasChildren && !data.children) {
|
||||||
|
data.children = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取弹窗内部门数据
|
||||||
|
loadDepts({ action, parentNode, callback }) {
|
||||||
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
||||||
|
parentNode.children = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
callback()
|
||||||
|
}, 200)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 如果数据权限为自定义则获取部门数据
|
||||||
|
changeScope() {
|
||||||
|
if (this.form.dataScope === '自定义') {
|
||||||
|
this.getDepts()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkboxT(row) {
|
||||||
|
return row.level >= this.level
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.role-span {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #303133;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep .el-input-number .el-input__inner {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .vue-treeselect__multi-value {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .vue-treeselect__multi-value-item {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function queryStor(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/userArea/queryStor',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function queryUserArea(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/userArea/queryUserArea',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function save(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/userArea/save',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getuserArea(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/userArea/getuserArea',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSect(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/userArea/getSect',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { queryUserArea, queryStor, save, getuserArea, getSect }
|
||||||
@@ -8,15 +8,16 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
class="demo-form-inline"
|
class="demo-form-inline"
|
||||||
label-position="right"
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item :label="$t('RawFoil.search.product_area')">
|
<el-form-item label="生产区域">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.product_area"
|
v-model="query.product_area"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
:placeholder="$t('common.Please_select')"
|
placeholder="请选择"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@change="hand"
|
@change="hand"
|
||||||
>
|
>
|
||||||
@@ -28,33 +29,33 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('RawFoil.dialog.resource_name')">
|
<el-form-item label="机台编码">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.resource_name"
|
v-model="query.resource_name"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
:placeholder="$t('RawFoil.dialog.resource_name')"
|
placeholder="机台编码"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('RawFoil.dialog.container_name')">
|
<el-form-item label="母卷号">
|
||||||
<!-- <label slot="label">母 卷 号:</label>-->
|
<label slot="label">母 卷 号:</label>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.container_name"
|
v-model="query.container_name"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
:placeholder="$t('RawFoil.dialog.container_name')"
|
placeholder="母卷号"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('RawFoil.search.status')">
|
<el-form-item label="工单状态">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.status"
|
v-model="query.status"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
:placeholder="$t('RawFoil.search.status')"
|
placeholder="工单状态"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@change="hand"
|
@change="hand"
|
||||||
>
|
>
|
||||||
@@ -66,13 +67,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="$t('RawFoil.search.createTime')">
|
<el-form-item label="工单日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.createTime"
|
v-model="query.createTime"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
:start-placeholder="$t('common.startDate')"
|
start-placeholder="开始日期"
|
||||||
:end-placeholder="$t('common.endDate')"
|
end-placeholder="结束日期"
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
@@ -92,7 +93,7 @@
|
|||||||
:disabled="crud.selections.length !== 1"
|
:disabled="crud.selections.length !== 1"
|
||||||
@click="compelEnd"
|
@click="compelEnd"
|
||||||
>
|
>
|
||||||
{{ $t('RawFoil.search.button_end') }}
|
强制结束
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
@@ -103,7 +104,7 @@
|
|||||||
:disabled="crud.selections.length !== 1"
|
:disabled="crud.selections.length !== 1"
|
||||||
@click="weigh"
|
@click="weigh"
|
||||||
>
|
>
|
||||||
{{ $t('RawFoil.search.button_weight') }}
|
称重
|
||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
@@ -112,17 +113,17 @@
|
|||||||
:before-close="crud.cancelCU"
|
:before-close="crud.cancelCU"
|
||||||
:visible.sync="crud.status.cu > 0"
|
:visible.sync="crud.status.cu > 0"
|
||||||
:title="crud.status.title"
|
:title="crud.status.title"
|
||||||
:width="computedLabelWidth"
|
width="800px"
|
||||||
>
|
>
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" :label-width="computedFormLabelWidth">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.container_name')" prop="container_name">
|
<el-form-item label="母卷号" prop="container_name">
|
||||||
<el-input v-model="form.container_name" style="width: 250px;" />
|
<el-input v-model="form.container_name" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.resource_name')" prop="resource_name">
|
<el-form-item label="机台编码" prop="resource_name">
|
||||||
<el-input v-model="form.resource_name" style="width: 250px;" />
|
<el-input v-model="form.resource_name" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -130,12 +131,12 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.mfg_order_name')" prop="mfg_order_name">
|
<el-form-item label="生产工单" prop="mfg_order_name">
|
||||||
<el-input v-model="form.mfg_order_name" style="width: 250px;" />
|
<el-input v-model="form.mfg_order_name" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.product_name')" prop="product_name">
|
<el-form-item label="产品编码" prop="product_name">
|
||||||
<el-input v-model="form.product_name" style="width: 250px;" />
|
<el-input v-model="form.product_name" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -143,12 +144,12 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.description')" prop="description">
|
<el-form-item label="产品名称" prop="description">
|
||||||
<el-input v-model="form.description" style="width: 250px;" />
|
<el-input v-model="form.description" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.theory_height')" prop="theory_height">
|
<el-form-item label="理论长度" prop="theory_height">
|
||||||
<el-input v-model="form.theory_height" style="width: 250px;" />
|
<el-input v-model="form.theory_height" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -156,17 +157,17 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.eqp_velocity')" prop="eqp_velocity">
|
<el-form-item label="设备生产速度" prop="eqp_velocity">
|
||||||
<el-input v-model="form.eqp_velocity" style="width: 250px;" />
|
<el-input v-model="form.eqp_velocity" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.up_coiler_date')" prop="up_coiler_date">
|
<el-form-item label="上卷开始时间" prop="up_coiler_date">
|
||||||
<!-- <el-date-picker v-model="form.up_coiler_date" type="date" placeholder="选择日期" style="width: 250px" value-format="yyyy-MM-dd" />-->
|
<!-- <el-date-picker v-model="form.up_coiler_date" type="date" placeholder="选择日期" style="width: 250px" value-format="yyyy-MM-dd" />-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.up_coiler_date"
|
v-model="form.up_coiler_date"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
:placeholder="$t('common.Tip18')"
|
placeholder="选择日期时间"
|
||||||
style="width: 250px"
|
style="width: 250px"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
default-time="12:00:00"
|
default-time="12:00:00"
|
||||||
@@ -177,12 +178,12 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.productin_qty')">
|
<el-form-item label="重量">
|
||||||
<el-input v-model="form.productin_qty" style="width: 250px;" />
|
<el-input v-model="form.productin_qty" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.agvno')">
|
<el-form-item label="车号">
|
||||||
<el-input v-model="form.agvno" style="width: 250px;" />
|
<el-input v-model="form.agvno" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -190,22 +191,22 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.remark')">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" style="width: 250px;" />
|
<el-input v-model="form.remark" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('RawFoil.dialog.is_reload_send')">
|
<el-form-item label="是否重新更新">
|
||||||
<el-radio v-model="form.is_reload_send" label="0">{{ $t('common.No') }}</el-radio>
|
<el-radio v-model="form.is_reload_send" label="0">否</el-radio>
|
||||||
<el-radio v-model="form.is_reload_send" label="1">{{ $t('common.Yes') }}</el-radio>
|
<el-radio v-model="form.is_reload_send" label="1">是</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -219,86 +220,22 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column v-if="false" prop="workorder_id" label="工单标识" />
|
<el-table-column v-if="false" prop="workorder_id" label="工单标识" />
|
||||||
<el-table-column
|
<el-table-column prop="mfg_order_name" label="工单号" :min-width="flexWidth('mfg_order_name',crud.data,'工单号')" />
|
||||||
prop="mfg_order_name"
|
<el-table-column prop="status" label="工单状态" :min-width="flexWidth('status',crud.data,'工单状态')" :formatter="formatStatusName" />
|
||||||
:label="$t('RawFoil.table.mfg_order_name')"
|
<el-table-column prop="container_name" label="母卷号" :min-width="flexWidth('container_name',crud.data,'母卷号')" />
|
||||||
:min-width="flexWidth('mfg_order_name', crud.data, $t('RawFoil.table.mfg_order_name'))"
|
<el-table-column prop="point_code2" label="点位编码" :min-width="flexWidth('point_code2',crud.data,'点位编码')" />
|
||||||
/>
|
<el-table-column prop="resource_name" label="机台编码" :min-width="flexWidth('resource_name',crud.data,'机台编码')" />
|
||||||
<el-table-column
|
<el-table-column prop="product_name" label="产品编码" :min-width="flexWidth('product_name',crud.data,'产品编码')" />
|
||||||
prop="status"
|
<el-table-column prop="theory_height" label="理论长度" :min-width="flexWidth('theory_height',crud.data,'理论长度')" />
|
||||||
:label="$t('RawFoil.table.status')"
|
<el-table-column prop="realstart_time" label="开始时间" :min-width="flexWidth('realstart_time',crud.data,'开始时间')" />
|
||||||
:min-width="flexWidth('status', crud.data, $t('RawFoil.table.status'), 5)"
|
<el-table-column prop="realend_time" label="结束时间" :min-width="flexWidth('realend_time',crud.data,'结束时间')" />
|
||||||
:formatter="formatStatusName"
|
<el-table-column prop="productin_qty" label="重量" :min-width="flexWidth('productin_qty',crud.data,'重量')" :formatter="crud.formatNum3" />
|
||||||
/>
|
<el-table-column prop="agvno" label="车号" :min-width="flexWidth('agvno',crud.data,'车号')" />
|
||||||
<el-table-column
|
<el-table-column prop="product_area" label="生产区域" :min-width="flexWidth('product_area',crud.data,'生产区域')" />
|
||||||
prop="container_name"
|
<el-table-column prop="is_baking" label="请求烘烤" :min-width="flexWidth('is_baking',crud.data,'请求烘烤')" :formatter="formatBakeIsOrNot" />
|
||||||
:label="$t('RawFoil.table.container_name')"
|
<el-table-column prop="is_instor" label="请求入半成品库" :min-width="flexWidth('is_instor',crud.data,'请求入半成品库')" :formatter="formatStorIsOrNot" />
|
||||||
:min-width="flexWidth('container_name',crud.data,$t('RawFoil.table.container_name'))"
|
<el-table-column prop="update_time" label="更新时间" :min-width="flexWidth('update_time',crud.data,'更新时间')" />
|
||||||
/>
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<el-table-column
|
|
||||||
prop="point_code2"
|
|
||||||
:label="$t('RawFoil.table.point_code2')"
|
|
||||||
:min-width="flexWidth('point_code2',crud.data,$t('RawFoil.table.point_code2'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="resource_name"
|
|
||||||
:label="$t('RawFoil.table.resource_name')"
|
|
||||||
:min-width="flexWidth('resource_name',crud.data,$t('RawFoil.table.resource_name'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="product_name"
|
|
||||||
:label="$t('RawFoil.table.product_name')"
|
|
||||||
:min-width="flexWidth('product_name',crud.data,$t('RawFoil.table.product_name'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="theory_height"
|
|
||||||
:label="$t('RawFoil.table.theory_height')"
|
|
||||||
:min-width="flexWidth('theory_height',crud.data,$t('RawFoil.table.theory_height'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="realstart_time"
|
|
||||||
:label="$t('RawFoil.table.realstart_time')"
|
|
||||||
:min-width="flexWidth('realstart_time',crud.data,$t('RawFoil.table.realstart_time'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="realend_time"
|
|
||||||
:label="$t('RawFoil.table.realend_time')"
|
|
||||||
:min-width="flexWidth('realend_time',crud.data,$t('RawFoil.table.realend_time'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="productin_qty"
|
|
||||||
:label="$t('RawFoil.table.productin_qty')"
|
|
||||||
:min-width="flexWidth('productin_qty',crud.data,$t('RawFoil.table.productin_qty'))"
|
|
||||||
:formatter="crud.formatNum3"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="agvno"
|
|
||||||
:label="$t('RawFoil.table.agvno')"
|
|
||||||
:min-width="flexWidth('agvno',crud.data,$t('RawFoil.table.agvno'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="product_area"
|
|
||||||
:label="$t('RawFoil.table.product_area')"
|
|
||||||
:min-width="flexWidth('product_area',crud.data,$t('RawFoil.table.product_area'))"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="is_baking"
|
|
||||||
:label="$t('RawFoil.table.is_baking')"
|
|
||||||
:min-width="flexWidth('is_baking',crud.data,$t('RawFoil.table.is_baking'))"
|
|
||||||
:formatter="formatBakeIsOrNot"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="is_instor"
|
|
||||||
:label="$t('RawFoil.table.is_instor')"
|
|
||||||
:min-width="flexWidth('is_instor',crud.data,$t('RawFoil.table.is_instor'))"
|
|
||||||
:formatter="formatStorIsOrNot"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="update_time"
|
|
||||||
:label="$t('RawFoil.table.update_time')"
|
|
||||||
:min-width="flexWidth('update_time',crud.data,$t('RawFoil.table.update_time'))"
|
|
||||||
/>
|
|
||||||
<el-table-column v-permission="[]" :label="$t('common.Operate')" width="160px" align="center" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
@@ -324,7 +261,6 @@ import rrOperation from '@crud/RR.operation'
|
|||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import i18n from '@/i18n'
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
workorder_id: null,
|
workorder_id: null,
|
||||||
@@ -359,7 +295,7 @@ export default {
|
|||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: i18n.t('RawFoil.title'),
|
title: '生箔工序工单',
|
||||||
url: 'api/rawfoilworkorder',
|
url: 'api/rawfoilworkorder',
|
||||||
idField: 'workorder_id',
|
idField: 'workorder_id',
|
||||||
sort: 'workorder_id,desc',
|
sort: 'workorder_id,desc',
|
||||||
@@ -379,52 +315,30 @@ export default {
|
|||||||
openParam: null,
|
openParam: null,
|
||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
container_name: [
|
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m2'), trigger: 'blur' }
|
|
||||||
],
|
|
||||||
resource_name: [
|
resource_name: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m3'), trigger: 'blur' }
|
{ required: true, message: '机台编码不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
mfg_order_name: [
|
mfg_order_name: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m4'), trigger: 'blur' }
|
{ required: true, message: '生产工单不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
product_name: [
|
product_name: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m5'), trigger: 'blur' }
|
{ required: true, message: '产品编码不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m6'), trigger: 'blur' }
|
{ required: true, message: '产品名称不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
theory_height: [
|
theory_height: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m7'), trigger: 'blur' }
|
{ required: true, message: '理论长度不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
eqp_velocity: [
|
eqp_velocity: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m8'), trigger: 'blur' }
|
{ required: true, message: '设备生产速度不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
p_coiler_date: [
|
p_coiler_date: [
|
||||||
{ required: true, message: i18n.t('RawFoil.msg.m9'), trigger: 'blur' }
|
{ required: true, message: '上卷开始时间不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
computedLabelWidth() {
|
|
||||||
const item = localStorage.getItem('lang')
|
|
||||||
if (item === 'in') {
|
|
||||||
return `900px`
|
|
||||||
}
|
|
||||||
return `800px`
|
|
||||||
},
|
|
||||||
computedFormLabelWidth() {
|
|
||||||
const item = localStorage.getItem('lang')
|
|
||||||
if (item === 'zh') {
|
|
||||||
return `110px`
|
|
||||||
}
|
|
||||||
if (item === 'in') {
|
|
||||||
return `170px`
|
|
||||||
}
|
|
||||||
return `130px`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
@@ -446,11 +360,11 @@ export default {
|
|||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
const data = _selectData[0]
|
const data = _selectData[0]
|
||||||
if (data.status === '09') {
|
if (data.status === '09') {
|
||||||
return this.crud.notify(i18n.t('RawFoil.msg.m1'), CRUD.NOTIFICATION_TYPE.INFO)
|
return this.crud.notify('不能对完成状态的工单强制结束', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
}
|
}
|
||||||
crudRawfoilworkorder.compelEnd(data).then(res => {
|
crudRawfoilworkorder.compelEnd(data).then(res => {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.crud.notify(i18n.t('common.Operation_success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
weigh() {
|
weigh() {
|
||||||
|
|||||||
Reference in New Issue
Block a user