dev:新增备货区代码
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
package org.nl.b_lms.pdm.tray.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pdm.tray.service.IPdmBiTrayService;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.PdmBiTray;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
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 zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/pdmBiTray")
|
||||
public class PdmBiTrayController {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiTrayService pdmBiTrayService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询Tray")
|
||||
//@SaCheckPermission("@el.check('pdmBiTray:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||
return new ResponseEntity<>(TableDataInfo.build(pdmBiTrayService.queryAll(whereJson, page)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增Tray")
|
||||
//@SaCheckPermission("@el.check('pdmBiTray:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody PdmBiTray entity) {
|
||||
pdmBiTrayService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改Tray")
|
||||
//@SaCheckPermission("@el.check('pdmBiTray:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody PdmBiTray entity) {
|
||||
pdmBiTrayService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除Tray")
|
||||
//@SaCheckPermission("@el.check('pdmBiTray:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
pdmBiTrayService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package org.nl.b_lms.pdm.tray.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.pdm.tray.service.ITrayplanService;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.Trayplan;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
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 zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/trayplan")
|
||||
public class TrayplanController {
|
||||
|
||||
@Autowired
|
||||
private ITrayplanService trayplanService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询TrayPlan")
|
||||
//@SaCheckPermission("@el.check('trayplan:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(trayplanService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增TrayPlan")
|
||||
//@SaCheckPermission("@el.check('trayplan:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody Trayplan entity){
|
||||
trayplanService.create(entity);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改TrayPlan")
|
||||
//@SaCheckPermission("@el.check('trayplan:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody Trayplan entity){
|
||||
trayplanService.update(entity);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@Log("删除TrayPlan")
|
||||
//@SaCheckPermission("@el.check('trayplan:del')")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||
trayplanService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.b_lms.pdm.tray.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.PdmBiTray;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
public interface IPdmBiTrayService extends IService<PdmBiTray> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<PdmBiTray>
|
||||
*/
|
||||
IPage<PdmBiTray> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(PdmBiTray entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(PdmBiTray entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.b_lms.pdm.tray.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.Trayplan;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务接口
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
public interface ITrayplanService extends IService<Trayplan> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<Trayplan>
|
||||
*/
|
||||
IPage<Trayplan> queryAll(Map whereJson, PageQuery pageable);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param entity /
|
||||
*/
|
||||
void create(Trayplan entity);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param entity /
|
||||
*/
|
||||
void update(Trayplan entity);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
* @param ids /
|
||||
*/
|
||||
void deleteAll(Set<String> ids);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description /
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("PDM_BI_Tray")
|
||||
public class PdmBiTray implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "ivt_id", type = IdType.NONE)
|
||||
/** 标识 */
|
||||
private Long ivt_id;
|
||||
|
||||
/**
|
||||
* 托盘编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 排号
|
||||
*/
|
||||
private String row_num;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String qty;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("PDM_BI_TrayPlan")
|
||||
public class Trayplan implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "plan_id", type = IdType.NONE)
|
||||
/** 标识 */
|
||||
private Long plan_id;
|
||||
|
||||
/** 托盘编码 */
|
||||
private String vehicle_code;
|
||||
|
||||
/** 排号 */
|
||||
private String row_num;
|
||||
|
||||
/** 物料编码 */
|
||||
private String material_code;
|
||||
|
||||
/** 数量 */
|
||||
private Integer qty;
|
||||
|
||||
/** 计划日期 */
|
||||
private String plan_date;
|
||||
|
||||
/** 是否完成 */
|
||||
private String is_implemented;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.PdmBiTray;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
public interface PdmBiTrayMapper extends BaseMapper<PdmBiTray> {
|
||||
|
||||
}
|
||||
@@ -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.b_lms.pdm.tray.service.dao.mapper.PdmBiTrayMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.Trayplan;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
public interface TrayplanMapper extends BaseMapper<Trayplan> {
|
||||
|
||||
}
|
||||
@@ -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.b_lms.pdm.tray.service.dao.mapper.TrayplanMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.Builder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description /
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class PdmBiTrayDto implements Serializable {
|
||||
|
||||
/** 标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long ivt_id;
|
||||
|
||||
/**
|
||||
* 托盘编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 排号
|
||||
*/
|
||||
private String row_num;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private String qty;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dto;
|
||||
|
||||
import org.nl.b_lms.pdm.tray.service.dao.PdmBiTray;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
public class PdmBiTrayQuery extends BaseQuery<PdmBiTray> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.Builder;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description /
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class TrayplanDto implements Serializable {
|
||||
|
||||
/** 标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long plan_id;
|
||||
|
||||
|
||||
/**
|
||||
* 托盘编码
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 排号
|
||||
*/
|
||||
private String row_num;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer qty;
|
||||
|
||||
/**
|
||||
* 计划日期
|
||||
*/
|
||||
private String plan_date;
|
||||
|
||||
/**
|
||||
* 是否完成
|
||||
*/
|
||||
private String is_implemented;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.b_lms.pdm.tray.service.dto;
|
||||
|
||||
import org.nl.b_lms.pdm.tray.service.dao.Trayplan;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
public class TrayplanQuery extends BaseQuery<Trayplan> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.nl.b_lms.pdm.tray.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.b_lms.pdm.tray.service.IPdmBiTrayService;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.PdmBiTray;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.mapper.PdmBiTrayMapper;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @description 服务实现
|
||||
* @author zhouz
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PdmBiTrayServiceImpl extends ServiceImpl<PdmBiTrayMapper, PdmBiTray> implements IPdmBiTrayService {
|
||||
|
||||
@Autowired
|
||||
private PdmBiTrayMapper pdmBiTrayMapper;
|
||||
|
||||
@Override
|
||||
public IPage<PdmBiTray> queryAll(Map whereJson, PageQuery page){
|
||||
LambdaQueryWrapper<PdmBiTray> lam = new LambdaQueryWrapper<>();
|
||||
IPage<PdmBiTray> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
pdmBiTrayMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(PdmBiTray entity) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
entity.setIvt_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
pdmBiTrayMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(PdmBiTray entity) {
|
||||
PdmBiTray dto = pdmBiTrayMapper.selectById(entity.getIvt_id());
|
||||
if (dto == null) throw new BadRequestException("未查询到对应的记录");
|
||||
|
||||
pdmBiTrayMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
pdmBiTrayMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package org.nl.b_lms.pdm.tray.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
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.b_lms.pdm.tray.service.ITrayplanService;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.Trayplan;
|
||||
import org.nl.b_lms.pdm.tray.service.dao.mapper.TrayplanMapper;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
* @description 服务实现
|
||||
* @date 2024-04-29
|
||||
**/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class TrayplanServiceImpl extends ServiceImpl<TrayplanMapper, Trayplan> implements ITrayplanService {
|
||||
|
||||
@Autowired
|
||||
private TrayplanMapper trayplanMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Trayplan> queryAll(Map whereJson, PageQuery page) {
|
||||
LambdaQueryWrapper<Trayplan> lam = new LambdaQueryWrapper<>();
|
||||
IPage<Trayplan> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||
trayplanMapper.selectPage(pages, lam);
|
||||
return pages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create(Trayplan entity) {
|
||||
|
||||
entity.setPlan_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
trayplanMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Trayplan entity) {
|
||||
Trayplan dto = trayplanMapper.selectById(entity.getPlan_id());
|
||||
if (dto == null) throw new BadRequestException("未查询到对应的记录");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
trayplanMapper.updateById(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAll(Set<String> ids) {
|
||||
// 真删除
|
||||
trayplanMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
if (ObjectUtil.isEmpty(raw_jo)) {
|
||||
throw new BadRequestException("未查询到对应的生箔工单!");
|
||||
}
|
||||
if (raw_jo.getString("order_type").equals("1")){
|
||||
if (raw_jo.getString("order_type").equals("1")) {
|
||||
throw new BadRequestException("当前工单为标箔工单,不允许烘烤!");
|
||||
}
|
||||
String resource_name = raw_jo.getString("resource_name");
|
||||
@@ -196,8 +196,8 @@ public class BakingServiceImpl implements BakingService {
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "1");
|
||||
if (product_area.equals("B2")){
|
||||
map.put("flag","3");
|
||||
if (product_area.equals("B2")) {
|
||||
map.put("flag", "3");
|
||||
}
|
||||
map.put("reging_id", reging_id);
|
||||
map.put("point_location", point_location);
|
||||
@@ -218,22 +218,22 @@ public class BakingServiceImpl implements BakingService {
|
||||
|
||||
JSONObject jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||
if (product_area.equals("B2")){
|
||||
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);
|
||||
String cant_location = "('" + point_code2_jo.getString("point_location") + "')";
|
||||
map.put("cant_location", cant_location);
|
||||
point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||
jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)){
|
||||
cant_location = "('"+cant_location1+"','"+point_code2_jo.getString("point_location")+"')";
|
||||
map.put("cant_location",cant_location);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||
cant_location = "('" + cant_location1 + "','" + point_code2_jo.getString("point_location") + "')";
|
||||
map.put("cant_location", cant_location);
|
||||
point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||
jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)){
|
||||
if (ObjectUtil.isEmpty(jsonHotIvt)) {
|
||||
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
throw new BadRequestException("烘烤区没有合适温度的空位!");
|
||||
}
|
||||
}
|
||||
@@ -494,11 +494,13 @@ public class BakingServiceImpl implements BakingService {
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag", "2");
|
||||
map.put("product_area", jsonPoint.getString("product_area"));
|
||||
map.put("point_location", jsonPoint.getString("point_location"));
|
||||
if (!jsonPoint.getString("product_area").equals("B2")) {
|
||||
map.put("point_location", jsonPoint.getString("point_location"));
|
||||
}
|
||||
|
||||
JSONObject jsonCooIvt = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
|
||||
// 如果为空
|
||||
if (ObjectUtil.isEmpty(jsonCooIvt)) {
|
||||
if (ObjectUtil.isEmpty(jsonCooIvt) && !jsonPoint.getString("product_area").equals("B2")) {
|
||||
if (StrUtil.equals(jsonPoint.getString("point_location"), "0")) {
|
||||
map.put("point_location", "1");
|
||||
}
|
||||
|
||||
100
lms/nladmin-ui/src/views/b_lms/pdm/index.vue
Normal file
100
lms/nladmin-ui/src/views/b_lms/pdm/index.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="标识">
|
||||
<el-input v-model="form.ivt_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘编码">
|
||||
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排号">
|
||||
<el-input v-model="form.row_num" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input v-model="form.qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="ivt_id" label="标识" :min-width="flexWidth('ivt_id',crud.data,'标识')"/>
|
||||
<el-table-column prop="vehicle_code" label="托盘编码" :min-width="flexWidth('vehicle_code',crud.data,'托盘编码')"/>
|
||||
<el-table-column prop="row_num" label="排号" :min-width="flexWidth('row_num',crud.data,'排号')"/>
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')"/>
|
||||
<el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPdmBiTray from './pdmBiTray'
|
||||
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'
|
||||
|
||||
const defaultForm = {
|
||||
ivt_id: null,
|
||||
vehicle_code: null,
|
||||
row_num: null,
|
||||
material_code: null,
|
||||
qty: null
|
||||
}
|
||||
export default {
|
||||
name: 'PdmBiTray',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: 'Tray',
|
||||
url: 'api/pdmBiTray',
|
||||
idField: 'ivt_id',
|
||||
sort: 'ivt_id,desc',
|
||||
crudMethod: { ...crudPdmBiTray }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
} }
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
110
lms/nladmin-ui/src/views/b_lms/pdm/ivt/trayplan/index.vue
Normal file
110
lms/nladmin-ui/src/views/b_lms/pdm/ivt/trayplan/index.vue
Normal file
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="标识">
|
||||
<el-input v-model="form.plan_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘编码">
|
||||
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排号">
|
||||
<el-input v-model="form.row_num" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input v-model="form.qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划日期">
|
||||
<el-input v-model="form.plan_date" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否完成">
|
||||
<el-input v-model="form.is_implemented" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="plan_id" label="标识" :min-width="flexWidth('plan_id',crud.data,'标识')"/>
|
||||
<el-table-column prop="vehicle_code" label="托盘编码" :min-width="flexWidth('vehicle_code',crud.data,'托盘编码')"/>
|
||||
<el-table-column prop="row_num" label="排号" :min-width="flexWidth('row_num',crud.data,'排号')"/>
|
||||
<el-table-column prop="material_code" label="物料编码" :min-width="flexWidth('material_code',crud.data,'物料编码')"/>
|
||||
<el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')"/>
|
||||
<el-table-column prop="plan_date" label="计划日期" :min-width="flexWidth('plan_date',crud.data,'计划日期')"/>
|
||||
<el-table-column prop="is_implemented" label="是否完成" :min-width="flexWidth('is_implemented',crud.data,'是否完成')"/>
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudTrayplan from './trayplan'
|
||||
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'
|
||||
|
||||
const defaultForm = {
|
||||
plan_id: null,
|
||||
vehicle_code: null,
|
||||
row_num: null,
|
||||
material_code: null,
|
||||
qty: null,
|
||||
plan_date: null,
|
||||
is_implemented: null
|
||||
}
|
||||
export default {
|
||||
name: 'Trayplan',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: 'TrayPlan',
|
||||
url: 'api/trayplan',
|
||||
idField: 'plan_id',
|
||||
sort: 'plan_id,desc',
|
||||
crudMethod: { ...crudTrayplan }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
} }
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
27
lms/nladmin-ui/src/views/b_lms/pdm/ivt/trayplan/trayplan.js
Normal file
27
lms/nladmin-ui/src/views/b_lms/pdm/ivt/trayplan/trayplan.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/trayplan',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/trayplan/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/trayplan',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
27
lms/nladmin-ui/src/views/b_lms/pdm/pdmBiTray.js
Normal file
27
lms/nladmin-ui/src/views/b_lms/pdm/pdmBiTray.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/pdmBiTray',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/pdmBiTray/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/pdmBiTray',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
Reference in New Issue
Block a user