Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -25,6 +25,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.nl.modules.common.config.RsaProperties;
|
import org.nl.modules.common.config.RsaProperties;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.PageUtil;
|
import org.nl.modules.common.utils.PageUtil;
|
||||||
|
import org.nl.modules.common.utils.RedisUtils;
|
||||||
import org.nl.modules.common.utils.RsaUtils;
|
import org.nl.modules.common.utils.RsaUtils;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.logging.annotation.Log;
|
import org.nl.modules.logging.annotation.Log;
|
||||||
@@ -67,6 +68,7 @@ public class UserController {
|
|||||||
private final DataService dataService;
|
private final DataService dataService;
|
||||||
private final DeptService deptService;
|
private final DeptService deptService;
|
||||||
private final RoleService roleService;
|
private final RoleService roleService;
|
||||||
|
private final RedisUtils redisUtils;
|
||||||
|
|
||||||
@ApiOperation("导出用户数据")
|
@ApiOperation("导出用户数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@@ -144,6 +146,12 @@ public class UserController {
|
|||||||
if (currentLevel > optLevel) {
|
if (currentLevel > optLevel) {
|
||||||
throw new BadRequestException("角色权限不足,不能删除:" + userService.findById(id).getUsername());
|
throw new BadRequestException("角色权限不足,不能删除:" + userService.findById(id).getUsername());
|
||||||
}
|
}
|
||||||
|
// 删除缓存信息
|
||||||
|
UserDto userDto = userService.findById(id);
|
||||||
|
redisUtils.del("data::user:" + userDto.getId());
|
||||||
|
redisUtils.del("menu::user:" + userDto.getId());
|
||||||
|
redisUtils.del("role::auth:" + userDto.getId());
|
||||||
|
redisUtils.del("user::username:" + userDto.getUsername());
|
||||||
}
|
}
|
||||||
userService.delete(ids);
|
userService.delete(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
|||||||
@@ -80,15 +80,15 @@
|
|||||||
<#list columns as column>
|
<#list columns as column>
|
||||||
<#if column.columnShow>
|
<#if column.columnShow>
|
||||||
<#if (column.dictName)?? && (column.dictName)!="">
|
<#if (column.dictName)?? && (column.dictName)!="">
|
||||||
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>">
|
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :min-width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.${column.dictName}[scope.row.${column.changeColumnName}] }}
|
{{ dict.label.${column.dictName}[scope.row.${column.changeColumnName}] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<#elseif column.columnType != 'Timestamp'>
|
<#elseif column.columnType != 'Timestamp'>
|
||||||
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" />
|
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :min-width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')"/>
|
||||||
<#else>
|
<#else>
|
||||||
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>">
|
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :min-width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.${column.changeColumnName}) }}</span>
|
<span>{{ parseTime(scope.row.${column.changeColumnName}) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import '@logicflow/extension/lib/style/index.css'
|
|||||||
import Tinymce from '@/views/system/build/tinymce/index.vue'
|
import Tinymce from '@/views/system/build/tinymce/index.vue'
|
||||||
import request from '@/utils/request' // 实现 form generator 使用自己定义的 axios request 对象
|
import request from '@/utils/request' // 实现 form generator 使用自己定义的 axios request 对象
|
||||||
|
|
||||||
import { addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels } from '@/utils/nladmin'
|
import { addDateRange, handleTree, parseTime, resetForm, selectDictLabel, selectDictLabels, flexWidth } from '@/utils/nladmin'
|
||||||
|
|
||||||
import { getValueByCode } from '@/api/system/param'
|
import { getValueByCode } from '@/api/system/param'
|
||||||
|
|
||||||
@@ -59,6 +59,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
|
|||||||
Vue.prototype.selectDictLabels = selectDictLabels
|
Vue.prototype.selectDictLabels = selectDictLabels
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
Vue.prototype.getValueByCode = getValueByCode
|
Vue.prototype.getValueByCode = getValueByCode
|
||||||
|
Vue.prototype.flexWidth = flexWidth
|
||||||
|
|
||||||
Vue.use(scroll)
|
Vue.use(scroll)
|
||||||
|
|
||||||
|
|||||||
@@ -222,3 +222,46 @@ export async function blobValidate(data) {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动列宽
|
||||||
|
* flexWidth: https://blog.csdn.net/luoyumeiluoyumei/article/details/125853152?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1-125853152-blog-123421632.pc_relevant_recovery_v2&spm=1001.2101.3001.4242.2&utm_relevant_index=4
|
||||||
|
* @param prop 每列的prop 不能为空
|
||||||
|
* @param tableData 表格数据
|
||||||
|
* @param title 标题长内容短的,传标题 不能为空
|
||||||
|
* @param num 列中有标签等加的富余量
|
||||||
|
* @returns 列的宽度
|
||||||
|
* 注:prop,title有一个必传
|
||||||
|
*/
|
||||||
|
export function flexWidth(prop, tableData, title, num = 0) {
|
||||||
|
if (tableData.length === 0) { // 表格没数据不做处理
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let flexWidth = 0// 初始化表格列宽
|
||||||
|
let columnContent = ''// 占位最宽的内容
|
||||||
|
const canvas = document.createElement('canvas')
|
||||||
|
const context = canvas.getContext('2d')
|
||||||
|
context.font = '14px Microsoft YaHei'
|
||||||
|
// 获取占位最宽的内容
|
||||||
|
let index = 0
|
||||||
|
for (let i = 0; i < tableData.length; i++) { // 循环表格内容,获取表格内容中最长的数据
|
||||||
|
const now_temp = tableData[i][prop] + ''
|
||||||
|
const max_temp = tableData[index][prop] + ''
|
||||||
|
const now_temp_w = context.measureText(now_temp).width
|
||||||
|
const max_temp_w = context.measureText(max_temp).width
|
||||||
|
if (now_temp_w > max_temp_w) {
|
||||||
|
index = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
columnContent = tableData[index][prop]
|
||||||
|
const column_w = context.measureText(columnContent).width
|
||||||
|
const title_w = context.measureText(title).width
|
||||||
|
if (column_w < title_w) {
|
||||||
|
columnContent = title || '留四个字'
|
||||||
|
}
|
||||||
|
// 计算最宽内容的列宽
|
||||||
|
const width = context.measureText(columnContent)
|
||||||
|
flexWidth = width.width + 20 + num
|
||||||
|
return flexWidth + 'px'
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import org.nl.modules.common.config.RsaProperties;
|
import org.nl.modules.common.config.RsaProperties;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.PageUtil;
|
import org.nl.modules.common.utils.PageUtil;
|
||||||
|
import org.nl.modules.common.utils.RedisUtils;
|
||||||
import org.nl.modules.common.utils.RsaUtils;
|
import org.nl.modules.common.utils.RsaUtils;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.logging.annotation.Log;
|
import org.nl.modules.logging.annotation.Log;
|
||||||
@@ -67,6 +68,7 @@ public class UserController {
|
|||||||
private final DataService dataService;
|
private final DataService dataService;
|
||||||
private final DeptService deptService;
|
private final DeptService deptService;
|
||||||
private final RoleService roleService;
|
private final RoleService roleService;
|
||||||
|
private final RedisUtils redisUtils;
|
||||||
|
|
||||||
@ApiOperation("导出用户数据")
|
@ApiOperation("导出用户数据")
|
||||||
@GetMapping(value = "/download")
|
@GetMapping(value = "/download")
|
||||||
@@ -144,6 +146,12 @@ public class UserController {
|
|||||||
if (currentLevel > optLevel) {
|
if (currentLevel > optLevel) {
|
||||||
throw new BadRequestException("角色权限不足,不能删除:" + userService.findById(id).getUsername());
|
throw new BadRequestException("角色权限不足,不能删除:" + userService.findById(id).getUsername());
|
||||||
}
|
}
|
||||||
|
// 删除缓存信息
|
||||||
|
UserDto userDto = userService.findById(id);
|
||||||
|
redisUtils.del("data::user:" + userDto.getId());
|
||||||
|
redisUtils.del("menu::user:" + userDto.getId());
|
||||||
|
redisUtils.del("role::auth:" + userDto.getId());
|
||||||
|
redisUtils.del("user::username:" + userDto.getUsername());
|
||||||
}
|
}
|
||||||
userService.delete(ids);
|
userService.delete(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
|||||||
@@ -317,8 +317,6 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
|
|
||||||
JSONObject jsonCool = coolTab.query("mfg_order_name = '" + raw_jo.getString("mfg_order_name") + "'").uniqueResult(0);
|
JSONObject jsonCool = coolTab.query("mfg_order_name = '" + raw_jo.getString("mfg_order_name") + "'").uniqueResult(0);
|
||||||
|
|
||||||
if (!StrUtil.equals(jsonCool.getString("status"), "04")) throw new BadRequestException("工单不为下卷完成");
|
|
||||||
|
|
||||||
jsonCool.put("status", "09");
|
jsonCool.put("status", "09");
|
||||||
jsonCool.put("realend_time", DateUtil.now());
|
jsonCool.put("realend_time", DateUtil.now());
|
||||||
jsonCool.put("finish_type", "02");
|
jsonCool.put("finish_type", "02");
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author geng by
|
* @author liuxy
|
||||||
* @date 2022-05-25
|
* @date 2022-05-25
|
||||||
**/
|
**/
|
||||||
@RestController
|
@RestController
|
||||||
@@ -30,10 +30,17 @@ public class CoolInController {
|
|||||||
private final CoolInService coolInService;
|
private final CoolInService coolInService;
|
||||||
|
|
||||||
@PostMapping("/coolIOQuery")
|
@PostMapping("/coolIOQuery")
|
||||||
@Log("新增生产设备")
|
@Log("半成品入库初始化查询")
|
||||||
@ApiOperation("新增生产设备")
|
@ApiOperation("半成品入库初始化查询")
|
||||||
public ResponseEntity<Object> create(@RequestBody JSONObject whereJson){
|
public ResponseEntity<Object> create(@RequestBody JSONObject whereJson){
|
||||||
return new ResponseEntity<>(coolInService.coolIOQuery(whereJson),HttpStatus.OK);
|
return new ResponseEntity<>(coolInService.coolIOQuery(whereJson),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirmInstor")
|
||||||
|
@Log("确认入库")
|
||||||
|
@ApiOperation("确认入库")
|
||||||
|
public ResponseEntity<Object> confirmInstor(@RequestBody JSONObject whereJson){
|
||||||
|
return new ResponseEntity<>(coolInService.confirmInstor(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.st.rest;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
|
import org.nl.wms.pda.st.service.CoolOutService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liuxy
|
||||||
|
* @date 2022-05-25
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "半成品出库")
|
||||||
|
@RequestMapping("/api/pda/coolOut")
|
||||||
|
@Slf4j
|
||||||
|
public class CoolOutController {
|
||||||
|
|
||||||
|
private final CoolOutService coolOutService;
|
||||||
|
|
||||||
|
@PostMapping("/coolIOQuery")
|
||||||
|
@Log("半成品出库初始化查询")
|
||||||
|
@ApiOperation("半成品出库初始化查询")
|
||||||
|
public ResponseEntity<Object> coolIOQuery(@RequestBody JSONObject whereJson){
|
||||||
|
return new ResponseEntity<>(coolOutService.coolIOQuery(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/confirmInstor")
|
||||||
|
@Log("出库确认")
|
||||||
|
@ApiOperation("出库确认")
|
||||||
|
public ResponseEntity<Object> confirmInstor(@RequestBody JSONObject whereJson){
|
||||||
|
return new ResponseEntity<>(coolOutService.confirmInstor(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.st.rest;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
|
import org.nl.wms.pda.st.service.ProductionOutService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liuxy
|
||||||
|
* @date 2022-05-25
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "出库确认")
|
||||||
|
@RequestMapping("/api/pda/st")
|
||||||
|
@Slf4j
|
||||||
|
public class ProductionOutController {
|
||||||
|
|
||||||
|
private final ProductionOutService productionOutService;
|
||||||
|
|
||||||
|
@PostMapping("/ivtQuery")
|
||||||
|
@Log("出库初始化查询")
|
||||||
|
@ApiOperation("出库初始化查询")
|
||||||
|
public ResponseEntity<Object> ivtQuery(@RequestBody JSONObject whereJson){
|
||||||
|
return new ResponseEntity<>(productionOutService.ivtQuery(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/outConfirm")
|
||||||
|
@Log("出库确认")
|
||||||
|
@ApiOperation("出库确认")
|
||||||
|
public ResponseEntity<Object> outConfirm(@RequestBody JSONObject whereJson){
|
||||||
|
return new ResponseEntity<>(productionOutService.outConfirm(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,15 +6,22 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 服务接口
|
* @description 服务接口
|
||||||
* @author geng by
|
* @author liuxy
|
||||||
* @date 2022-05-25
|
* @date 2022-05-25
|
||||||
**/
|
**/
|
||||||
public interface CoolInService {
|
public interface CoolInService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* 半成品入库
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONArray /
|
* @return JSONObject /
|
||||||
*/
|
*/
|
||||||
JSONArray coolIOQuery(JSONObject whereJson);
|
JSONObject coolIOQuery(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库确认
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject /
|
||||||
|
*/
|
||||||
|
JSONObject confirmInstor(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.st.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author liuxy
|
||||||
|
* @date 2022-05-25
|
||||||
|
**/
|
||||||
|
public interface CoolOutService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始查询
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject /
|
||||||
|
*/
|
||||||
|
JSONObject coolIOQuery(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库确认
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject /
|
||||||
|
*/
|
||||||
|
JSONObject confirmInstor(JSONObject whereJson);
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.st.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author liuxy
|
||||||
|
* @date 2022-05-25
|
||||||
|
**/
|
||||||
|
public interface ProductionOutService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库初始化查询
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject /
|
||||||
|
*/
|
||||||
|
JSONObject ivtQuery(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库确认
|
||||||
|
* @param whereJson /
|
||||||
|
* @return JSONObject /
|
||||||
|
*/
|
||||||
|
JSONObject outConfirm(JSONObject whereJson);
|
||||||
|
}
|
||||||
@@ -2,15 +2,25 @@
|
|||||||
package org.nl.wms.pda.st.service.impl;
|
package org.nl.wms.pda.st.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.wms.pda.st.service.CoolInService;
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author geng by
|
* @author liuxy
|
||||||
* @description 服务实现
|
* @description 服务实现
|
||||||
* @date 2022-05-25
|
* @date 2022-05-25
|
||||||
**/
|
**/
|
||||||
@@ -19,10 +29,72 @@ import org.springframework.stereotype.Service;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class CoolInServiceImpl implements CoolInService {
|
public class CoolInServiceImpl implements CoolInService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject coolIOQuery(JSONObject whereJson) {
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "1");
|
||||||
|
map.put("container_name", whereJson.getString("container_name"));
|
||||||
|
JSONArray resultJSONArray = WQL.getWO("PDA_COOLIN").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("data", resultJSONArray);
|
||||||
|
jo.put("message", "查询成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONArray coolIOQuery(JSONObject whereJson) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public JSONObject confirmInstor(JSONObject whereJson) {
|
||||||
return null;
|
|
||||||
|
WQLObject coolIvtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||||
|
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
JSONObject raw_jo = whereJson.getJSONObject("raw_jo");
|
||||||
|
String point_code = whereJson.getString("point_code"); // 终点点位
|
||||||
|
String is_bake = whereJson.getString("is_bake"); // 是否烘烤完成
|
||||||
|
|
||||||
|
// 查询终点在冷却区是否存在
|
||||||
|
JSONObject jsonCoolIvt = coolIvtTab.query("point_code = '" + point_code + "' and full_point_status = '01' and is_used = '1'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("此点位不存在或被占用"+point_code);
|
||||||
|
|
||||||
|
/* // 插入冷却区出入库单据
|
||||||
|
JSONObject jsonCool = new JSONObject();
|
||||||
|
jsonCool.put("iostorinv_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
jsonCool.put("bill_code", CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
|
||||||
|
jsonCool.put("io_type", "0");
|
||||||
|
jsonCool.put("material_id", "");
|
||||||
|
jsonCool.put("pcsn", "");
|
||||||
|
jsonCool.put("bill_status", "50");
|
||||||
|
jsonCool.put("start_point_code", raw_jo.getString("resource_name"));
|
||||||
|
jsonCool.put("end_point_code", point_code);
|
||||||
|
jsonCool.put("create_mode", "03");
|
||||||
|
jsonCool.put("create_id", currentUserId);
|
||||||
|
jsonCool.put("create_name", currentUsername);
|
||||||
|
jsonCool.put("create_time", DateUtil.now());
|
||||||
|
jsonCool.put("update_optid", currentUserId);
|
||||||
|
jsonCool.put("update_optname", currentUsername);
|
||||||
|
jsonCool.put("update_time", DateUtil.now());
|
||||||
|
jsonCool.put("confirm_optid", currentUserId);
|
||||||
|
jsonCool.put("confirm_optname", currentUsername);
|
||||||
|
jsonCool.put("confirm_time", DateUtil.now());
|
||||||
|
coolIvtTab.insert(jsonCool);*/
|
||||||
|
|
||||||
|
// 更新冷却区库存
|
||||||
|
jsonCoolIvt.put("full_point_status", "02");
|
||||||
|
if (StrUtil.equals(is_bake, "0")) jsonCoolIvt.put("cool_ivt_status", "01");
|
||||||
|
if (StrUtil.equals(is_bake, "1")) jsonCoolIvt.put("cool_ivt_status", "03");
|
||||||
|
jsonCoolIvt.put("container_name", raw_jo.getString("container_name"));
|
||||||
|
jsonCoolIvt.put("workorder_id", raw_jo.getString("workorder_id"));
|
||||||
|
jsonCoolIvt.put("instorage_time", DateUtil.now());
|
||||||
|
jsonCoolIvt.put("update_optid", currentUserId);
|
||||||
|
jsonCoolIvt.put("create_name", currentUsername);
|
||||||
|
jsonCoolIvt.put("update_time", DateUtil.now());
|
||||||
|
coolIvtTab.update(jsonCoolIvt);
|
||||||
|
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
result.put("message", "入库成功!");
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.st.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
|
import org.nl.wms.pda.st.service.CoolOutService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liuxy
|
||||||
|
* @description 服务实现
|
||||||
|
* @date 2022-05-25
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class CoolOutServiceImpl implements CoolOutService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject coolIOQuery(JSONObject whereJson) {
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "1");
|
||||||
|
map.put("container_name", whereJson.getString("container_name"));
|
||||||
|
map.put("product_area", whereJson.getString("product_area"));
|
||||||
|
JSONArray resultJSONArray = WQL.getWO("PDA_COOLOUT").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("data", resultJSONArray);
|
||||||
|
jo.put("message", "查询成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public JSONObject confirmInstor(JSONObject whereJson) {
|
||||||
|
|
||||||
|
WQLObject coolIvtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||||
|
String point_code = whereJson.getString("point_code"); // 出库点位
|
||||||
|
|
||||||
|
// 查询终点在冷却区是否存在
|
||||||
|
JSONObject jsonCoolIvt = coolIvtTab.query("point_code = '" + point_code + "' and full_point_status = '02' and is_used = '1'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonCoolIvt)) throw new BadRequestException("此点位不存在或是空位"+point_code);
|
||||||
|
|
||||||
|
// 更新点位状态
|
||||||
|
jsonCoolIvt.put("full_point_status", "01");
|
||||||
|
jsonCoolIvt.put("cool_ivt_status", "01");
|
||||||
|
jsonCoolIvt.put("container_name", "");
|
||||||
|
jsonCoolIvt.put("workorder_id", "");
|
||||||
|
jsonCoolIvt.put("ivt_qty", 0);
|
||||||
|
jsonCoolIvt.put("instorage_time", "");
|
||||||
|
coolIvtTab.update(jsonCoolIvt);
|
||||||
|
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
result.put("message", "出库成功!");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.pda.st.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wms.pda.st.service.CoolInService;
|
||||||
|
import org.nl.wms.pda.st.service.ProductionOutService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author liuxy
|
||||||
|
* @description 服务实现
|
||||||
|
* @date 2022-05-25
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class ProductionOutServiceImpl implements ProductionOutService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject ivtQuery(JSONObject whereJson) {
|
||||||
|
/* option
|
||||||
|
* 0-生产区查询
|
||||||
|
* 1-虚拟区查询
|
||||||
|
*/
|
||||||
|
String option = whereJson.getString("option");
|
||||||
|
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
if (StrUtil.equals(option, "0")) map.put("flag", "1");
|
||||||
|
if (StrUtil.equals(option, "1")) map.put("flag", "2");
|
||||||
|
map.put("box_no", whereJson.getString("box_no"));
|
||||||
|
map.put("point_code", whereJson.getString("point_code"));
|
||||||
|
JSONArray resultJSONArray = WQL.getWO("PDA_PRODUVTIONOUT").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
for (int i = 0; i < resultJSONArray.size(); i++) {
|
||||||
|
JSONObject jsonObject = resultJSONArray.getJSONObject(i);
|
||||||
|
String isRePrintPackageBoxLabel = jsonObject.getString("isRePrintPackageBoxLabel");
|
||||||
|
String isUnPackBox = jsonObject.getString("isUnPackBox");
|
||||||
|
|
||||||
|
if (StrUtil.equals(isRePrintPackageBoxLabel, "1") || StrUtil.equals(isUnPackBox, "1")) {
|
||||||
|
jsonObject.put("colro_flag", "1");
|
||||||
|
} else {
|
||||||
|
jsonObject.put("colro_flag", "0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("data", resultJSONArray);
|
||||||
|
jo.put("message", "查询成功!");
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public JSONObject outConfirm(JSONObject whereJson) {
|
||||||
|
/* option
|
||||||
|
* 0-生产区确认
|
||||||
|
* 1-虚拟区确认
|
||||||
|
*/
|
||||||
|
|
||||||
|
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
|
||||||
|
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_StructIvt"); // 仓位库存表
|
||||||
|
WQLObject subTab = WQLObject.getWQLObject("PDM_BI_SubPackageRelation"); // 子卷包装关系表
|
||||||
|
WQLObject ioMstTab = WQLObject.getWQLObject("ST_IVT_IOStorInv"); // 出入库单主表
|
||||||
|
WQLObject ioDtlTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl"); // 出入库单明细表
|
||||||
|
WQLObject ioDidsTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDis"); // 出入库单分配表
|
||||||
|
|
||||||
|
String option = whereJson.getString("option");
|
||||||
|
JSONObject box_no = whereJson.getJSONObject("box_no");
|
||||||
|
|
||||||
|
Long deptId = SecurityUtils.getDeptId();
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
JSONObject jsonSub = subTab.query("package_box_SN = '" + box_no + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
JSONObject jsonPoint = pointTab.query("vehicle_code = '" + box_no + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
||||||
|
if (StrUtil.equals(option, "0")) {
|
||||||
|
/*
|
||||||
|
* 0 - 生产区确认
|
||||||
|
* a.解锁出库点位、清除木箱号
|
||||||
|
*/
|
||||||
|
jsonPoint.put("point_status", "00");
|
||||||
|
jsonPoint.put("lock_type", "1");
|
||||||
|
jsonPoint.put("vehicle_code", "");
|
||||||
|
jsonPoint.put("vehicle_type", "");
|
||||||
|
jsonPoint.put("vehicle_qty", 0);
|
||||||
|
pointTab.update(jsonPoint);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* 1 - 虚拟区确认
|
||||||
|
* a.生成出库单主表、明细表、分配表并确认
|
||||||
|
* b.更新库存
|
||||||
|
* c.更新点位
|
||||||
|
*/
|
||||||
|
|
||||||
|
JSONObject jsonIvt = ivtTab.query("pcsn = '" + jsonSub.getString("container_name") + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
// 生成出库单主表
|
||||||
|
JSONObject jsonMst = new JSONObject();
|
||||||
|
jsonMst.put("iostorinv_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
jsonMst.put("bill_code", CodeUtil.getNewCode("IO_CODE"));
|
||||||
|
jsonMst.put("io_type", "1");
|
||||||
|
jsonMst.put("buss_type", "");
|
||||||
|
jsonMst.put("bill_type", "");
|
||||||
|
jsonMst.put("biz_date", DateUtil.today());
|
||||||
|
jsonMst.put("detail_count", 1);
|
||||||
|
jsonMst.put("bill_status", "99");
|
||||||
|
jsonMst.put("create_mode", "02");
|
||||||
|
jsonMst.put("input_optid", currentUserId);
|
||||||
|
jsonMst.put("input_optname", nickName);
|
||||||
|
jsonMst.put("input_time", now);
|
||||||
|
jsonMst.put("update_optid", currentUserId);
|
||||||
|
jsonMst.put("update_optname", nickName);
|
||||||
|
jsonMst.put("update_time", now);
|
||||||
|
jsonMst.put("dis_optid", currentUserId);
|
||||||
|
jsonMst.put("dis_optname", nickName);
|
||||||
|
jsonMst.put("dis_time", now);
|
||||||
|
jsonMst.put("confirm_optid", currentUserId);
|
||||||
|
jsonMst.put("confirm_optname", nickName);
|
||||||
|
jsonMst.put("confirm_time", now);
|
||||||
|
jsonMst.put("sysdeptid", deptId);
|
||||||
|
jsonMst.put("syscompanyid", deptId);
|
||||||
|
ioMstTab.insert(jsonMst);
|
||||||
|
|
||||||
|
// 生成出库单明细表
|
||||||
|
JSONObject jsonDtl = new JSONObject();
|
||||||
|
jsonDtl.put("iostorinvdtl_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
jsonDtl.put("iostorinv_id", jsonMst.getString("iostorinv_id"));
|
||||||
|
jsonDtl.put("seq_no", 1);
|
||||||
|
// jsonDtl.put("material_id", "");
|
||||||
|
jsonDtl.put("pcsn", jsonSub.getString("container_name"));
|
||||||
|
jsonDtl.put("box_no", box_no);
|
||||||
|
jsonDtl.put("bill_status", "99");
|
||||||
|
jsonDtl.put("qty_unit_id", 1);
|
||||||
|
jsonDtl.put("qty_unit_name", "KG");
|
||||||
|
jsonDtl.put("plan_qty", jsonIvt.getDoubleValue("ivt_qty"));
|
||||||
|
jsonDtl.put("real_qty", jsonIvt.getDoubleValue("ivt_qty"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 半成品入库
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.point_code TYPEAS s_string
|
||||||
|
输入.container_name TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
der.STATUS
|
||||||
|
WHEN '01' THEN '开始'
|
||||||
|
WHEN '02' THEN '空轴搬出'
|
||||||
|
WHEN '03' THEN '确认下卷'
|
||||||
|
WHEN '04' THEN '下卷完成'
|
||||||
|
WHEN '09' THEN '结束'
|
||||||
|
END
|
||||||
|
) AS status_name,
|
||||||
|
der.mfg_order_name AS mfg_order_name,
|
||||||
|
der.container_name AS container_name,
|
||||||
|
ivt.point_code,
|
||||||
|
der.product_name AS pcsn,
|
||||||
|
der.theory_height AS theory_height,
|
||||||
|
der.realstart_time AS realstart_time,
|
||||||
|
der.realend_time AS realend_time,
|
||||||
|
der.productin_qty AS productin_qty,
|
||||||
|
der.agvno AS agvno,
|
||||||
|
der.product_area AS product_area,
|
||||||
|
der.update_time AS update_time,
|
||||||
|
ivt.point_location,
|
||||||
|
ivt.product_area,
|
||||||
|
der.workorder_id
|
||||||
|
FROM
|
||||||
|
PDM_BI_RawFoilWorkOrder der
|
||||||
|
LEFT JOIN st_ivt_sbpointivt ivt ON ivt.ext_code = der.resource_name
|
||||||
|
WHERE
|
||||||
|
der.is_delete = '0'
|
||||||
|
|
||||||
|
OPTION 输入.container_name <> ""
|
||||||
|
der.container_name = 输入.container_name
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 半成品出库
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.product_area TYPEAS s_string
|
||||||
|
输入.container_name TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
coolIvt.full_point_code AS point_code,
|
||||||
|
coolIvt.container_name AS container_name,
|
||||||
|
der.product_name AS product_name,
|
||||||
|
der.productin_qty AS productin_qty,
|
||||||
|
hotDtl1.confirm_time AS in_time,
|
||||||
|
hotDtl2.confirm_time AS out_time,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
coolIvt.cool_ivt_status
|
||||||
|
WHEN '03' THEN '是'
|
||||||
|
ELSE '否'
|
||||||
|
END
|
||||||
|
) AS is_bake
|
||||||
|
FROM
|
||||||
|
ST_IVT_CoolPointIvt coolIvt
|
||||||
|
LEFT JOIN PDM_BI_RawFoilWorkOrder der ON der.container_name = der.container_name
|
||||||
|
LEFT JOIN ST_IVT_HotRegionIOMst hotMst ON hotMst.container_name = coolIvt.container_name
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT * FROM ST_IVT_HotRegionIODtl WHERE 1=1 ORDER BY confirm_time ASC LIMIT 1
|
||||||
|
) AS hotDtl1 ON hotMst.iostorinv_id = hotDtl1.iostorinv_id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT * FROM ST_IVT_HotRegionIODtl WHERE 1=1 ORDER BY confirm_time DESC LIMIT 1
|
||||||
|
) AS hotDtl2 ON hotMst.iostorinv_id = hotDtl1.iostorinv_id
|
||||||
|
WHERE
|
||||||
|
coolIvt.full_point_status = '02'
|
||||||
|
|
||||||
|
OPTION 输入.container_name <> ""
|
||||||
|
coolIvt.container_name = 输入.container_name
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
coolIvt.product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 成品出库
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.point_code TYPEAS s_string
|
||||||
|
输入.box_no TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
sub.package_box_SN AS package_box_SN,
|
||||||
|
sub.container_name AS container_name,
|
||||||
|
sub.product_name AS product_name,
|
||||||
|
sub.product_description AS product_description,
|
||||||
|
sub.net_weight AS net_weight,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
sub.isRePrintPackageBoxLabel
|
||||||
|
WHEN '1' THEN '是'
|
||||||
|
WHEN '0' THEN '否'
|
||||||
|
END
|
||||||
|
) AS change_out,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
sub.isUnPackBox
|
||||||
|
WHEN '1' THEN '是'
|
||||||
|
WHEN '0' THEN '否'
|
||||||
|
END
|
||||||
|
) AS change_in,
|
||||||
|
|
||||||
|
sub.isRePrintPackageBoxLabel,
|
||||||
|
sub.isUnPackBox,
|
||||||
|
point.point_code
|
||||||
|
FROM
|
||||||
|
PDM_BI_SubPackageRelation sub
|
||||||
|
LEFT JOIN sch_base_point point ON sub.package_box_SN = point.vehicle_code
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
|
||||||
|
OPTION 输入.box_no <> ""
|
||||||
|
point.vehicle_code = 输入.box_no
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_code <> ""
|
||||||
|
point.point_code = 输入.point_code
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "2"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
sub.package_box_SN AS package_box_SN,
|
||||||
|
sub.container_name AS container_name,
|
||||||
|
sub.product_name AS product_name,
|
||||||
|
sub.product_description AS product_description,
|
||||||
|
sub.net_weight AS net_weight,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
sub.isRePrintPackageBoxLabel
|
||||||
|
WHEN '1' THEN '是'
|
||||||
|
WHEN '0' THEN '否'
|
||||||
|
END
|
||||||
|
) AS change_out,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
sub.isUnPackBox
|
||||||
|
WHEN '1' THEN '是'
|
||||||
|
WHEN '0' THEN '否'
|
||||||
|
END
|
||||||
|
) AS change_in,
|
||||||
|
|
||||||
|
sub.isRePrintPackageBoxLabel,
|
||||||
|
sub.isUnPackBox,
|
||||||
|
attr.struct_code AS point_code
|
||||||
|
FROM
|
||||||
|
PDM_BI_SubPackageRelation sub
|
||||||
|
LEFT JOIN ST_IVT_StructIvt ivt ON sub.container_name = ivt.pcsn
|
||||||
|
LEFT JOIN ST_IVT_StructAttr attr ON attr.struct_id = ivt.struct_id
|
||||||
|
WHERE
|
||||||
|
1=1
|
||||||
|
|
||||||
|
OPTION 输入.box_no <> ""
|
||||||
|
attr.storagevehicle_code = 输入.box_no
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_code <> ""
|
||||||
|
attr.struct_code = 输入.point_code
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -111,4 +111,12 @@ public class PointController {
|
|||||||
pointService.changeLock(jsonObject);
|
pointService.changeLock(jsonObject);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log("仓位同步")
|
||||||
|
@PostMapping("/sync")
|
||||||
|
@ApiOperation("仓位同步")
|
||||||
|
public ResponseEntity<Object> sync() {
|
||||||
|
pointService.sync();
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,4 +96,9 @@ public interface PointService {
|
|||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
*/
|
*/
|
||||||
void changeLock(JSONObject jsonObject);
|
void changeLock(JSONObject jsonObject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 仓位同步
|
||||||
|
*/
|
||||||
|
void sync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,6 +301,51 @@ public class PointServiceImpl implements PointService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void sync() {
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_base_point");
|
||||||
|
|
||||||
|
// 先删除所有点位类型为仓位的点位
|
||||||
|
WQLObject.getWQLObject("sch_base_point").delete(" point_type = '01'");
|
||||||
|
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "2");
|
||||||
|
JSONArray arrStruct = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
for (int i = 0; i < arrStruct.size(); i++) {
|
||||||
|
JSONObject json = arrStruct.getJSONObject(i);
|
||||||
|
JSONObject structMap = new JSONObject();
|
||||||
|
structMap.put("point_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
structMap.put("point_code", json.getString("struct_code"));
|
||||||
|
structMap.put("point_name", json.getString("struct_name"));
|
||||||
|
structMap.put("region_id", "");
|
||||||
|
structMap.put("region_code", "");
|
||||||
|
structMap.put("region_name", "");
|
||||||
|
structMap.put("point_type", "01");
|
||||||
|
structMap.put("point_status", "00");
|
||||||
|
structMap.put("lock_type", "1");
|
||||||
|
structMap.put("block_num", json.getIntValue("block_num"));
|
||||||
|
structMap.put("row_num", json.getIntValue("row_num"));
|
||||||
|
structMap.put("col_num", json.getIntValue("col_num"));
|
||||||
|
structMap.put("layer_num", json.getIntValue("layer_num"));
|
||||||
|
structMap.put("source_id", json.getString("struct_id"));
|
||||||
|
structMap.put("create_id", currentUserId);
|
||||||
|
structMap.put("create_name", nickName);
|
||||||
|
structMap.put("create_time", now);
|
||||||
|
structMap.put("update_optid", currentUserId);
|
||||||
|
structMap.put("update_optname", nickName);
|
||||||
|
structMap.put("update_time", now);
|
||||||
|
wo.insert(structMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//根据重量返回最大的 级数
|
//根据重量返回最大的 级数
|
||||||
public String getLoadSeriesByqty(Double qty) {
|
public String getLoadSeriesByqty(Double qty) {
|
||||||
JSONArray dictArr = WQLObject.getWQLObject("sys_dict_detail").query("dict_id ='108'", "label").getResultJSONArray(0);
|
JSONArray dictArr = WQLObject.getWQLObject("sys_dict_detail").query("dict_id ='108'", "label").getResultJSONArray(0);
|
||||||
|
|||||||
@@ -116,9 +116,12 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
|
JSONObject jsonIvt2 = ivtTab.query("full_point_code ='" + point_code4 + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||||
|
|
||||||
// 更新冷却库存状态
|
// 更新工单状态为完成
|
||||||
JSONObject jsonRaw = rawTab.query("container_name ='" + jsonTask.getString("material_code") + "' AND status <> '09' AND is_delete = '0'").uniqueResult(0);
|
JSONObject jsonRaw = rawTab.query("container_name ='" + jsonTask.getString("material_code") + "' AND status <> '09' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
jsonRaw.put("status", "09");
|
||||||
|
rawTab.update(jsonRaw);
|
||||||
|
|
||||||
|
// 更新冷却库存状态
|
||||||
jsonIvt2.put("full_point_status", "02");
|
jsonIvt2.put("full_point_status", "02");
|
||||||
jsonIvt2.put("instorage_time", DateUtil.now());
|
jsonIvt2.put("instorage_time", DateUtil.now());
|
||||||
jsonIvt2.put("container_name", jsonRaw.getString("container_name"));
|
jsonIvt2.put("container_name", jsonRaw.getString("container_name"));
|
||||||
|
|||||||
@@ -80,15 +80,15 @@
|
|||||||
<#list columns as column>
|
<#list columns as column>
|
||||||
<#if column.columnShow>
|
<#if column.columnShow>
|
||||||
<#if (column.dictName)?? && (column.dictName)!="">
|
<#if (column.dictName)?? && (column.dictName)!="">
|
||||||
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')">
|
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :min-width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.${column.dictName}[scope.row.${column.changeColumnName}] }}
|
{{ dict.label.${column.dictName}[scope.row.${column.changeColumnName}] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<#elseif column.columnType != 'Timestamp'>
|
<#elseif column.columnType != 'Timestamp'>
|
||||||
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')"/>
|
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :min-width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')"/>
|
||||||
<#else>
|
<#else>
|
||||||
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')">
|
<el-table-column prop="${column.changeColumnName}" label="<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>" :min-width="flexWidth('${column.changeColumnName}',crud.data,'<#if column.remark != ''>${column.remark}<#else>${column.changeColumnName}</#if>')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.${column.changeColumnName}) }}</span>
|
<span>{{ parseTime(scope.row.${column.changeColumnName}) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -88,40 +88,40 @@
|
|||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" style="width: 100%" :data="crud.data" size="mini" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" style="width: 100%" :data="crud.data" size="mini" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column type="selection" />
|
<el-table-column type="selection" />
|
||||||
<el-table-column prop="package_box_SN" label="木箱码" :width="flexWidth('package_box_SN',crud.data,'木箱码')" />
|
<el-table-column prop="package_box_SN" label="木箱码" :min-width="flexWidth('package_box_SN',crud.data,'木箱码')" />
|
||||||
<el-table-column prop="quanlity_in_box" label="箱内子卷数量" :width="flexWidth('quanlity_in_box',crud.data,'箱内子卷数量')" />
|
<el-table-column prop="quanlity_in_box" label="箱内子卷数量" :min-width="flexWidth('quanlity_in_box',crud.data,'箱内子卷数量')" />
|
||||||
<el-table-column prop="box_weight" label="木箱自身重量" :width="flexWidth('box_weight',crud.data,'木箱自身重量')" />
|
<el-table-column prop="box_weight" label="木箱自身重量" :min-width="flexWidth('box_weight',crud.data,'木箱自身重量')" />
|
||||||
<el-table-column prop="quality_guaran_period" label="保质期" :width="flexWidth('quality_guaran_period',crud.data,'保质期')"/>
|
<el-table-column prop="quality_guaran_period" label="保质期" :min-width="flexWidth('quality_guaran_period',crud.data,'保质期')"/>
|
||||||
<el-table-column v-if="false" prop="sale_order_name" label="销售订单及行号" class-name="leave-alone"/>
|
<el-table-column v-if="false" prop="sale_order_name" label="销售订单及行号" class-name="leave-alone"/>
|
||||||
<el-table-column prop="customer_description" label="客户名称" :width="flexWidth('customer_description',crud.data,'客户名称')" />
|
<el-table-column prop="customer_description" label="客户名称" :min-width="flexWidth('customer_description',crud.data,'客户名称')" />
|
||||||
<el-table-column v-if="false" prop="product_name" label="产品编码" :width="flexWidth('product_name',crud.data,'产品编码')" />
|
<el-table-column v-if="false" prop="product_name" label="产品编码" :min-width="flexWidth('product_name',crud.data,'产品编码')" />
|
||||||
<el-table-column prop="product_description" label="产品描述" :width="flexWidth('product_description',crud.data,'产品描述')"/>
|
<el-table-column prop="product_description" label="产品描述" :min-width="flexWidth('product_description',crud.data,'产品描述')"/>
|
||||||
<el-table-column prop="date_of_FG_inbound" label="入库日期" :width="flexWidth('date_of_FG_inbound',crud.data,'入库日期')" />
|
<el-table-column prop="date_of_FG_inbound" label="入库日期" :min-width="flexWidth('date_of_FG_inbound',crud.data,'入库日期')" />
|
||||||
<el-table-column prop="container_name" label="子卷号" :width="flexWidth('container_name',crud.data,'子卷号')" />
|
<el-table-column prop="container_name" label="子卷号" :min-width="flexWidth('container_name',crud.data,'子卷号')" />
|
||||||
<el-table-column prop="width" label="产品规格(幅宽)" :width="flexWidth('width',crud.data,'产品规格(幅宽)')" />
|
<el-table-column prop="width" label="产品规格(幅宽)" :min-width="flexWidth('width',crud.data,'产品规格(幅宽)')" />
|
||||||
<el-table-column prop="thickness" label="产品厚度" :width="flexWidth('thickness',crud.data,'产品厚度')" />
|
<el-table-column prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')" />
|
||||||
<el-table-column prop="mass_per_unit_area" label="单位面积质量" :formatter="crud.formatNum3" :width="flexWidth('mass_per_unit_area',crud.data,'单位面积质量')" />
|
<el-table-column prop="mass_per_unit_area" label="单位面积质量" :formatter="crud.formatNum3" :min-width="flexWidth('mass_per_unit_area',crud.data,'单位面积质量')" />
|
||||||
<el-table-column prop="net_weight" label="净重" :formatter="crud.formatNum3" :width="flexWidth('net_weight',crud.data,'净重')" />
|
<el-table-column prop="net_weight" label="净重" :formatter="crud.formatNum3" :min-width="flexWidth('net_weight',crud.data,'净重')" />
|
||||||
<el-table-column prop="length" label="长度" :formatter="crud.formatNum3" :width="flexWidth('length',crud.data,'长度')" />
|
<el-table-column prop="length" label="长度" :formatter="crud.formatNum3" :min-width="flexWidth('length',crud.data,'长度')" />
|
||||||
<el-table-column prop="date_of_production" label="制造完成日期" :width="flexWidth('date_of_production',crud.data,'制造完成日期')" />
|
<el-table-column prop="date_of_production" label="制造完成日期" :min-width="flexWidth('date_of_production',crud.data,'制造完成日期')" />
|
||||||
<el-table-column prop="is_un_plan_production" label="计划外分切的子卷" :width="flexWidth('is_un_plan_production',crud.data,'计划外分切的子卷')" >
|
<el-table-column prop="is_un_plan_production" label="计划外分切的子卷" :min-width="flexWidth('is_un_plan_production',crud.data,'计划外分切的子卷')" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.IS_OR_NOT[scope.row.is_un_plan_production] }}
|
{{ dict.label.IS_OR_NOT[scope.row.is_un_plan_production] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="un_plan_product_property1" label="子卷的物性值1" :width="flexWidth('un_plan_product_property1',crud.data,'子卷的物性值1')" />
|
<el-table-column prop="un_plan_product_property1" label="子卷的物性值1" :min-width="flexWidth('un_plan_product_property1',crud.data,'子卷的物性值1')" />
|
||||||
<el-table-column prop="un_plan_product_property2" label="子卷的物性值2" :width="flexWidth('un_plan_product_property2',crud.data,'子卷的物性值2')" />
|
<el-table-column prop="un_plan_product_property2" label="子卷的物性值2" :min-width="flexWidth('un_plan_product_property2',crud.data,'子卷的物性值2')" />
|
||||||
<el-table-column prop="un_plan_product_property3" label="子卷的物性值3" :width="flexWidth('un_plan_product_property3',crud.data,'子卷的物性值3')" />
|
<el-table-column prop="un_plan_product_property3" label="子卷的物性值3" :min-width="flexWidth('un_plan_product_property3',crud.data,'子卷的物性值3')" />
|
||||||
<el-table-column prop="remark" label="备注" :width="flexWidth('remark',crud.data,'备注')" />
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')" />
|
||||||
<el-table-column prop="create_name" label="创建人" :width="flexWidth('create_name',crud.data,'创建人')" />
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||||
<el-table-column prop="create_time" label="创建时间" :width="flexWidth('create_time',crud.data,'创建时间')" />
|
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
|
||||||
<el-table-column prop="status" label="状态" :width="flexWidth('status',crud.data,'状态')" >
|
<el-table-column prop="status" label="状态" :min-width="flexWidth('status',crud.data,'状态')" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.sub_package_relation[scope.row.status] }}
|
{{ dict.label.sub_package_relation[scope.row.status] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="isRePrintPackageBoxLabel" label="是否需要重打外包装标签" :width="flexWidth('isRePrintPackageBoxLabel',crud.data,'是否需要重打外包装标签')" />
|
<el-table-column prop="isRePrintPackageBoxLabel" label="是否需要重打外包装标签" :min-width="flexWidth('isRePrintPackageBoxLabel',crud.data,'是否需要重打外包装标签')" />
|
||||||
<el-table-column prop="isUnPackBox" label="是否需要拆包重打子卷标签" :width="flexWidth('isUnPackBox',crud.data,'是否需要拆包重打子卷标签')" />
|
<el-table-column prop="isUnPackBox" label="是否需要拆包重打子卷标签" :min-width="flexWidth('isUnPackBox',crud.data,'是否需要拆包重打子卷标签')" />
|
||||||
<el-table-column v-permission="[]" label="操作" align="center" fixed="right" min-width="120">
|
<el-table-column v-permission="[]" label="操作" align="center" fixed="right" min-width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
|
|||||||
@@ -180,6 +180,17 @@
|
|||||||
>
|
>
|
||||||
解锁
|
解锁
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
@click="sync"
|
||||||
|
:loading="sync_flag"
|
||||||
|
>
|
||||||
|
仓位同步
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -326,7 +337,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudRegion from '@/views/wms/sch/region'
|
import crudRegion from '@/views/wms/sch/region'
|
||||||
import crudPoint, { changeActive } from '@/views/wms/sch/point'
|
import crudPoint, { changeActive } from '@/views/wms/sch/point/point'
|
||||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -357,6 +368,7 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
sync_flag: false,
|
||||||
syncLoading: false,
|
syncLoading: false,
|
||||||
invtypelist: [],
|
invtypelist: [],
|
||||||
pointStatusList: [],
|
pointStatusList: [],
|
||||||
@@ -458,6 +470,15 @@ export default {
|
|||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
sync() {
|
||||||
|
this.sync_flag = true
|
||||||
|
crudPoint.sync().then(res => {
|
||||||
|
this.crud.notify('同步成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.sync_flag = false
|
||||||
|
}).cache(() => {
|
||||||
|
this.sync_flag = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,4 +68,11 @@ export function changeLock(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed, changeLock }
|
export function sync() {
|
||||||
|
return request({
|
||||||
|
url: 'api/point/sync',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed, changeLock, sync }
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudTask from '@/views/wms/sch/task'
|
import crudTask from '@/views/wms/sch/task/task'
|
||||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
|||||||
Reference in New Issue
Block a user