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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user