Merge remote-tracking branch 'origin/master_merge_0523' into master_merge_0523
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package org.nl.b_lms.pdm.subpackagerelation.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiCheckLogService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.sch.tasks.TwoOutBoxTask;
|
||||
import org.nl.b_lms.sch.tasks.first_floor_area.auto.AutoSendVehicleToDjq;
|
||||
import org.nl.b_lms.sch.tasks.first_floor_area.auto.Prun;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.common.utils.RedissonUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
/**
|
||||
* {@code @Description:} 子卷包装关系表(PdmBiSubpackagerelation)控制层
|
||||
* {@code @Author:} gbx
|
||||
*
|
||||
* @since 2024-02-01
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/checkLog")
|
||||
@Slf4j
|
||||
public class PdmBiCheckLogController {
|
||||
|
||||
@Autowired
|
||||
private IpdmBiCheckLogService ipdmBiCheckLogService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param whereJson 查询条件
|
||||
* @param page 分页参数
|
||||
*/
|
||||
@GetMapping
|
||||
@Log("查询子卷包装关系表")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(ipdmBiCheckLogService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@Log("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void download(@RequestParam Map map, HttpServletResponse response) throws IOException {
|
||||
ipdmBiCheckLogService.download(map, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package org.nl.b_lms.pdm.subpackagerelation.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 校验日志实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("pdm_bi_checklog")
|
||||
public class CheckLogEntity {
|
||||
/**
|
||||
* 日志ID(主键)
|
||||
*/
|
||||
@TableId(type = IdType.AUTO) // 根据实际主键策略调整
|
||||
private Long log_id;
|
||||
|
||||
/**
|
||||
* 内标
|
||||
*/
|
||||
private String nb_code;
|
||||
|
||||
/**
|
||||
* 管标
|
||||
*/
|
||||
private String gb_code;
|
||||
|
||||
/**
|
||||
* 木箱码
|
||||
*/
|
||||
private String box_code;
|
||||
|
||||
/**
|
||||
* 客户标签码
|
||||
*/
|
||||
private String customer_code;
|
||||
|
||||
/**
|
||||
* 质检人
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.nl.b_lms.pdm.subpackagerelation.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.CheckLogEntity;
|
||||
|
||||
/**
|
||||
* {@code @Description:} 子卷包装关系表(PdmBiSubpackagerelation)数据持久层
|
||||
* {@code @Author:} gbx
|
||||
*
|
||||
* @since 2024-02-01
|
||||
*/
|
||||
public interface CheckCodeLogMapper extends BaseMapper<CheckLogEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.nl.b_lms.pdm.subpackagerelation.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.CheckLogEntity;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dto.PdmBiSubpackagerelationDto;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* {@code @Description:} 子卷包装关系表(PdmBiSubpackagerelation)服务接口层
|
||||
* {@code @Author:} gbx
|
||||
*
|
||||
* @since 2024-02-01
|
||||
*/
|
||||
public interface IpdmBiCheckLogService extends IService<CheckLogEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 查询条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<PdmBiSubpackagerelation>
|
||||
*/
|
||||
IPage<CheckLogEntity> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
void download(Map map, HttpServletResponse response) throws IOException;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.db.PageResult;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import lombok.extern.log4j.Log4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.error.model.DeviceFault;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiContainerinbound;
|
||||
import org.nl.b_lms.pdm.info.dao.PdmBiOrderbominfo;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiContainerinboundService;
|
||||
import org.nl.b_lms.pdm.info.service.IPdmBiOrderbominfoService;
|
||||
import org.nl.b_lms.pdm.productSpec.service.impl.PdmProductSpecServiceImpl;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.CheckLogEntity;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.CheckCodeLogMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dto.PdmBiSubpackagerelationDto;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiCheckLogService;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.pdm_manage.enums.SUBEnum;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.BstIvtPackageinfoivtMapper;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.sch.tasks.TwoOutBoxTask;
|
||||
import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IMdpbSameBoxService;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.MdpbSameBox;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.common.enums.SpecEnum;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.MapOf;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.utils.FileUtil;
|
||||
import org.nl.modules.logging.service.EsLogService;
|
||||
import org.nl.modules.logging.service.dto.LogQuery;
|
||||
import org.nl.modules.logging.service.dto.LogRepositoryDTO;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl;
|
||||
import org.nl.wms.sch.AcsUtil;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* {@code @Description:} 子卷包装关系表(PdmBiSubpackagerelation)服务实现层
|
||||
* {@code @Author:} gbx
|
||||
*
|
||||
* @since 2024-02-01
|
||||
*/
|
||||
@Service
|
||||
@Log4j
|
||||
public class PdmBiCheckLogServiceImpl extends ServiceImpl<CheckCodeLogMapper, CheckLogEntity> implements IpdmBiCheckLogService {
|
||||
|
||||
@Resource
|
||||
private CheckCodeLogMapper checkCodeLogMapper;
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
* @param whereJson 查询条件
|
||||
* @param page 分页参数
|
||||
*/
|
||||
@Override
|
||||
public IPage<CheckLogEntity> queryAll(Map whereJson, PageQuery page) {
|
||||
|
||||
LambdaQueryWrapper<CheckLogEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (StrUtil.isNotEmpty((String) whereJson.get("container_name"))) {
|
||||
queryWrapper.likeRight(CheckLogEntity::getNb_code, whereJson.get("container_name"));
|
||||
}
|
||||
|
||||
if (whereJson.get("begin_time") != null) {
|
||||
queryWrapper.ge(CheckLogEntity::getCreate_time, whereJson.get("begin_time"));
|
||||
}
|
||||
|
||||
if (whereJson.get("end_time") != null) {
|
||||
queryWrapper.le(CheckLogEntity::getCreate_time, whereJson.get("end_time"));
|
||||
}
|
||||
|
||||
return checkCodeLogMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||
LambdaQueryWrapper<CheckLogEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
if (StrUtil.isNotEmpty((String) whereJson.get("container_name"))) {
|
||||
queryWrapper.likeRight(CheckLogEntity::getNb_code, whereJson.get("container_name"));
|
||||
}
|
||||
|
||||
if (whereJson.get("begin_time") != null) {
|
||||
queryWrapper.ge(CheckLogEntity::getCreate_time, whereJson.get("begin_time"));
|
||||
}
|
||||
|
||||
if (whereJson.get("end_time") != null) {
|
||||
queryWrapper.le(CheckLogEntity::getCreate_time, whereJson.get("end_time"));
|
||||
}
|
||||
|
||||
List<CheckLogEntity> logList = checkCodeLogMapper.selectList(queryWrapper);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
logList.forEach(logEntity -> {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("内标", logEntity.getNb_code());
|
||||
map.put("管标", logEntity.getGb_code());
|
||||
map.put("木箱码", logEntity.getBox_code());
|
||||
map.put("外箱标签码", logEntity.getCustomer_code());
|
||||
map.put("校验人", logEntity.getCreate_name());
|
||||
map.put("校验时间", logEntity.getCreate_time());
|
||||
map.put("备注", logEntity.getRemark());
|
||||
list.add(map);
|
||||
});
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.CheckLogEntity;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.CheckCodeLogMapper;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -84,6 +86,7 @@ import org.springframework.util.CollectionUtils;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
@@ -134,6 +137,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
@Resource
|
||||
private BstIvtBoxinfoMapper bstIvtBoxinfoMapper;
|
||||
|
||||
@Resource
|
||||
private CheckCodeLogMapper checkCodeLogMapper;
|
||||
|
||||
@Autowired
|
||||
private TwoOutBoxTask twoOutBoxTask;
|
||||
|
||||
@@ -1022,27 +1028,42 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
//客户标签码
|
||||
String customer_code = jo.getString("customer_code");
|
||||
|
||||
if (!StrUtil.equals(nb_code, gb_code)) {
|
||||
throw new BadRequestException("内标【" + nb_code + "】和管标【" + gb_code + "】子卷号不一致!");
|
||||
}
|
||||
CheckLogEntity logEntity = new CheckLogEntity();
|
||||
logEntity.setNb_code(nb_code);
|
||||
logEntity.setGb_code(gb_code);
|
||||
logEntity.setBox_code(box_code);
|
||||
logEntity.setCustomer_code(customer_code);
|
||||
logEntity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||
logEntity.setCreate_time(DateUtil.now());
|
||||
|
||||
if (!StrUtil.equals(box_code, customer_code)) {
|
||||
throw new BadRequestException("木箱码【" + box_code + "】和客户标签码【" + customer_code + "】箱号不一致!");
|
||||
}
|
||||
try {
|
||||
if (!StrUtil.equals(nb_code, gb_code)) {
|
||||
throw new BadRequestException("内标【" + nb_code + "】和管标【" + gb_code + "】子卷号不一致!");
|
||||
}
|
||||
|
||||
PdmBiSubpackagerelation subDto = this.getOne(new LambdaQueryWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, nb_code));
|
||||
if (ObjectUtil.isEmpty(subDto)) {
|
||||
throw new BadRequestException("子卷号【" + nb_code + "】在LMS系统上为查询到包装关系!");
|
||||
if (!StrUtil.equals(box_code, customer_code)) {
|
||||
throw new BadRequestException("木箱码【" + box_code + "】和客户标签码【" + customer_code + "】箱号不一致!");
|
||||
}
|
||||
|
||||
PdmBiSubpackagerelation subDto = this.getOne(new LambdaQueryWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, nb_code));
|
||||
if (ObjectUtil.isEmpty(subDto)) {
|
||||
throw new BadRequestException("子卷号【" + nb_code + "】在LMS系统上为查询到包装关系!");
|
||||
}
|
||||
if (StrUtil.isEmpty(subDto.getPackage_box_sn())) {
|
||||
throw new BadRequestException("子卷号【" + nb_code + "】在LMS系统上包装关系的木箱号为空!");
|
||||
}
|
||||
if (!StrUtil.equals(box_code, subDto.getPackage_box_sn())) {
|
||||
throw new BadRequestException("子卷号绑定的木箱码【" + subDto.getPackage_box_sn() + "】和木箱码【" + box_code + "】箱号不一致!");
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "校验通过!");
|
||||
return result;
|
||||
} catch (BadRequestException e) {
|
||||
logEntity.setRemark("校验失败:" + e.getMessage());
|
||||
throw e;
|
||||
} finally {
|
||||
checkCodeLogMapper.insert(logEntity);
|
||||
}
|
||||
if (StrUtil.isEmpty(subDto.getPackage_box_sn())) {
|
||||
throw new BadRequestException("子卷号【" + nb_code + "】在LMS系统上包装关系的木箱号为空!");
|
||||
}
|
||||
if (!StrUtil.equals(box_code, subDto.getPackage_box_sn())) {
|
||||
throw new BadRequestException("子卷号绑定的木箱码【" + subDto.getPackage_box_sn() + "】和木箱码【" + box_code + "】箱号不一致!");
|
||||
}
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "校验通过!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -312,7 +312,6 @@ public class BakingServiceImpl implements BakingService {
|
||||
|
||||
JSONObject jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||
if (product_area.equals("B2")) {
|
||||
String cant_location1 = point_code2_jo.getString("point_location");
|
||||
String cant_location = "('" + point_code2_jo.getString("point_location") + "')";
|
||||
map.put("cant_location", cant_location);
|
||||
@@ -327,9 +326,6 @@ public class BakingServiceImpl implements BakingService {
|
||||
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||
}
|
||||
}
|
||||
|
||||
// 3.创建冷却区 --> 烘烤区任务
|
||||
|
||||
@@ -3249,7 +3249,7 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
||||
JSONArray structArr = WQLObject.getWQLObject("ST_IVT_StructAttr").query("block_num = '" + jsonRow.getString("block_num")
|
||||
+ "' and row_num = '" + jsonRow.getString("row_num") + "' and is_used = '1' and is_delete = '0' and lock_type not in ('1','6','3')").getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(structArr)) {
|
||||
throw new BadRequestException("有其他任务正在执行中,对应单据号为【" + structArr.getJSONObject(0).getString("inv_code") + "】,请稍后在试!");
|
||||
throw new BadRequestException("有仓位被其他业务锁定,仓位编码为【"+structArr.getJSONObject(0).getString("struct_code")+"】,对应单据号为【" + structArr.getJSONObject(0).getString("inv_code") + "】,请稍后在试!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
35
lms/nladmin-ui/src/views/b_lms/bst/ivt/checklog/checklog.js
Normal file
35
lms/nladmin-ui/src/views/b_lms/bst/ivt/checklog/checklog.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function setHaveShaft(data) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt/setHaveShaft',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, setHaveShaft }
|
||||
155
lms/nladmin-ui/src/views/b_lms/bst/ivt/checklog/index.vue
Normal file
155
lms/nladmin-ui/src/views/b_lms/bst/ivt/checklog/index.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="子卷号">
|
||||
<el-input
|
||||
v-model="query.container_name"
|
||||
clearable
|
||||
placeholder="输入子卷号"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-thumb"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="nb_code" label="内标" :min-width="flexWidth('point_code',crud.data,'点位编码')"/>
|
||||
<el-table-column prop="gb_code" label="管标" :min-width="flexWidth('point_code',crud.data,'点位编码')"/>
|
||||
<el-table-column prop="box_code" label="木箱码" :min-width="flexWidth('point_name',crud.data,'点位名称')"/>
|
||||
<el-table-column prop="customer_code" label="客户标签码"
|
||||
:min-width="flexWidth('point_name',crud.data,'点位名称')"/>
|
||||
<el-table-column prop="create_name" label="校验人" :min-width="flexWidth('qzz_size',crud.data,'气涨轴尺寸')"/>
|
||||
<el-table-column prop="create_time" label="校验时间"
|
||||
:min-width="flexWidth('qzz_generation',crud.data,'气涨轴代数')"/>
|
||||
<el-table-column prop="remark" label="备注" :min-width="flexWidth('tube_code1',crud.data,'纸管1编码')"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBstIvtShafttubeivt from './checklog'
|
||||
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 {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
const defaultForm = {
|
||||
ivt_id: null,
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
qzz_size: null,
|
||||
qzz_generation: null,
|
||||
tube_code1: null,
|
||||
tube_name1: null,
|
||||
tube_code2: null,
|
||||
tube_name2: null,
|
||||
container_name1: null,
|
||||
container_name2: null,
|
||||
point_type: null,
|
||||
point_location: null,
|
||||
have_qzz: null,
|
||||
is_used: null,
|
||||
sort_seq: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
plan: null
|
||||
}
|
||||
export default {
|
||||
name: 'pdmChecklog',
|
||||
components: {pagination, crudOperation, rrOperation, udOperation},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['SHAFT_POINT_TYPE', 'point_location'],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '穿拔轴区点位库存管理',
|
||||
url: '/api/checkLog',
|
||||
idField: 'log_id',
|
||||
sort: 'create_time,desc',
|
||||
crudMethod: {...crudBstIvtShafttubeivt},
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
this.showDtlLoading = true
|
||||
download('/api/checkLog/download', this.crud.query).then(result => {
|
||||
debugger
|
||||
downloadFile(result, '校验统计', 'xlsx')
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -217,7 +217,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="confirm_time" label="入库日期" :min-width="flexWidth('confirm_time',crud.data,'入库日期')" />
|
||||
<el-table-column show-overflow-tooltip prop="date_of_production" label="生产日期" :min-width="flexWidth('date_of_production',crud.data,'生产日期')" />
|
||||
<el-table-column show-overflow-tooltip prop="input_optname" label="入库人" :min-width="flexWidth('input_optname',crud.data,'入库人')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="width" label="产品规格" :formatter="crud.formatNum1" :min-width="flexWidth('width',crud.data,'产品规格')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="width" label="产品规格" :min-width="flexWidth('width',crud.data,'产品规格')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="thickness" label="产品厚度" :min-width="flexWidth('thickness',crud.data,'产品厚度')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="paper_type" label="管件类型" :min-width="flexWidth('paper_type',crud.data,'管件类型')" />
|
||||
<el-table-column v-if="crud.query.is_all === '0'" show-overflow-tooltip prop="paper_code" label="管件编码" :min-width="flexWidth('paper_code',crud.data,'管件编码')" />
|
||||
|
||||
Reference in New Issue
Block a user