rev:优化冷却区域代码
This commit is contained in:
@@ -0,0 +1,80 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.rest;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.CoolPointIvtService;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.CoolPointIvt;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dto.CoolPointIvtDto;
|
||||||
|
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.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
|
||||||
|
@RequestMapping("/api/stIvtCoolpointivt")
|
||||||
|
@Slf4j
|
||||||
|
public class CoolPointIvtController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CoolPointIvtService coolPointIvtService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询冷却区库存")
|
||||||
|
|
||||||
|
//@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(coolPointIvtService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增冷却区库存")
|
||||||
|
|
||||||
|
//@SaCheckPermission("@el.check('stIvtCoolpointivt:add')")
|
||||||
|
public ResponseEntity<Object> create(@Validated @RequestBody CoolPointIvt dto) {
|
||||||
|
coolPointIvtService.create(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改冷却区库存")
|
||||||
|
|
||||||
|
//@SaCheckPermission("@el.check('stIvtCoolpointivt:edit')")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody CoolPointIvt dto) {
|
||||||
|
coolPointIvtService.update(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除冷却区库存")
|
||||||
|
|
||||||
|
//@SaCheckPermission("@el.check('stIvtCoolpointivt:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
|
coolPointIvtService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/coolRegionIOQueryAll")
|
||||||
|
@Log("冷却区出入表")
|
||||||
|
|
||||||
|
//@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
||||||
|
public ResponseEntity<Object> coolRegionIOQueryAll(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(coolPointIvtService.coolRegionIOQueryAll(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/uploadMes")
|
||||||
|
@Log("手动回传MES")
|
||||||
|
|
||||||
|
public ResponseEntity<Object> uploadMes(@RequestBody JSONObject form) {
|
||||||
|
coolPointIvtService.uploadMes(form);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.CoolPointIvt;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dto.CoolPointIvtDto;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface CoolPointIvtService extends IService<CoolPointIvt> {
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param page 分页参数
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
Map<String, Object> queryAll(Map whereJson, PageQuery page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有数据不分页
|
||||||
|
*
|
||||||
|
* @param whereJson 条件参数
|
||||||
|
* @return List<StIvtCoolpointivtDto>
|
||||||
|
*/
|
||||||
|
List<CoolPointIvt> queryAll(Map whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
*
|
||||||
|
* @param ivt_id ID
|
||||||
|
* @return StIvtCoolpointivt
|
||||||
|
*/
|
||||||
|
CoolPointIvt findById(Long ivt_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编码查询
|
||||||
|
*
|
||||||
|
* @param code code
|
||||||
|
* @return StIvtCoolpointivt
|
||||||
|
*/
|
||||||
|
CoolPointIvt findByCode(String code);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
*
|
||||||
|
* @param dto /
|
||||||
|
*/
|
||||||
|
void create(CoolPointIvt dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param dto /
|
||||||
|
*/
|
||||||
|
void update(CoolPointIvt dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
*
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷却区出入分页查询
|
||||||
|
*
|
||||||
|
* @param whereJson
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, Object> coolRegionIOQueryAll(Map whereJson, PageQuery page);
|
||||||
|
|
||||||
|
void uploadMes(JSONObject form);
|
||||||
|
}
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("st_ivt_coolpointivt")
|
||||||
|
public class CoolPointIvt implements Serializable {
|
||||||
|
|
||||||
|
/** 库存记录标识 */
|
||||||
|
/**
|
||||||
|
* 防止精度丢失
|
||||||
|
*/
|
||||||
|
@TableId(value = "ivt_id")
|
||||||
|
private Long ivt_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位编码
|
||||||
|
*/
|
||||||
|
private String point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满轴位编码
|
||||||
|
*/
|
||||||
|
private String full_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母卷号
|
||||||
|
*/
|
||||||
|
private String container_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母卷工单标识
|
||||||
|
*/
|
||||||
|
private String workorder_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母卷轴编码
|
||||||
|
*/
|
||||||
|
private String full_vehicle_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空轴位编码
|
||||||
|
*/
|
||||||
|
private String empty_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空轴编码
|
||||||
|
*/
|
||||||
|
private String empty_vehicle_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下料区域标识
|
||||||
|
*/
|
||||||
|
private Long region_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次
|
||||||
|
*/
|
||||||
|
private String pcsn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存数
|
||||||
|
*/
|
||||||
|
private BigDecimal ivt_qty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位标识
|
||||||
|
*/
|
||||||
|
private Long qty_unit_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
private String instorage_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产区域
|
||||||
|
*/
|
||||||
|
private String product_area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
private String point_location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序号
|
||||||
|
*/
|
||||||
|
private BigDecimal sort_seq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private String is_used;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String create_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人姓名
|
||||||
|
*/
|
||||||
|
private String create_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
private String update_optid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人姓名
|
||||||
|
*/
|
||||||
|
private String update_optname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private String update_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满轴位状态
|
||||||
|
*/
|
||||||
|
private String full_point_status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存状态
|
||||||
|
**/
|
||||||
|
private String cool_ivt_status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空轴位状态
|
||||||
|
*/
|
||||||
|
private String empty_point_status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("st_ivt_coolregionio")
|
||||||
|
public class CoolRegionIo implements Serializable {
|
||||||
|
|
||||||
|
private Long iostorinv_id;
|
||||||
|
|
||||||
|
private String bill_code;
|
||||||
|
|
||||||
|
//出入类型
|
||||||
|
private String io_type;
|
||||||
|
|
||||||
|
//物料标识
|
||||||
|
private Long material_id;
|
||||||
|
|
||||||
|
//批次
|
||||||
|
private String pcsn;
|
||||||
|
|
||||||
|
//载具编码
|
||||||
|
private String vehicle_code;
|
||||||
|
|
||||||
|
//数量
|
||||||
|
private BigDecimal qty;
|
||||||
|
|
||||||
|
//数量单位标识
|
||||||
|
private Long qty_unit_id;
|
||||||
|
|
||||||
|
//单据状态
|
||||||
|
private String bill_status;
|
||||||
|
|
||||||
|
//起始点位编码
|
||||||
|
private String start_point_code;
|
||||||
|
|
||||||
|
//终点点位编码
|
||||||
|
private String end_point_code;
|
||||||
|
|
||||||
|
//生成方式
|
||||||
|
private String create_mode;
|
||||||
|
|
||||||
|
private Long cust_id;
|
||||||
|
|
||||||
|
//任务标识
|
||||||
|
private Long task_id;
|
||||||
|
|
||||||
|
//备注
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
//创建人
|
||||||
|
private Long create_id;
|
||||||
|
|
||||||
|
//创建人姓名
|
||||||
|
private String create_name;
|
||||||
|
|
||||||
|
//创建时间
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
//确认人
|
||||||
|
private Long update_optid;
|
||||||
|
|
||||||
|
//确认人姓名
|
||||||
|
private String update_optname;
|
||||||
|
|
||||||
|
//确认时间
|
||||||
|
private String update_time;
|
||||||
|
|
||||||
|
//确认人
|
||||||
|
private Long confirm_optid;
|
||||||
|
|
||||||
|
//确认人姓名
|
||||||
|
private String confirm_optname;
|
||||||
|
|
||||||
|
//确认时间
|
||||||
|
private String confirm_time;
|
||||||
|
|
||||||
|
//是否删除
|
||||||
|
private String is_delete;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.CoolPointIvt;
|
||||||
|
|
||||||
|
public interface CoolPointIvtMapper extends BaseMapper<CoolPointIvt> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.CoolRegionIo;
|
||||||
|
|
||||||
|
public interface CoolRegionIoMapper extends BaseMapper<CoolRegionIo> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CoolPointIvtDto implements Serializable {
|
||||||
|
/** 库存记录标识 */
|
||||||
|
/**
|
||||||
|
* 防止精度丢失
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long ivt_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点位编码
|
||||||
|
*/
|
||||||
|
private String point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满轴位编码
|
||||||
|
*/
|
||||||
|
private String full_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母卷号
|
||||||
|
*/
|
||||||
|
private String container_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母卷工单标识
|
||||||
|
*/
|
||||||
|
private String workorder_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母卷轴编码
|
||||||
|
*/
|
||||||
|
private String full_vehicle_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空轴位编码
|
||||||
|
*/
|
||||||
|
private String empty_point_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空轴编码
|
||||||
|
*/
|
||||||
|
private String empty_vehicle_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下料区域标识
|
||||||
|
*/
|
||||||
|
private Long region_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次
|
||||||
|
*/
|
||||||
|
private String pcsn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存数
|
||||||
|
*/
|
||||||
|
private BigDecimal ivt_qty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计量单位标识
|
||||||
|
*/
|
||||||
|
private Long qty_unit_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库时间
|
||||||
|
*/
|
||||||
|
private String instorage_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产区域
|
||||||
|
*/
|
||||||
|
private String product_area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置
|
||||||
|
*/
|
||||||
|
private String point_location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序号
|
||||||
|
*/
|
||||||
|
private BigDecimal sort_seq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否启用
|
||||||
|
*/
|
||||||
|
private String is_used;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String create_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人姓名
|
||||||
|
*/
|
||||||
|
private String create_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人
|
||||||
|
*/
|
||||||
|
private String update_optid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人姓名
|
||||||
|
*/
|
||||||
|
private String update_optname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private String update_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 满轴位状态
|
||||||
|
*/
|
||||||
|
private String full_point_status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存状态
|
||||||
|
**/
|
||||||
|
private String cool_ivt_status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 空轴位状态
|
||||||
|
*/
|
||||||
|
private String empty_point_status;
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.dto;
|
||||||
|
|
||||||
|
public class CoolPointIvtQuery {
|
||||||
|
}
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
package org.nl.wms.pdm.ivt.coolpoint.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||||
|
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
|
||||||
|
import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper;
|
||||||
|
import org.nl.wms.basedata.st.structattr.service.dao.Structattr;
|
||||||
|
import org.nl.wms.basedata.st.userarea.service.IUserAreaPermissionService;
|
||||||
|
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.CoolPointIvtService;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.CoolPointIvt;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.CoolRegionIo;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.mapper.CoolPointIvtMapper;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dao.mapper.CoolRegionIoMapper;
|
||||||
|
import org.nl.wms.pdm.ivt.coolpoint.service.dto.CoolPointIvtDto;
|
||||||
|
import org.nl.wms.pdm.ivt.hotpoint.service.dao.HotPointIvt;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class CoolPointIvtServiceImpl extends ServiceImpl<CoolPointIvtMapper, CoolPointIvt> implements CoolPointIvtService {
|
||||||
|
@Autowired
|
||||||
|
private InterfaceBackMapper interfaceBackMapper;
|
||||||
|
@Autowired
|
||||||
|
IUserAreaPermissionService userAreaPermissionService;
|
||||||
|
@Autowired
|
||||||
|
CoolPointIvtMapper coolPointIvtMapper;
|
||||||
|
@Autowired
|
||||||
|
CoolRegionIoMapper coolRegionIoMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryAll(Map whereJson, PageQuery page) {
|
||||||
|
|
||||||
|
//获取人员对应的区域
|
||||||
|
String currentUserId = userAreaPermissionService.getInArea();
|
||||||
|
List<String> in_area_id = userAreaPermissionService.getCurrentUserAreas(currentUserId);
|
||||||
|
LambdaQueryWrapper<CoolPointIvt> queryWrapper = Wrappers.lambdaQuery(CoolPointIvt.class)
|
||||||
|
.like(ObjectUtil.isNotEmpty(whereJson.get("point_code")), CoolPointIvt::getPoint_code, whereJson.get("point_code"))
|
||||||
|
.like(ObjectUtil.isNotEmpty(whereJson.get("container_name")), CoolPointIvt::getContainer_name, whereJson.get("container_name"))
|
||||||
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("full_point_status")), CoolPointIvt::getFull_point_status, whereJson.get("full_point_status"))
|
||||||
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("empty_point_status")), CoolPointIvt::getEmpty_point_status, whereJson.get("empty_point_status"))
|
||||||
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("cool_ivt_status")), CoolPointIvt::getCool_ivt_status, whereJson.get("cool_ivt_status"))
|
||||||
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("product_area")), CoolPointIvt::getProduct_area, whereJson.get("product_area"))
|
||||||
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("is_used")), CoolPointIvt::getIs_used, whereJson.get("is_used"))
|
||||||
|
.eq(ObjectUtil.isNotEmpty(whereJson.get("point_location")), CoolPointIvt::getPoint_location, whereJson.get("point_location"))
|
||||||
|
.in(ObjectUtil.isNotEmpty(in_area_id), CoolPointIvt::getProduct_area, in_area_id)
|
||||||
|
.ge(ObjectUtil.isNotEmpty(whereJson.get("begin_time")), CoolPointIvt::getInstorage_time, whereJson.get("begin_time"))
|
||||||
|
.le(ObjectUtil.isNotEmpty(whereJson.get("end_time")), CoolPointIvt::getInstorage_time, whereJson.get("end_time"))
|
||||||
|
.orderByAsc(CoolPointIvt::getProduct_area)
|
||||||
|
.orderByAsc(CoolPointIvt::getPoint_code);
|
||||||
|
IPage<CoolPointIvt> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
IPage<CoolPointIvt> coolPointIvtIPage = coolPointIvtMapper.selectPage(pages, queryWrapper);
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("totalElements", coolPointIvtIPage.getTotal());
|
||||||
|
json.put("content", coolPointIvtIPage.getRecords());
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CoolPointIvt> queryAll(Map whereJson) {
|
||||||
|
List<CoolPointIvt> list = coolPointIvtMapper.selectList(null);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CoolPointIvt findById(Long ivt_id) {
|
||||||
|
LambdaQueryWrapper<CoolPointIvt> wrapper = new LambdaQueryWrapper<CoolPointIvt>()
|
||||||
|
.eq(ObjectUtil.isNotEmpty(ivt_id), CoolPointIvt::getIvt_id, ivt_id);
|
||||||
|
CoolPointIvt coolPointIvt = coolPointIvtMapper.selectOne(wrapper);
|
||||||
|
return coolPointIvt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CoolPointIvt findByCode(String code) {
|
||||||
|
LambdaQueryWrapper<CoolPointIvt> wrapper = new LambdaQueryWrapper<CoolPointIvt>()
|
||||||
|
.eq(ObjectUtil.isNotEmpty(code), CoolPointIvt::getPoint_code, code);
|
||||||
|
CoolPointIvt coolPointIvt = coolPointIvtMapper.selectOne(wrapper);
|
||||||
|
return coolPointIvt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void create(CoolPointIvt dto) {
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
dto.setIvt_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
dto.setCreate_id(currentUserId);
|
||||||
|
dto.setCreate_name(nickName);
|
||||||
|
dto.setUpdate_optid(currentUserId);
|
||||||
|
dto.setUpdate_optname(nickName);
|
||||||
|
dto.setUpdate_time(now);
|
||||||
|
dto.setCreate_time(now);
|
||||||
|
|
||||||
|
coolPointIvtMapper.insert(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void update(CoolPointIvt dto) {
|
||||||
|
CoolPointIvt entity = this.findById(dto.getIvt_id());
|
||||||
|
if (entity == null) {
|
||||||
|
throw new BadRequestException("被删除或无权限,操作失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
|
String now = DateUtil.now();
|
||||||
|
dto.setUpdate_time(now);
|
||||||
|
dto.setUpdate_optid(currentUserId);
|
||||||
|
dto.setUpdate_optname(nickName);
|
||||||
|
|
||||||
|
coolPointIvtMapper.updateById(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteAll(Long[] ids) {
|
||||||
|
List<CoolPointIvt> list = coolPointIvtMapper.selectBatchIds(Arrays.asList(ids));
|
||||||
|
for (CoolPointIvt coolPointIvt : list) {
|
||||||
|
coolPointIvtMapper.deleteById(coolPointIvt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷却区出入分页查询
|
||||||
|
*
|
||||||
|
* @param whereJson
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> coolRegionIOQueryAll(Map whereJson, PageQuery page) {
|
||||||
|
LambdaQueryWrapper<CoolRegionIo> queryWrapper = Wrappers.lambdaQuery(CoolRegionIo.class)
|
||||||
|
.like(ObjectUtil.isNotEmpty(whereJson.get("start_point_code")), CoolRegionIo::getStart_point_code, whereJson.get("start_point_code"))
|
||||||
|
.like(ObjectUtil.isNotEmpty(whereJson.get("end_point_code")), CoolRegionIo::getEnd_point_code, whereJson.get("end_point_code"))
|
||||||
|
.like(ObjectUtil.isNotEmpty(whereJson.get("pcsn")), CoolRegionIo::getPcsn, whereJson.get("pcsn"))
|
||||||
|
.like(ObjectUtil.isNotEmpty(whereJson.get("vehicle_code")), CoolRegionIo::getVehicle_code, whereJson.get("vehicle_code"))
|
||||||
|
.ge(ObjectUtil.isNotEmpty(whereJson.get("begin_time")), CoolRegionIo::getCreate_time, whereJson.get("begin_time"))
|
||||||
|
.le(ObjectUtil.isNotEmpty(whereJson.get("end_time")), CoolRegionIo::getCreate_time, whereJson.get("end_time"));
|
||||||
|
IPage<CoolRegionIo> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
IPage<CoolRegionIo> coolRegionIoIPage = coolRegionIoMapper.selectPage(pages, queryWrapper);
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("totalElements", coolRegionIoIPage.getTotal());
|
||||||
|
json.put("content", coolRegionIoIPage.getRecords());
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void uploadMes(JSONObject form) {
|
||||||
|
//调用回传MES的半成品入库接口
|
||||||
|
// 将入冷却信息发送给mes
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||||
|
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||||
|
String container_name = form.getString("container_name");
|
||||||
|
if (StrUtil.isEmpty(container_name)) {
|
||||||
|
throw new BadRequestException("母卷号不能为空!");
|
||||||
|
}
|
||||||
|
param.put("iContainerName", container_name);
|
||||||
|
param.put("iArrivalTime", DateUtil.now());
|
||||||
|
param.put("iWarehouse", 2);
|
||||||
|
param.put("UserName", userName);
|
||||||
|
param.put("PassWord", passWord);
|
||||||
|
|
||||||
|
//判断该接口是否需要回传
|
||||||
|
LambdaQueryWrapper<InterfaceBack> lam = new LambdaQueryWrapper<>();
|
||||||
|
lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete");
|
||||||
|
lam.eq(InterfaceBack::getIs_back, "1");
|
||||||
|
InterfaceBack back_jo = interfaceBackMapper.selectOne(lam);
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(back_jo)) {
|
||||||
|
SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,12 +8,13 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@TableName("st_ivt_hotregioniomst")
|
@TableName("st_ivt_hotregioniomst")
|
||||||
public class StIvtHotregioniomst {
|
public class StIvtHotregioniomst implements Serializable {
|
||||||
|
|
||||||
//出入单标识
|
//出入单标识
|
||||||
@TableId
|
@TableId
|
||||||
|
|||||||
@@ -1,82 +1,82 @@
|
|||||||
package org.nl.wms.pdm.ivt.rest;
|
//package org.nl.wms.pdm.ivt.rest;
|
||||||
|
//
|
||||||
|
//
|
||||||
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.logging.annotation.Log;
|
//import org.nl.modules.logging.annotation.Log;
|
||||||
import org.nl.wms.pdm.ivt.service.CoolPointIvtService;
|
//import org.nl.wms.pdm.ivt.service.CoolPointIvtService;
|
||||||
import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
|
//import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
//import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
//import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
//import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.validation.annotation.Validated;
|
//import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
//import org.springframework.web.bind.annotation.*;
|
||||||
|
//
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author lyd
|
// * @author lyd
|
||||||
* @date 2022-10-08
|
// * @date 2022-10-08
|
||||||
**/
|
// **/
|
||||||
@RestController
|
//@RestController
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
|
//
|
||||||
@RequestMapping("/api/stIvtCoolpointivt")
|
//@RequestMapping("/api/stIvtCoolpointivt")
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class CoolPointIvtController {
|
//public class CoolPointIvtController {
|
||||||
|
//
|
||||||
private final CoolPointIvtService coolpointivtService;
|
// private final CoolPointIvtService coolpointivtService;
|
||||||
|
//
|
||||||
@GetMapping
|
// @GetMapping
|
||||||
@Log("查询冷却区库存")
|
// @Log("查询冷却区库存")
|
||||||
|
//
|
||||||
//@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
// //@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
// public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(coolpointivtService.queryAll(whereJson, page), HttpStatus.OK);
|
// return new ResponseEntity<>(coolpointivtService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PostMapping
|
// @PostMapping
|
||||||
@Log("新增冷却区库存")
|
// @Log("新增冷却区库存")
|
||||||
|
//
|
||||||
//@SaCheckPermission("@el.check('stIvtCoolpointivt:add')")
|
// //@SaCheckPermission("@el.check('stIvtCoolpointivt:add')")
|
||||||
public ResponseEntity<Object> create(@Validated @RequestBody CoolPointIvtDto dto) {
|
// public ResponseEntity<Object> create(@Validated @RequestBody CoolPointIvtDto dto) {
|
||||||
coolpointivtService.create(dto);
|
// coolpointivtService.create(dto);
|
||||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
// return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PutMapping
|
// @PutMapping
|
||||||
@Log("修改冷却区库存")
|
// @Log("修改冷却区库存")
|
||||||
|
//
|
||||||
//@SaCheckPermission("@el.check('stIvtCoolpointivt:edit')")
|
// //@SaCheckPermission("@el.check('stIvtCoolpointivt:edit')")
|
||||||
public ResponseEntity<Object> update(@Validated @RequestBody CoolPointIvtDto dto) {
|
// public ResponseEntity<Object> update(@Validated @RequestBody CoolPointIvtDto dto) {
|
||||||
coolpointivtService.update(dto);
|
// coolpointivtService.update(dto);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Log("删除冷却区库存")
|
// @Log("删除冷却区库存")
|
||||||
|
//
|
||||||
//@SaCheckPermission("@el.check('stIvtCoolpointivt:del')")
|
// //@SaCheckPermission("@el.check('stIvtCoolpointivt:del')")
|
||||||
@DeleteMapping
|
// @DeleteMapping
|
||||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
// public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
coolpointivtService.deleteAll(ids);
|
// coolpointivtService.deleteAll(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
// return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@GetMapping("/coolRegionIOQueryAll")
|
// @GetMapping("/coolRegionIOQueryAll")
|
||||||
@Log("冷却区出入表")
|
// @Log("冷却区出入表")
|
||||||
|
//
|
||||||
//@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
// //@SaCheckPermission("@el.check('stIvtCoolpointivt:list')")
|
||||||
public ResponseEntity<Object> coolRegionIOQueryAll(@RequestParam Map whereJson, Pageable page) {
|
// public ResponseEntity<Object> coolRegionIOQueryAll(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(coolpointivtService.coolRegionIOQueryAll(whereJson, page), HttpStatus.OK);
|
// return new ResponseEntity<>(coolpointivtService.coolRegionIOQueryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@PostMapping("/uploadMes")
|
// @PostMapping("/uploadMes")
|
||||||
@Log("手动回传MES")
|
// @Log("手动回传MES")
|
||||||
|
//
|
||||||
public ResponseEntity<Object> uploadMes(@RequestBody JSONObject form) {
|
// public ResponseEntity<Object> uploadMes(@RequestBody JSONObject form) {
|
||||||
coolpointivtService.uploadMes(form);
|
// coolpointivtService.uploadMes(form);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
// return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,82 +1,82 @@
|
|||||||
package org.nl.wms.pdm.ivt.service;
|
//package org.nl.wms.pdm.ivt.service;
|
||||||
|
//
|
||||||
import com.alibaba.fastjson.JSONObject;
|
//import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
|
//import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
|
||||||
import org.springframework.data.domain.Pageable;
|
//import org.springframework.data.domain.Pageable;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author lyd
|
// * @author lyd
|
||||||
* @description 服务接口
|
// * @description 服务接口
|
||||||
* @date 2022-10-08
|
// * @date 2022-10-08
|
||||||
**/
|
// **/
|
||||||
public interface CoolPointIvtService {
|
//public interface CoolPointIvtService {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询数据分页
|
// * 查询数据分页
|
||||||
*
|
// *
|
||||||
* @param whereJson 条件
|
// * @param whereJson 条件
|
||||||
* @param page 分页参数
|
// * @param page 分页参数
|
||||||
* @return Map<String, Object>
|
// * @return Map<String, Object>
|
||||||
*/
|
// */
|
||||||
Map<String, Object> queryAll(Map whereJson, Pageable page);
|
// Map<String, Object> queryAll(Map whereJson, Pageable page);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询所有数据不分页
|
// * 查询所有数据不分页
|
||||||
*
|
// *
|
||||||
* @param whereJson 条件参数
|
// * @param whereJson 条件参数
|
||||||
* @return List<StIvtCoolpointivtDto>
|
// * @return List<StIvtCoolpointivtDto>
|
||||||
*/
|
// */
|
||||||
List<CoolPointIvtDto> queryAll(Map whereJson);
|
// List<CoolPointIvtDto> queryAll(Map whereJson);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据ID查询
|
// * 根据ID查询
|
||||||
*
|
// *
|
||||||
* @param ivt_id ID
|
// * @param ivt_id ID
|
||||||
* @return StIvtCoolpointivt
|
// * @return StIvtCoolpointivt
|
||||||
*/
|
// */
|
||||||
CoolPointIvtDto findById(Long ivt_id);
|
// CoolPointIvtDto findById(Long ivt_id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据编码查询
|
// * 根据编码查询
|
||||||
*
|
// *
|
||||||
* @param code code
|
// * @param code code
|
||||||
* @return StIvtCoolpointivt
|
// * @return StIvtCoolpointivt
|
||||||
*/
|
// */
|
||||||
CoolPointIvtDto findByCode(String code);
|
// CoolPointIvtDto findByCode(String code);
|
||||||
|
//
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建
|
// * 创建
|
||||||
*
|
// *
|
||||||
* @param dto /
|
// * @param dto /
|
||||||
*/
|
// */
|
||||||
void create(CoolPointIvtDto dto);
|
// void create(CoolPointIvtDto dto);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 编辑
|
// * 编辑
|
||||||
*
|
// *
|
||||||
* @param dto /
|
// * @param dto /
|
||||||
*/
|
// */
|
||||||
void update(CoolPointIvtDto dto);
|
// void update(CoolPointIvtDto dto);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 多选删除
|
// * 多选删除
|
||||||
*
|
// *
|
||||||
* @param ids /
|
// * @param ids /
|
||||||
*/
|
// */
|
||||||
void deleteAll(Long[] ids);
|
// void deleteAll(Long[] ids);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 冷却区出入分页查询
|
// * 冷却区出入分页查询
|
||||||
*
|
// *
|
||||||
* @param whereJson
|
// * @param whereJson
|
||||||
* @param page
|
// * @param page
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
Map<String, Object> coolRegionIOQueryAll(Map whereJson, Pageable page);
|
// Map<String, Object> coolRegionIOQueryAll(Map whereJson, Pageable page);
|
||||||
|
//
|
||||||
void uploadMes(JSONObject form);
|
// void uploadMes(JSONObject form);
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,154 +1,154 @@
|
|||||||
package org.nl.wms.pdm.ivt.service.dto;
|
//package org.nl.wms.pdm.ivt.service.dto;
|
||||||
|
//
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
//import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
//import lombok.Data;
|
||||||
|
//
|
||||||
import java.io.Serializable;
|
//import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
//import java.math.BigDecimal;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author lyd
|
// * @author lyd
|
||||||
* @description /
|
// * @description /
|
||||||
* @date 2022-10-08
|
// * @date 2022-10-08
|
||||||
**/
|
// **/
|
||||||
@Data
|
//@Data
|
||||||
public class CoolPointIvtDto implements Serializable {
|
//public class CoolPointIvtDto implements Serializable {
|
||||||
|
//
|
||||||
/** 库存记录标识 */
|
// /** 库存记录标识 */
|
||||||
/**
|
// /**
|
||||||
* 防止精度丢失
|
// * 防止精度丢失
|
||||||
*/
|
// */
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
// @JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long ivt_id;
|
// private Long ivt_id;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 点位编码
|
// * 点位编码
|
||||||
*/
|
// */
|
||||||
private String point_code;
|
// private String point_code;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 满轴位编码
|
// * 满轴位编码
|
||||||
*/
|
// */
|
||||||
private String full_point_code;
|
// private String full_point_code;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 母卷号
|
// * 母卷号
|
||||||
*/
|
// */
|
||||||
private String container_name;
|
// private String container_name;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 母卷工单标识
|
// * 母卷工单标识
|
||||||
*/
|
// */
|
||||||
private String workorder_id;
|
// private String workorder_id;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 母卷轴编码
|
// * 母卷轴编码
|
||||||
*/
|
// */
|
||||||
private String full_vehicle_code;
|
// private String full_vehicle_code;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 空轴位编码
|
// * 空轴位编码
|
||||||
*/
|
// */
|
||||||
private String empty_point_code;
|
// private String empty_point_code;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 空轴编码
|
// * 空轴编码
|
||||||
*/
|
// */
|
||||||
private String empty_vehicle_code;
|
// private String empty_vehicle_code;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 下料区域标识
|
// * 下料区域标识
|
||||||
*/
|
// */
|
||||||
private Long region_id;
|
// private Long region_id;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 批次
|
// * 批次
|
||||||
*/
|
// */
|
||||||
private String pcsn;
|
// private String pcsn;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 库存数
|
// * 库存数
|
||||||
*/
|
// */
|
||||||
private BigDecimal ivt_qty;
|
// private BigDecimal ivt_qty;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 计量单位标识
|
// * 计量单位标识
|
||||||
*/
|
// */
|
||||||
private Long qty_unit_id;
|
// private Long qty_unit_id;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 入库时间
|
// * 入库时间
|
||||||
*/
|
// */
|
||||||
private String instorage_time;
|
// private String instorage_time;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 生产区域
|
// * 生产区域
|
||||||
*/
|
// */
|
||||||
private String product_area;
|
// private String product_area;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 位置
|
// * 位置
|
||||||
*/
|
// */
|
||||||
private String point_location;
|
// private String point_location;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 顺序号
|
// * 顺序号
|
||||||
*/
|
// */
|
||||||
private BigDecimal sort_seq;
|
// private BigDecimal sort_seq;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 是否启用
|
// * 是否启用
|
||||||
*/
|
// */
|
||||||
private String is_used;
|
// private String is_used;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 备注
|
// * 备注
|
||||||
*/
|
// */
|
||||||
private String remark;
|
// private String remark;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建人
|
// * 创建人
|
||||||
*/
|
// */
|
||||||
private String create_id;
|
// private String create_id;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建人姓名
|
// * 创建人姓名
|
||||||
*/
|
// */
|
||||||
private String create_name;
|
// private String create_name;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 创建时间
|
// * 创建时间
|
||||||
*/
|
// */
|
||||||
private String create_time;
|
// private String create_time;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 修改人
|
// * 修改人
|
||||||
*/
|
// */
|
||||||
private String update_optid;
|
// private String update_optid;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 修改人姓名
|
// * 修改人姓名
|
||||||
*/
|
// */
|
||||||
private String update_optname;
|
// private String update_optname;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 修改时间
|
// * 修改时间
|
||||||
*/
|
// */
|
||||||
private String update_time;
|
// private String update_time;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 满轴位状态
|
// * 满轴位状态
|
||||||
*/
|
// */
|
||||||
private String full_point_status;
|
// private String full_point_status;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 库存状态
|
// * 库存状态
|
||||||
**/
|
// **/
|
||||||
private String cool_ivt_status;
|
// private String cool_ivt_status;
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 空轴位状态
|
// * 空轴位状态
|
||||||
*/
|
// */
|
||||||
private String empty_point_status;
|
// private String empty_point_status;
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -1,230 +1,230 @@
|
|||||||
package org.nl.wms.pdm.ivt.service.impl;
|
//package org.nl.wms.pdm.ivt.service.impl;
|
||||||
|
//
|
||||||
|
//
|
||||||
import cn.hutool.core.date.DateUtil;
|
//import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
//import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
//import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
//import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
//import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
//import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
//import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
//import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
//import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
//import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
//import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.WQL;
|
//import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
//import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
//import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.modules.wql.util.WqlUtil;
|
//import org.nl.modules.wql.util.WqlUtil;
|
||||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
//import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||||
import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
|
//import org.nl.wms.basedata.master.interfaceback.service.dao.InterfaceBack;
|
||||||
import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper;
|
//import org.nl.wms.basedata.master.interfaceback.service.dao.mapper.InterfaceBackMapper;
|
||||||
import org.nl.wms.basedata.st.userarea.service.IUserAreaPermissionService;
|
//import org.nl.wms.basedata.st.userarea.service.IUserAreaPermissionService;
|
||||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
//import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
import org.nl.wms.pdm.ivt.service.CoolPointIvtService;
|
//import org.nl.wms.pdm.ivt.service.CoolPointIvtService;
|
||||||
import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
|
//import org.nl.wms.pdm.ivt.service.dto.CoolPointIvtDto;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
//import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
//import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
//import org.springframework.transaction.annotation.Transactional;
|
||||||
|
//
|
||||||
import java.util.HashMap;
|
//import java.util.HashMap;
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author lyd
|
// * @author lyd
|
||||||
* @description 服务实现
|
// * @description 服务实现
|
||||||
* @date 2022-10-08
|
// * @date 2022-10-08
|
||||||
**/
|
// **/
|
||||||
@Service
|
//@Service
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@Slf4j
|
//@Slf4j
|
||||||
public class CoolPointIvtServiceImpl implements CoolPointIvtService {
|
//public class CoolPointIvtServiceImpl implements CoolPointIvtService {
|
||||||
@Autowired
|
// @Autowired
|
||||||
private InterfaceBackMapper interfaceBackMapper;
|
// private InterfaceBackMapper interfaceBackMapper;
|
||||||
@Autowired
|
// @Autowired
|
||||||
IUserAreaPermissionService userAreaPermissionService;
|
// IUserAreaPermissionService userAreaPermissionService;
|
||||||
@Override
|
// @Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
// public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
|
//
|
||||||
//获取人员对应的区域
|
// //获取人员对应的区域
|
||||||
String in_area_id = userAreaPermissionService.getInArea();
|
// String in_area_id = userAreaPermissionService.getInArea();
|
||||||
HashMap map = new HashMap();
|
// HashMap map = new HashMap();
|
||||||
map.put("flag", "1");
|
// map.put("flag", "1");
|
||||||
if (whereJson.get("point_code") != null) {
|
// if (whereJson.get("point_code") != null) {
|
||||||
map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
// map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
||||||
}
|
// }
|
||||||
if (whereJson.get("container_name") != null) {
|
// if (whereJson.get("container_name") != null) {
|
||||||
map.put("container_name", "%" + whereJson.get("container_name") + "%");
|
// map.put("container_name", "%" + whereJson.get("container_name") + "%");
|
||||||
}
|
// }
|
||||||
map.put("full_point_status", whereJson.get("full_point_status"));
|
// map.put("full_point_status", whereJson.get("full_point_status"));
|
||||||
map.put("empty_point_status", whereJson.get("empty_point_status"));
|
// map.put("empty_point_status", whereJson.get("empty_point_status"));
|
||||||
map.put("cool_ivt_status", whereJson.get("cool_ivt_status"));
|
// map.put("cool_ivt_status", whereJson.get("cool_ivt_status"));
|
||||||
map.put("product_area", whereJson.get("product_area"));
|
// map.put("product_area", whereJson.get("product_area"));
|
||||||
map.put("is_used", whereJson.get("is_used"));
|
// map.put("is_used", whereJson.get("is_used"));
|
||||||
map.put("begin_time", whereJson.get("begin_time"));
|
// map.put("begin_time", whereJson.get("begin_time"));
|
||||||
map.put("end_time", whereJson.get("end_time"));
|
// map.put("end_time", whereJson.get("end_time"));
|
||||||
map.put("point_location", whereJson.get("point_location"));
|
// map.put("point_location", whereJson.get("point_location"));
|
||||||
if (ObjectUtil.isNotEmpty(in_area_id)) {
|
// if (ObjectUtil.isNotEmpty(in_area_id)) {
|
||||||
map.put("in_area_id", in_area_id);
|
// map.put("in_area_id", in_area_id);
|
||||||
}
|
// }
|
||||||
JSONObject json = WQL.getWO("ST_IVT_COOLPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "product_area,point_code");
|
// JSONObject json = WQL.getWO("ST_IVT_COOLPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "product_area,point_code");
|
||||||
return json;
|
// return json;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public List<CoolPointIvtDto> queryAll(Map whereJson) {
|
// public List<CoolPointIvtDto> queryAll(Map whereJson) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
// WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
||||||
JSONArray arr = wo.query().getResultJSONArray(0);
|
// JSONArray arr = wo.query().getResultJSONArray(0);
|
||||||
if (ObjectUtil.isNotEmpty(arr)) {
|
// if (ObjectUtil.isNotEmpty(arr)) {
|
||||||
return arr.toJavaList(CoolPointIvtDto.class);
|
// return arr.toJavaList(CoolPointIvtDto.class);
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public CoolPointIvtDto findById(Long ivt_id) {
|
// public CoolPointIvtDto findById(Long ivt_id) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
// WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
||||||
JSONObject json = wo.query("ivt_id = '" + ivt_id + "'").uniqueResult(0);
|
// JSONObject json = wo.query("ivt_id = '" + ivt_id + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(json)) {
|
// if (ObjectUtil.isNotEmpty(json)) {
|
||||||
return json.toJavaObject(CoolPointIvtDto.class);
|
// return json.toJavaObject(CoolPointIvtDto.class);
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public CoolPointIvtDto findByCode(String code) {
|
// public CoolPointIvtDto findByCode(String code) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
// WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
||||||
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
// JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(json)) {
|
// if (ObjectUtil.isNotEmpty(json)) {
|
||||||
return json.toJavaObject(CoolPointIvtDto.class);
|
// return json.toJavaObject(CoolPointIvtDto.class);
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public void create(CoolPointIvtDto dto) {
|
// public void create(CoolPointIvtDto dto) {
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
// String nickName = SecurityUtils.getCurrentNickName();
|
||||||
String now = DateUtil.now();
|
// String now = DateUtil.now();
|
||||||
|
//
|
||||||
dto.setIvt_id(IdUtil.getSnowflake(1, 1).nextId());
|
// dto.setIvt_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
dto.setCreate_id(currentUserId);
|
// dto.setCreate_id(currentUserId);
|
||||||
dto.setCreate_name(nickName);
|
// dto.setCreate_name(nickName);
|
||||||
dto.setUpdate_optid(currentUserId);
|
// dto.setUpdate_optid(currentUserId);
|
||||||
dto.setUpdate_optname(nickName);
|
// dto.setUpdate_optname(nickName);
|
||||||
dto.setUpdate_time(now);
|
// dto.setUpdate_time(now);
|
||||||
dto.setCreate_time(now);
|
// dto.setCreate_time(now);
|
||||||
|
//
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
// WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
||||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
// JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
wo.insert(json);
|
// wo.insert(json);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public void update(CoolPointIvtDto dto) {
|
// public void update(CoolPointIvtDto dto) {
|
||||||
CoolPointIvtDto entity = this.findById(dto.getIvt_id());
|
// CoolPointIvtDto entity = this.findById(dto.getIvt_id());
|
||||||
if (entity == null) {
|
// if (entity == null) {
|
||||||
throw new BadRequestException("被删除或无权限,操作失败!");
|
// throw new BadRequestException("被删除或无权限,操作失败!");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
// String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
//
|
||||||
String now = DateUtil.now();
|
// String now = DateUtil.now();
|
||||||
dto.setUpdate_time(now);
|
// dto.setUpdate_time(now);
|
||||||
dto.setUpdate_optid(currentUserId);
|
// dto.setUpdate_optid(currentUserId);
|
||||||
dto.setUpdate_optname(nickName);
|
// dto.setUpdate_optname(nickName);
|
||||||
|
//
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
// WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
||||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
// JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
wo.update(json);
|
// wo.update(json);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
// @Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteAll(Long[] ids) {
|
// public void deleteAll(Long[] ids) {
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
// String currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
// String nickName = SecurityUtils.getCurrentNickName();
|
||||||
String now = DateUtil.now();
|
// String now = DateUtil.now();
|
||||||
|
//
|
||||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
// WQLObject wo = WQLObject.getWQLObject("st_ivt_coolpointivt");
|
||||||
for (Long ivt_id : ids) {
|
// for (Long ivt_id : ids) {
|
||||||
JSONObject param = new JSONObject();
|
// JSONObject param = new JSONObject();
|
||||||
param.put("ivt_id", String.valueOf(ivt_id));
|
// param.put("ivt_id", String.valueOf(ivt_id));
|
||||||
param.put("is_delete", "1");
|
// param.put("is_delete", "1");
|
||||||
param.put("update_optid", currentUserId);
|
// param.put("update_optid", currentUserId);
|
||||||
param.put("update_optname", nickName);
|
// param.put("update_optname", nickName);
|
||||||
param.put("update_time", now);
|
// param.put("update_time", now);
|
||||||
wo.update(param);
|
// wo.update(param);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 冷却区出入分页查询
|
// * 冷却区出入分页查询
|
||||||
*
|
// *
|
||||||
* @param whereJson
|
// * @param whereJson
|
||||||
* @param page
|
// * @param page
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public Map<String, Object> coolRegionIOQueryAll(Map whereJson, Pageable page) {
|
// public Map<String, Object> coolRegionIOQueryAll(Map whereJson, Pageable page) {
|
||||||
String start_point_code = MapUtil.getStr(whereJson, "start_point_code");
|
// String start_point_code = MapUtil.getStr(whereJson, "start_point_code");
|
||||||
String end_point_code = MapUtil.getStr(whereJson, "end_point_code");
|
// String end_point_code = MapUtil.getStr(whereJson, "end_point_code");
|
||||||
String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
// String pcsn = MapUtil.getStr(whereJson, "pcsn");
|
||||||
String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code");
|
// String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code");
|
||||||
|
//
|
||||||
JSONObject map = new JSONObject();
|
// JSONObject map = new JSONObject();
|
||||||
map.put("flag", "2");
|
// map.put("flag", "2");
|
||||||
map.put("begin_time", whereJson.get("begin_time"));
|
// map.put("begin_time", whereJson.get("begin_time"));
|
||||||
map.put("end_time", whereJson.get("end_time"));
|
// map.put("end_time", whereJson.get("end_time"));
|
||||||
if (ObjectUtil.isNotEmpty(start_point_code)) {
|
// if (ObjectUtil.isNotEmpty(start_point_code)) {
|
||||||
map.put("start_point_code", "%" + start_point_code + "%");
|
// map.put("start_point_code", "%" + start_point_code + "%");
|
||||||
}
|
// }
|
||||||
if (ObjectUtil.isNotEmpty(end_point_code)) {
|
// if (ObjectUtil.isNotEmpty(end_point_code)) {
|
||||||
map.put("end_point_code", "%" + end_point_code + "%");
|
// map.put("end_point_code", "%" + end_point_code + "%");
|
||||||
}
|
// }
|
||||||
if (ObjectUtil.isNotEmpty(pcsn)) {
|
// if (ObjectUtil.isNotEmpty(pcsn)) {
|
||||||
map.put("pcsn", "%" + pcsn + "%");
|
// map.put("pcsn", "%" + pcsn + "%");
|
||||||
}
|
// }
|
||||||
if (ObjectUtil.isNotEmpty(vehicle_code)) {
|
// if (ObjectUtil.isNotEmpty(vehicle_code)) {
|
||||||
map.put("vehicle_code", "%" + vehicle_code + "%");
|
// map.put("vehicle_code", "%" + vehicle_code + "%");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
JSONObject json = WQL.getWO("ST_IVT_COOLPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
// JSONObject json = WQL.getWO("ST_IVT_COOLPOINTIVT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time desc");
|
||||||
return json;
|
// return json;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void uploadMes(JSONObject form) {
|
// public void uploadMes(JSONObject form) {
|
||||||
//调用回传MES的半成品入库接口
|
// //调用回传MES的半成品入库接口
|
||||||
// 将入冷却信息发送给mes
|
// // 将入冷却信息发送给mes
|
||||||
JSONObject param = new JSONObject();
|
// JSONObject param = new JSONObject();
|
||||||
String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
// String userName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||||
String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
// String passWord = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||||
String container_name = form.getString("container_name");
|
// String container_name = form.getString("container_name");
|
||||||
if (StrUtil.isEmpty(container_name)) {
|
// if (StrUtil.isEmpty(container_name)) {
|
||||||
throw new BadRequestException("母卷号不能为空!");
|
// throw new BadRequestException("母卷号不能为空!");
|
||||||
}
|
// }
|
||||||
param.put("iContainerName", container_name);
|
// param.put("iContainerName", container_name);
|
||||||
param.put("iArrivalTime", DateUtil.now());
|
// param.put("iArrivalTime", DateUtil.now());
|
||||||
param.put("iWarehouse", 2);
|
// param.put("iWarehouse", 2);
|
||||||
param.put("UserName", userName);
|
// param.put("UserName", userName);
|
||||||
param.put("PassWord", passWord);
|
// param.put("PassWord", passWord);
|
||||||
|
//
|
||||||
//判断该接口是否需要回传
|
// //判断该接口是否需要回传
|
||||||
LambdaQueryWrapper<InterfaceBack> lam = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<InterfaceBack> lam = new LambdaQueryWrapper<>();
|
||||||
lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete");
|
// lam.eq(InterfaceBack::getInterface_name, "momRollSemiFGInboundComplete");
|
||||||
lam.eq(InterfaceBack::getIs_back, "1");
|
// lam.eq(InterfaceBack::getIs_back, "1");
|
||||||
InterfaceBack back_jo = interfaceBackMapper.selectOne(lam);
|
// InterfaceBack back_jo = interfaceBackMapper.selectOne(lam);
|
||||||
|
//
|
||||||
if (ObjectUtil.isNotEmpty(back_jo)) {
|
// if (ObjectUtil.isNotEmpty(back_jo)) {
|
||||||
SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param);
|
// SpringContextHolder.getBean(LmsToMesService.class).momRollSemiFGInboundComplete(param);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
Reference in New Issue
Block a user