32 changed files with 429 additions and 1869 deletions
@ -1,81 +0,0 @@ |
|||
//package org.nl.wms.pdm.rest;
|
|||
//
|
|||
//
|
|||
//import com.alibaba.fastjson.JSONObject;
|
|||
//import lombok.RequiredArgsConstructor;
|
|||
//import lombok.extern.slf4j.Slf4j;
|
|||
//import org.nl.modules.logging.annotation.Log;
|
|||
//import org.nl.wms.pdm.service.RawfoilworkorderService;
|
|||
//import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
|||
//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;
|
|||
//
|
|||
///**
|
|||
// * @author liuxy
|
|||
// * @date 2022-10-08
|
|||
// **/
|
|||
//@RestController
|
|||
//@RequiredArgsConstructor
|
|||
//
|
|||
//@RequestMapping("/api/rawfoilworkorder")
|
|||
//@Slf4j
|
|||
//public class RawfoilworkorderController {
|
|||
//
|
|||
// private final RawfoilworkorderService rawfoilworkorderService;
|
|||
//
|
|||
// @GetMapping
|
|||
// @Log("查询生箔工序工单")
|
|||
//
|
|||
// //@SaCheckPermission("@el.check('rawfoilworkorder:list')")
|
|||
// public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
|||
// return new ResponseEntity<>(rawfoilworkorderService.queryAll(whereJson, page), HttpStatus.OK);
|
|||
// }
|
|||
//
|
|||
// @PostMapping
|
|||
// @Log("新增生箔工序工单")
|
|||
//
|
|||
// //@SaCheckPermission("@el.check('rawfoilworkorder:add')")
|
|||
// public ResponseEntity<Object> create(@Validated @RequestBody RawfoilworkorderDto dto) {
|
|||
// rawfoilworkorderService.create(dto);
|
|||
// return new ResponseEntity<>(HttpStatus.CREATED);
|
|||
// }
|
|||
//
|
|||
// @PutMapping
|
|||
// @Log("修改生箔工序工单")
|
|||
//
|
|||
// //@SaCheckPermission("@el.check('rawfoilworkorder:edit')")
|
|||
// public ResponseEntity<Object> update(@Validated @RequestBody RawfoilworkorderDto dto) {
|
|||
// rawfoilworkorderService.update(dto);
|
|||
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|||
// }
|
|||
//
|
|||
// @Log("删除生箔工序工单")
|
|||
//
|
|||
// //@SaCheckPermission("@el.check('rawfoilworkorder:del')")
|
|||
// @DeleteMapping
|
|||
// public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
|||
// rawfoilworkorderService.deleteAll(ids);
|
|||
// return new ResponseEntity<>(HttpStatus.OK);
|
|||
// }
|
|||
//
|
|||
// @Log("强制确认")
|
|||
//
|
|||
// @PostMapping("/compelEnd")
|
|||
// public ResponseEntity<Object> compelEnd(@RequestBody JSONObject whereJson) {
|
|||
// rawfoilworkorderService.compelEnd(whereJson);
|
|||
// return new ResponseEntity<>(HttpStatus.OK);
|
|||
// }
|
|||
//
|
|||
// @Log("称重")
|
|||
//
|
|||
// @PostMapping("/confirm")
|
|||
// public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
|||
// rawfoilworkorderService.confirm(whereJson);
|
|||
// return new ResponseEntity<>(HttpStatus.OK);
|
|||
// }
|
|||
//}
|
@ -1,85 +0,0 @@ |
|||
//package org.nl.wms.pdm.service;
|
|||
//
|
|||
//import com.alibaba.fastjson.JSONObject;
|
|||
//import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
|||
//import org.springframework.data.domain.Pageable;
|
|||
//
|
|||
//import java.util.List;
|
|||
//import java.util.Map;
|
|||
//
|
|||
///**
|
|||
// * @author liuxy
|
|||
// * @description 服务接口
|
|||
// * @date 2022-10-08
|
|||
// **/
|
|||
//public interface RawfoilworkorderService {
|
|||
//
|
|||
// /**
|
|||
// * 查询数据分页
|
|||
// *
|
|||
// * @param whereJson 条件
|
|||
// * @param page 分页参数
|
|||
// * @return Map<String, Object>
|
|||
// */
|
|||
// Map<String, Object> queryAll(Map whereJson, Pageable page);
|
|||
//
|
|||
// /**
|
|||
// * 查询所有数据不分页
|
|||
// *
|
|||
// * @param whereJson 条件参数
|
|||
// * @return List<RawfoilworkorderDto>
|
|||
// */
|
|||
// List<RawfoilworkorderDto> queryAll(Map whereJson);
|
|||
//
|
|||
// /**
|
|||
// * 根据ID查询
|
|||
// *
|
|||
// * @param workorder_id ID
|
|||
// * @return Rawfoilworkorder
|
|||
// */
|
|||
// RawfoilworkorderDto findById(Long workorder_id);
|
|||
//
|
|||
// /**
|
|||
// * 根据编码查询
|
|||
// *
|
|||
// * @param code code
|
|||
// * @return Rawfoilworkorder
|
|||
// */
|
|||
// RawfoilworkorderDto findByCode(String code);
|
|||
//
|
|||
//
|
|||
// /**
|
|||
// * 创建
|
|||
// *
|
|||
// * @param dto /
|
|||
// */
|
|||
// void create(RawfoilworkorderDto dto);
|
|||
//
|
|||
// /**
|
|||
// * 编辑
|
|||
// *
|
|||
// * @param dto /
|
|||
// */
|
|||
// void update(RawfoilworkorderDto dto);
|
|||
//
|
|||
// /**
|
|||
// * 多选删除
|
|||
// *
|
|||
// * @param ids /
|
|||
// */
|
|||
// void deleteAll(Long[] ids);
|
|||
//
|
|||
// /**
|
|||
// * 强制确认
|
|||
// *
|
|||
// * @param whereJson /
|
|||
// */
|
|||
// void compelEnd(JSONObject whereJson);
|
|||
//
|
|||
// /**
|
|||
// * 称重
|
|||
// *
|
|||
// * @param whereJson /
|
|||
// */
|
|||
// void confirm(JSONObject whereJson);
|
|||
//}
|
@ -1,107 +0,0 @@ |
|||
package org.nl.wms.pdm.service; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan; |
|||
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto; |
|||
import org.springframework.data.domain.Pageable; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author liuxy |
|||
* @description 服务接口 |
|||
* @date 2022-10-09 |
|||
**/ |
|||
public interface SlittingproductionplanService { |
|||
|
|||
/** |
|||
* 查询数据分页 |
|||
* |
|||
* @param whereJson 条件 |
|||
* @param page 分页参数 |
|||
* @return Map<String, Object> |
|||
*/ |
|||
Map<String, Object> queryAll(Map whereJson, Pageable page); |
|||
|
|||
/** |
|||
* 查询所有数据不分页 |
|||
* |
|||
* @param whereJson 条件参数 |
|||
* @return List<SlittingproductionplanDto> |
|||
*/ |
|||
List<PdmBiSlittingproductionplan> queryAll(Map whereJson); |
|||
|
|||
/** |
|||
* 根据ID查询 |
|||
* |
|||
* @param workorder_id ID |
|||
* @return Slittingproductionplan |
|||
*/ |
|||
PdmBiSlittingproductionplan findById(Long workorder_id); |
|||
|
|||
/** |
|||
* 根据编码查询 |
|||
* |
|||
* @param code code |
|||
* @return Slittingproductionplan |
|||
*/ |
|||
PdmBiSlittingproductionplan findByCode(String code); |
|||
|
|||
|
|||
/** |
|||
* 创建 |
|||
* |
|||
* @param dto / |
|||
*/ |
|||
void create(PdmBiSlittingproductionplan dto); |
|||
|
|||
/** |
|||
* 编辑 |
|||
* |
|||
* @param dto / |
|||
*/ |
|||
void update(PdmBiSlittingproductionplan dto); |
|||
|
|||
/** |
|||
* 多选删除 |
|||
* |
|||
* @param ids / |
|||
*/ |
|||
void deleteAll(Long[] ids); |
|||
|
|||
/** |
|||
* 上料完成 |
|||
* |
|||
* @param whereJson / |
|||
*/ |
|||
void upMaterFinish(JSONObject whereJson); |
|||
|
|||
/** |
|||
* 套管完成 |
|||
* |
|||
* @param whereJson / |
|||
*/ |
|||
void caseFinish(JSONObject whereJson); |
|||
|
|||
/** |
|||
* 配送完成 |
|||
* |
|||
* @param whereJson / |
|||
*/ |
|||
void sendFinish(JSONObject whereJson); |
|||
|
|||
/** |
|||
* 入站完成 |
|||
* |
|||
* @param whereJson / |
|||
*/ |
|||
void inFinish(JSONObject whereJson); |
|||
|
|||
/** |
|||
* 强制完成 |
|||
* |
|||
* @param whereJson / |
|||
*/ |
|||
void compelFinish(JSONObject whereJson); |
|||
} |
@ -1,95 +0,0 @@ |
|||
package org.nl.wms.pdm.service.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author geng by |
|||
* @description / |
|||
* @date 2022-06-02 |
|||
**/ |
|||
@Data |
|||
public class BomDto implements Serializable { |
|||
|
|||
/** |
|||
* BOM单标识 |
|||
*/ |
|||
private String bom_uuid; |
|||
|
|||
/** |
|||
* BOM单编码 |
|||
*/ |
|||
private String bom_code; |
|||
|
|||
/** |
|||
* BOM单名称 |
|||
*/ |
|||
private String bom_name; |
|||
|
|||
/** |
|||
* 物料标识 |
|||
*/ |
|||
private String material_uuid; |
|||
|
|||
/** |
|||
* 产品工艺路线标识 |
|||
*/ |
|||
private String processroute_uuid; |
|||
|
|||
/** |
|||
* 成材率百分比 |
|||
*/ |
|||
private BigDecimal yield_rate; |
|||
|
|||
/** |
|||
* 成品率百分比 |
|||
*/ |
|||
private BigDecimal endproduct_rate; |
|||
|
|||
/** |
|||
* BOM单状态 |
|||
*/ |
|||
private String bom_status; |
|||
|
|||
/** |
|||
* 明细数 |
|||
*/ |
|||
private BigDecimal detail_count; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
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; |
|||
} |
@ -1,79 +0,0 @@ |
|||
package org.nl.wms.pdm.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; |
|||
|
|||
/** |
|||
* @author geng by |
|||
* @description / |
|||
* @date 2022-05-25 |
|||
**/ |
|||
@Data |
|||
public class DeviceDto implements Serializable { |
|||
|
|||
/** 设备标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long device_id; |
|||
|
|||
/** |
|||
* 设备编码 |
|||
*/ |
|||
private String device_code; |
|||
|
|||
/** |
|||
* 设备名称 |
|||
*/ |
|||
private String device_name; |
|||
|
|||
/** |
|||
* 设备型号 |
|||
*/ |
|||
private String device_model; |
|||
|
|||
/** |
|||
* 外部编码 |
|||
*/ |
|||
private String extend_code; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 是否启用 |
|||
*/ |
|||
private String is_active; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String create_id; |
|||
|
|||
/** |
|||
* 创建人姓名 |
|||
*/ |
|||
private String create_name; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private String create_time; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String is_delete; |
|||
|
|||
/** |
|||
* 设备产能 |
|||
*/ |
|||
private BigDecimal productivity; |
|||
} |
@ -1,54 +0,0 @@ |
|||
package org.nl.wms.pdm.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; |
|||
|
|||
/** |
|||
* @author geng by |
|||
* @description / |
|||
* @date 2022-05-25 |
|||
**/ |
|||
@Data |
|||
public class DeviceitemDto implements Serializable { |
|||
|
|||
/** 项点标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long item_id; |
|||
|
|||
/** |
|||
* 项点编码 |
|||
*/ |
|||
private String item_code; |
|||
|
|||
/** |
|||
* 项点名称 |
|||
*/ |
|||
private String item_name; |
|||
|
|||
/** |
|||
* 默认值 |
|||
*/ |
|||
private String default_value; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 顺序 |
|||
*/ |
|||
private BigDecimal order_seq; |
|||
|
|||
/** |
|||
* 默认值类型 |
|||
*/ |
|||
private String data_type; |
|||
} |
@ -1,114 +0,0 @@ |
|||
package org.nl.wms.pdm.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; |
|||
|
|||
/** |
|||
* @author Lxy |
|||
* @description / |
|||
* @date 2022-03-21 |
|||
**/ |
|||
@Data |
|||
public class ProcessrouteDto implements Serializable { |
|||
|
|||
/** 工艺路线标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long processroute_id; |
|||
|
|||
/** |
|||
* 工艺路线编码 |
|||
*/ |
|||
private String processroute_code; |
|||
|
|||
/** |
|||
* 工艺路线名称 |
|||
*/ |
|||
private String processroute_name; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String processroute_status; |
|||
|
|||
/** |
|||
* 明细数 |
|||
*/ |
|||
private BigDecimal detail_count; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
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 Long audit_optid; |
|||
|
|||
/** |
|||
* 审核人姓名 |
|||
*/ |
|||
private String audit_optname; |
|||
|
|||
/** |
|||
* 审核时间 |
|||
*/ |
|||
private String audit_time; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private Long sysdeptid; |
|||
|
|||
/** |
|||
* 公司ID |
|||
*/ |
|||
private Long syscompanyid; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String is_delete; |
|||
|
|||
/** |
|||
* 外部标识 |
|||
*/ |
|||
private String ext_id; |
|||
} |
@ -1,116 +0,0 @@ |
|||
package org.nl.wms.pdm.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; |
|||
|
|||
/** |
|||
* @author zhouz |
|||
* @description / |
|||
* @date 2022-03-22 |
|||
**/ |
|||
@Data |
|||
public class ProductprocessrouteDto implements Serializable { |
|||
|
|||
/** 产品工艺路线标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long productprocess_id; |
|||
|
|||
/** |
|||
* 物料标识 |
|||
*/ |
|||
private Long material_id; |
|||
|
|||
/** 工艺路线标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long processroute_id; |
|||
|
|||
/** |
|||
* 产品工艺路线状态 |
|||
*/ |
|||
private String productprocess_status; |
|||
|
|||
/** |
|||
* 明细数 |
|||
*/ |
|||
private BigDecimal detail_count; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
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 Long audit_optid; |
|||
|
|||
/** |
|||
* 审核人姓名 |
|||
*/ |
|||
private String audit_optname; |
|||
|
|||
/** |
|||
* 审核时间 |
|||
*/ |
|||
private String audit_time; |
|||
|
|||
/** |
|||
* 部门ID |
|||
*/ |
|||
private Long sysdeptid; |
|||
|
|||
/** |
|||
* 公司ID |
|||
*/ |
|||
private Long syscompanyid; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String is_delete; |
|||
|
|||
/** |
|||
* 外部标识 |
|||
*/ |
|||
private String ext_id; |
|||
} |
@ -1,149 +0,0 @@ |
|||
package org.nl.wms.pdm.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; |
|||
|
|||
/** |
|||
* @author liuxy |
|||
* @description / |
|||
* @date 2022-10-08 |
|||
**/ |
|||
@Data |
|||
public class RawfoilworkorderDto implements Serializable { |
|||
|
|||
/** 工单标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long workorder_id; |
|||
|
|||
/** |
|||
* 母卷号 |
|||
*/ |
|||
private String container_name; |
|||
|
|||
/** |
|||
* 机台编码 |
|||
*/ |
|||
private String resource_name; |
|||
|
|||
/** |
|||
* 生产工单 |
|||
*/ |
|||
private String mfg_order_name; |
|||
|
|||
/** |
|||
* 产品编码 |
|||
*/ |
|||
private String product_name; |
|||
|
|||
/** |
|||
* 产品名称 |
|||
*/ |
|||
private String description; |
|||
|
|||
/** |
|||
* 理论长度 |
|||
*/ |
|||
private BigDecimal theory_height; |
|||
|
|||
/** |
|||
* 设备生产速度 |
|||
*/ |
|||
private BigDecimal eqp_velocity; |
|||
|
|||
/** |
|||
* 上卷开始时间 |
|||
*/ |
|||
private String up_coiler_date; |
|||
|
|||
/** |
|||
* 是否重新更新 |
|||
*/ |
|||
private String is_reload_send; |
|||
|
|||
/** |
|||
* 重量 |
|||
*/ |
|||
private BigDecimal productin_qty; |
|||
|
|||
/** |
|||
* 开始时间 |
|||
*/ |
|||
private String realstart_time; |
|||
|
|||
/** |
|||
* 结束时间 |
|||
*/ |
|||
private String realend_time; |
|||
|
|||
/** |
|||
* 状态 |
|||
*/ |
|||
private String status; |
|||
|
|||
/** |
|||
* 完成方式 |
|||
*/ |
|||
private String finish_type; |
|||
|
|||
/** |
|||
* 车号 |
|||
*/ |
|||
private String agvno; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
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 is_delete; |
|||
|
|||
/** |
|||
* 生产区域 |
|||
*/ |
|||
private String product_area; |
|||
|
|||
/** |
|||
* 点位编码 |
|||
*/ |
|||
private String point_code; |
|||
} |
@ -1,179 +0,0 @@ |
|||
package org.nl.wms.pdm.service.dto; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.IdType; |
|||
import com.baomidou.mybatisplus.annotation.TableId; |
|||
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; |
|||
|
|||
/** |
|||
* @author liuxy |
|||
* @description / |
|||
* @date 2022-10-09 |
|||
**/ |
|||
@Data |
|||
public class SlittingproductionplanDto implements Serializable { |
|||
|
|||
/** 分切计划标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long workorder_id; |
|||
|
|||
/** 分切订单类型 */ |
|||
private String order_type; |
|||
|
|||
/** 子卷号 */ |
|||
private String container_name; |
|||
|
|||
/** 产品编码 */ |
|||
private String product_name; |
|||
|
|||
/** 产品描述 */ |
|||
private String description; |
|||
|
|||
/** 来源母卷号 */ |
|||
private String parent_container_name; |
|||
|
|||
/** 改制来源子卷号 */ |
|||
private String restruct_container_name; |
|||
|
|||
/** 子卷立库木箱号 */ |
|||
private String package_box_sn; |
|||
|
|||
/** 来源卷位置 */ |
|||
private String ware_house; |
|||
|
|||
/** 分切机台编码 */ |
|||
private String resource_name; |
|||
|
|||
/** 分切组 */ |
|||
private String split_group; |
|||
|
|||
/** 生产顺序 */ |
|||
private String manufacture_sort; |
|||
|
|||
/** 生产订单 */ |
|||
private String mfg_order_name; |
|||
|
|||
/** 生产日期 */ |
|||
private String manufacture_date; |
|||
|
|||
/** 管件类型 */ |
|||
private String paper_tube_or_FRP; |
|||
|
|||
/** 纸筒物料编码 */ |
|||
private String paper_tube_material; |
|||
|
|||
/** 纸筒物料描述 */ |
|||
private String paper_tube_description; |
|||
|
|||
/** 纸筒规格 */ |
|||
private String paper_tube_model; |
|||
|
|||
/** FRP管物料编码 */ |
|||
private String FRP_material; |
|||
|
|||
/** FRP管物料描述 */ |
|||
private String FRP_description; |
|||
|
|||
/** FRP管规格 */ |
|||
private String FRP_model; |
|||
|
|||
/** 子卷幅宽 */ |
|||
private BigDecimal split_breadth; |
|||
|
|||
/** 子卷理论长度 */ |
|||
private BigDecimal split_height; |
|||
|
|||
/** 子卷理论重量 */ |
|||
private BigDecimal split_weight; |
|||
|
|||
/** 开始时间 */ |
|||
private String start_time; |
|||
|
|||
/** 结束时间 */ |
|||
private String end_time; |
|||
|
|||
/** 状态 */ |
|||
private String status; |
|||
|
|||
/** 修改人 */ |
|||
private String update_optid; |
|||
|
|||
/** 修改人姓名 */ |
|||
private String update_optname; |
|||
|
|||
/** 修改时间 */ |
|||
private String update_time; |
|||
|
|||
/** 部门ID */ |
|||
private String sysdeptid; |
|||
|
|||
/** 公司ID */ |
|||
private String syscompanyid; |
|||
|
|||
/** 是否删除 */ |
|||
private String is_delete; |
|||
|
|||
/** 上料完成 */ |
|||
private String is_parent_ok; |
|||
|
|||
/** 子卷套轴完成 */ |
|||
private String is_child_tz_ok; |
|||
|
|||
/** 子卷配送完成 */ |
|||
private String is_child_ps_ok; |
|||
|
|||
/** 气涨轴编码 */ |
|||
private String qzzno; |
|||
|
|||
/** 销售订单及行号 */ |
|||
private String sale_order_name; |
|||
|
|||
/** 是否呼叫 */ |
|||
private String is_call; |
|||
|
|||
/** 呼叫时间 */ |
|||
private String call_time; |
|||
|
|||
/** 是否呼叫纸管 */ |
|||
private String is_paper_ok; |
|||
|
|||
/** 上下轴(1,2) */ |
|||
private String up_or_down; |
|||
|
|||
/** 左右(1,2) */ |
|||
private String left_or_right; |
|||
|
|||
/** 气涨轴规格 */ |
|||
private String qzz_size; |
|||
|
|||
/** 气涨轴代数 */ |
|||
private String qzz_generation; |
|||
|
|||
/** 子卷等级*/ |
|||
private String level; |
|||
|
|||
/** 子卷重量 */ |
|||
private String weight; |
|||
|
|||
/** 接头数 */ |
|||
private String joint_type; |
|||
|
|||
/** 物料类型 */ |
|||
private String material_type; |
|||
|
|||
/** 分切重量 */ |
|||
private String paper_weight; |
|||
/** 木箱物料编码 */ |
|||
private String box_code; |
|||
/** 木箱描述 */ |
|||
private String box_description; |
|||
/** 批次号 */ |
|||
private String pscn; |
|||
} |
@ -1,110 +0,0 @@ |
|||
package org.nl.wms.pdm.service.dto; |
|||
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
|||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author ldjun |
|||
* @description / |
|||
* @date 2021-12-19 |
|||
**/ |
|||
@Data |
|||
public class WorkProcedureDto implements Serializable { |
|||
|
|||
/** 工序标识 */ |
|||
/** |
|||
* 防止精度丢失 |
|||
*/ |
|||
@JsonSerialize(using = ToStringSerializer.class) |
|||
private Long workprocedure_id; |
|||
private Long sysdeptid; |
|||
private Long syscompanyid; |
|||
|
|||
/** |
|||
* 工序编码 |
|||
*/ |
|||
private String workprocedure_code; |
|||
|
|||
/** |
|||
* 工序名称 |
|||
*/ |
|||
private String workprocedure_name; |
|||
|
|||
/** |
|||
* 是否关键工序 |
|||
*/ |
|||
private String is_keyworkprocedure; |
|||
|
|||
/** |
|||
* 是否完工汇报 |
|||
*/ |
|||
private String is_finishback; |
|||
|
|||
/** |
|||
* 是否启用 |
|||
*/ |
|||
private String is_used; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String create_id; |
|||
|
|||
/** |
|||
* 创建人姓名 |
|||
*/ |
|||
private String create_name; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private String create_time; |
|||
|
|||
/** |
|||
* 是否删除 |
|||
*/ |
|||
private String is_delete; |
|||
|
|||
/** |
|||
* 外部标识 |
|||
*/ |
|||
private String ext_id; |
|||
|
|||
/** |
|||
* 业务组织标识 |
|||
*/ |
|||
private Long org_id; |
|||
|
|||
/** |
|||
* 业务组织编码 |
|||
*/ |
|||
private String org_code; |
|||
|
|||
/** |
|||
* 业务组织名字 |
|||
*/ |
|||
private String org_name; |
|||
/** |
|||
* 修改人 |
|||
*/ |
|||
private String update_optid; |
|||
|
|||
/** |
|||
* 修改人姓名 |
|||
*/ |
|||
private String update_optname; |
|||
|
|||
/** |
|||
* 修改时间 |
|||
*/ |
|||
private String update_time; |
|||
} |
|||
|
@ -1,250 +0,0 @@ |
|||
//package org.nl.wms.pdm.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 com.alibaba.fastjson.JSON;
|
|||
//import com.alibaba.fastjson.JSONArray;
|
|||
//import com.alibaba.fastjson.JSONObject;
|
|||
//import lombok.RequiredArgsConstructor;
|
|||
//import lombok.extern.slf4j.Slf4j;
|
|||
//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.WqlUtil;
|
|||
//import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl;
|
|||
//import org.nl.wms.pdm.service.RawfoilworkorderService;
|
|||
//import org.nl.wms.pdm.service.dto.RawfoilworkorderDto;
|
|||
//import org.springframework.data.domain.Pageable;
|
|||
//import org.springframework.stereotype.Service;
|
|||
//import org.springframework.transaction.annotation.Transactional;
|
|||
//
|
|||
//import java.util.List;
|
|||
//import java.util.Map;
|
|||
//
|
|||
///**
|
|||
// * @author liuxy
|
|||
// * @description 服务实现
|
|||
// * @date 2022-10-08
|
|||
// **/
|
|||
//@Service
|
|||
//@RequiredArgsConstructor
|
|||
//@Slf4j
|
|||
//public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
|
|||
//
|
|||
// @Override
|
|||
// public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
|||
// String product_area = MapUtil.getStr(whereJson, "product_area");
|
|||
// String resource_name = MapUtil.getStr(whereJson, "resource_name");
|
|||
// String status = MapUtil.getStr(whereJson, "status");
|
|||
// String container_name = MapUtil.getStr(whereJson, "container_name");
|
|||
// String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
|||
// String end_time = MapUtil.getStr(whereJson, "end_time");
|
|||
//
|
|||
// //获取人员对应的区域
|
|||
// UserAreaServiceImpl userAreaService = new UserAreaServiceImpl();
|
|||
// String in_area_id = userAreaService.getInArea();
|
|||
//
|
|||
// JSONObject map = new JSONObject();
|
|||
// map.put("flag", "1");
|
|||
// if (ObjectUtil.isNotEmpty(resource_name)) {
|
|||
// map.put("resource_name", "%" + resource_name + "%");
|
|||
// }
|
|||
// if (ObjectUtil.isNotEmpty(container_name)) {
|
|||
// map.put("container_name", "%" + container_name + "%");
|
|||
// }
|
|||
// map.put("begin_time", begin_time);
|
|||
// map.put("end_time", end_time);
|
|||
// map.put("product_area", product_area);
|
|||
// map.put("status", status);
|
|||
// if (ObjectUtil.isNotEmpty(in_area_id)) {
|
|||
// map.put("in_area_id", in_area_id);
|
|||
// }
|
|||
//
|
|||
// JSONObject json = WQL.getWO("PDM_BI_RAWFOILWORKORDER_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "der.container_name");
|
|||
// return json;
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// public List<RawfoilworkorderDto> queryAll(Map whereJson) {
|
|||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
|||
// JSONArray arr = wo.query().getResultJSONArray(0);
|
|||
// if (ObjectUtil.isNotEmpty(arr)) {
|
|||
// return arr.toJavaList(RawfoilworkorderDto.class);
|
|||
// }
|
|||
// return null;
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// public RawfoilworkorderDto findById(Long workorder_id) {
|
|||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
|||
// JSONObject json = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
|||
// if (ObjectUtil.isNotEmpty(json)) {
|
|||
// return json.toJavaObject(RawfoilworkorderDto.class);
|
|||
// }
|
|||
// return null;
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// public RawfoilworkorderDto findByCode(String code) {
|
|||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
|||
// JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
|||
// if (ObjectUtil.isNotEmpty(json)) {
|
|||
// return json.toJavaObject(RawfoilworkorderDto.class);
|
|||
// }
|
|||
// return null;
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// @Transactional(rollbackFor = Exception.class)
|
|||
// public void create(RawfoilworkorderDto dto) {
|
|||
// WQLObject schBasePointService = WQLObject.getWQLObject("ST_IVT_SbPointIvt");
|
|||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
|||
// WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
|||
//
|
|||
// String container_name = dto.getContainer_name();
|
|||
// JSONObject json = wo.query("container_name = '" + container_name + "' and status <> '09'").uniqueResult(0);
|
|||
// if (ObjectUtil.isNotEmpty(json)) {
|
|||
// throw new BadRequestException("母卷号已存在");
|
|||
// }
|
|||
//
|
|||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
|||
// String nickName = SecurityUtils.getCurrentNickName();
|
|||
// String now = DateUtil.now();
|
|||
//
|
|||
// JSONObject jsonPoint = schBasePointService.query("ext_code ='" + dto.getResource_name() + "'").uniqueResult(0);
|
|||
// if (ObjectUtil.isEmpty(jsonPoint)) {
|
|||
// throw new BadRequestException("点位设备不存在");
|
|||
// }
|
|||
//
|
|||
// JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
|||
// if (ObjectUtil.isEmpty(josnMater)) {
|
|||
// throw new BadRequestException("物料不存在");
|
|||
// }
|
|||
//
|
|||
//
|
|||
// dto.setWorkorder_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);
|
|||
// dto.setIs_delete("0");
|
|||
// dto.setProduct_area(jsonPoint.getString("product_area"));
|
|||
// dto.setPoint_code(jsonPoint.getString("point_code"));
|
|||
// dto.setStatus("00");
|
|||
//
|
|||
// JSONObject json1 = JSONObject.parseObject(JSON.toJSONString(dto));
|
|||
// wo.insert(json1);
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// @Transactional(rollbackFor = Exception.class)
|
|||
// public void update(RawfoilworkorderDto dto) {
|
|||
// RawfoilworkorderDto entity = this.findById(dto.getWorkorder_id());
|
|||
// if (entity == null) {
|
|||
// throw new BadRequestException("被删除或无权限,操作失败!");
|
|||
// }
|
|||
//
|
|||
// WQLObject schBasePointService = WQLObject.getWQLObject("ST_IVT_SbPointIvt");
|
|||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
|||
// WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
|
|||
//
|
|||
// String container_name = dto.getContainer_name();
|
|||
//
|
|||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
|||
// String nickName = SecurityUtils.getCurrentNickName();
|
|||
// String now = DateUtil.now();
|
|||
//
|
|||
// JSONObject jsonPoint = schBasePointService.query("ext_code ='" + dto.getResource_name() + "'").uniqueResult(0);
|
|||
// if (ObjectUtil.isEmpty(jsonPoint)) {
|
|||
// throw new BadRequestException("点位设备不存在");
|
|||
// }
|
|||
//
|
|||
// JSONObject josnMater = materTab.query("material_code ='" + dto.getProduct_name() + "' and is_delete = '0' and is_used = '1'").uniqueResult(0);
|
|||
// if (ObjectUtil.isEmpty(josnMater)) {
|
|||
// throw new BadRequestException("物料不存在");
|
|||
// }
|
|||
//
|
|||
//
|
|||
// dto.setUpdate_time(now);
|
|||
// dto.setUpdate_optid(currentUserId);
|
|||
// dto.setUpdate_optname(nickName);
|
|||
// dto.setProduct_area(jsonPoint.getString("product_area"));
|
|||
// dto.setPoint_code(jsonPoint.getString("point_code"));
|
|||
//
|
|||
// JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
|||
// wo.update(json);
|
|||
//
|
|||
// JSONArray resultJSONArray = wo.query("container_name = '" + container_name + "' and status <> '09'").getResultJSONArray(0);
|
|||
// if (resultJSONArray.size() > 1) {
|
|||
// throw new BadRequestException("母卷号已存在");
|
|||
// }
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// @Transactional(rollbackFor = Exception.class)
|
|||
// public void deleteAll(Long[] ids) {
|
|||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
|||
// String nickName = SecurityUtils.getCurrentNickName();
|
|||
// String now = DateUtil.now();
|
|||
//
|
|||
// WQLObject wo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder");
|
|||
// for (Long workorder_id : ids) {
|
|||
// JSONObject param = new JSONObject();
|
|||
// param.put("workorder_id", String.valueOf(workorder_id));
|
|||
// param.put("is_delete", "1");
|
|||
// param.put("update_optid", currentUserId);
|
|||
// param.put("update_optname", nickName);
|
|||
// param.put("update_time", now);
|
|||
// wo.update(param);
|
|||
// }
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// @Transactional(rollbackFor = Exception.class)
|
|||
// public void compelEnd(JSONObject whereJson) {
|
|||
// String workorder_id = whereJson.getString("workorder_id");
|
|||
// String currentUserId = SecurityUtils.getCurrentUserId();
|
|||
// String currentUsername = SecurityUtils.getCurrentUsername();
|
|||
//
|
|||
// //查询该生箔工单是否存在未完成的任务
|
|||
// String container_name = whereJson.getString("container_name");
|
|||
//
|
|||
// JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("material_code = '" + container_name + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
|||
// if (ObjectUtil.isNotEmpty(task_jo)) {
|
|||
// throw new BadRequestException("该生箔工单存在未完成的任务,请先完成任务!");
|
|||
// }
|
|||
//
|
|||
// WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
|
|||
//
|
|||
// JSONObject json = tab.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
|||
// json.put("status", "09");
|
|||
// json.put("finish_type", "02");
|
|||
// json.put("realend_time", DateUtil.now());
|
|||
// json.put("update_optid", currentUserId);
|
|||
// json.put("update_optname", currentUsername);
|
|||
// json.put("update_time", DateUtil.now());
|
|||
// tab.update(json);
|
|||
// }
|
|||
//
|
|||
// @Override
|
|||
// @Transactional(rollbackFor = Exception.class)
|
|||
// public void confirm(JSONObject whereJson) {
|
|||
// WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
|
|||
// String productin_qty = whereJson.getString("productin_qty");
|
|||
//
|
|||
// JSONObject jsonRaw = tab.query("workorder_id = '" + whereJson.getString("workorder_id") + "'").uniqueResult(0);
|
|||
// if (ObjectUtil.isEmpty(productin_qty)) {
|
|||
// jsonRaw.put("productin_qty", 0);
|
|||
// } else {
|
|||
// jsonRaw.put("productin_qty", whereJson.getDoubleValue("productin_qty"));
|
|||
// }
|
|||
// tab.update(jsonRaw);
|
|||
// }
|
|||
//
|
|||
//}
|
@ -1,346 +0,0 @@ |
|||
package org.nl.wms.pdm.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 lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan; |
|||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.mapper.PdmBiSlittingproductionplanMapper; |
|||
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.WqlUtil; |
|||
import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl; |
|||
import org.nl.wms.ext.mes.service.LmsToMesService; |
|||
import org.nl.wms.pdm.service.SlittingproductionplanService; |
|||
import org.nl.wms.pdm.service.dto.SlittingproductionplanDto; |
|||
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.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @author liuxy |
|||
* @description 服务实现 |
|||
* @date 2022-10-09 |
|||
**/ |
|||
@Service |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
public class SlittingproductionplanServiceImpl implements SlittingproductionplanService { |
|||
|
|||
private final LmsToMesService lmsToMesService; |
|||
@Autowired |
|||
PdmBiSlittingproductionplanMapper pdmBiSlittingproductionplanMapper; |
|||
|
|||
@Override |
|||
public Map<String, Object> queryAll(Map whereJson, Pageable page) { |
|||
String order_type = MapUtil.getStr(whereJson, "order_type"); |
|||
String product_area = MapUtil.getStr(whereJson, "product_area"); |
|||
String status = MapUtil.getStr(whereJson, "status"); |
|||
String resource_name = MapUtil.getStr(whereJson, "resource_name"); |
|||
String parent_container_name = MapUtil.getStr(whereJson, "parent_container_name"); |
|||
String container_name = MapUtil.getStr(whereJson, "container_name"); |
|||
String qzzno = MapUtil.getStr(whereJson, "qzzno"); |
|||
String is_parent_ok = MapUtil.getStr(whereJson, "is_parent_ok"); |
|||
String is_child_tz_ok = MapUtil.getStr(whereJson, "is_child_tz_ok"); |
|||
String is_child_ps_ok = MapUtil.getStr(whereJson, "is_child_ps_ok"); |
|||
String is_call = MapUtil.getStr(whereJson, "is_call"); |
|||
String begin_time = MapUtil.getStr(whereJson, "begin_time"); |
|||
String end_time = MapUtil.getStr(whereJson, "end_time"); |
|||
|
|||
//获取人员对应的区域
|
|||
UserAreaServiceImpl userAreaService = new UserAreaServiceImpl(); |
|||
String in_area_id = userAreaService.getInArea(); |
|||
|
|||
JSONObject map = new JSONObject(); |
|||
map.put("flag", "1"); |
|||
map.put("order_type", order_type); |
|||
map.put("product_area", product_area); |
|||
map.put("status", status); |
|||
map.put("begin_time", begin_time); |
|||
map.put("end_time", end_time); |
|||
map.put("is_parent_ok", is_parent_ok); |
|||
map.put("is_child_tz_ok", is_child_tz_ok); |
|||
map.put("is_child_ps_ok", is_child_ps_ok); |
|||
map.put("is_call", is_call); |
|||
if (ObjectUtil.isNotEmpty(resource_name)) { |
|||
map.put("resource_name", "%" + resource_name + "%"); |
|||
} |
|||
if (ObjectUtil.isNotEmpty(parent_container_name)) { |
|||
map.put("parent_container_name", "%" + parent_container_name + "%"); |
|||
} |
|||
if (ObjectUtil.isNotEmpty(container_name)) { |
|||
map.put("container_name", "%" + container_name + "%"); |
|||
} |
|||
if (ObjectUtil.isNotEmpty(qzzno)) { |
|||
map.put("qzzno", "%" + qzzno + "%"); |
|||
} |
|||
if (ObjectUtil.isNotEmpty(in_area_id)) { |
|||
map.put("in_area_id", in_area_id); |
|||
} |
|||
|
|||
JSONObject json = WQL.getWO("PDM_BI_SLIDTTINGPLAN_01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "LEFT(plan.start_time,10) DESC, container_name desc, split_group"); |
|||
return json; |
|||
} |
|||
|
|||
@Override |
|||
public List<PdmBiSlittingproductionplan> queryAll(Map whereJson) { |
|||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan"); |
|||
JSONArray arr = wo.query().getResultJSONArray(0); |
|||
if (ObjectUtil.isNotEmpty(arr)) { |
|||
return arr.toJavaList(PdmBiSlittingproductionplan.class); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public PdmBiSlittingproductionplan findById(Long workorder_id) { |
|||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan"); |
|||
JSONObject json = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0); |
|||
if (ObjectUtil.isNotEmpty(json)) { |
|||
return json.toJavaObject(PdmBiSlittingproductionplan.class); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public PdmBiSlittingproductionplan findByCode(String code) { |
|||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan"); |
|||
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0); |
|||
if (ObjectUtil.isNotEmpty(json)) { |
|||
return json.toJavaObject(PdmBiSlittingproductionplan.class); |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void create(PdmBiSlittingproductionplan dto) { |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String nickName = SecurityUtils.getCurrentNickName(); |
|||
String now = DateUtil.now(); |
|||
|
|||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId()); |
|||
dto.setUpdate_optid(currentUserId); |
|||
dto.setUpdate_optname(nickName); |
|||
dto.setUpdate_time(now); |
|||
|
|||
dto.setIs_call("0"); |
|||
dto.setStatus("01"); |
|||
dto.setIs_delete("0"); |
|||
dto.setIs_paper_ok("0"); |
|||
dto.setIs_child_tz_ok("0"); |
|||
dto.setIs_child_ps_ok("0"); |
|||
dto.setIs_parent_ok("0"); |
|||
if ("1".equals(dto.getOrder_type())){ |
|||
dto.setMaterial_type("FG1"); |
|||
}else { |
|||
dto.setMaterial_type("FG2"); |
|||
} |
|||
pdmBiSlittingproductionplanMapper.insert(dto); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(PdmBiSlittingproductionplan dto) { |
|||
PdmBiSlittingproductionplan entity = this.findById(dto.getWorkorder_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); |
|||
|
|||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan"); |
|||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); |
|||
wo.update(json); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void deleteAll(Long[] ids) { |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String nickName = SecurityUtils.getCurrentNickName(); |
|||
String now = DateUtil.now(); |
|||
|
|||
WQLObject wo = WQLObject.getWQLObject("pdm_bi_slittingproductionplan"); |
|||
for (Long workorder_id : ids) { |
|||
JSONObject param = new JSONObject(); |
|||
param.put("workorder_id", String.valueOf(workorder_id)); |
|||
param.put("is_delete", "1"); |
|||
param.put("update_optid", currentUserId); |
|||
param.put("update_optname", nickName); |
|||
param.put("update_time", now); |
|||
wo.update(param); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void upMaterFinish(JSONObject whereJson) { |
|||
JSONArray data = whereJson.getJSONArray("data"); |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String currentUsername = SecurityUtils.getCurrentUsername(); |
|||
|
|||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan"); |
|||
|
|||
for (int i = 0; i < data.size(); i++) { |
|||
JSONObject mom_jo = new JSONObject(); |
|||
JSONObject json = data.getJSONObject(i); |
|||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0); |
|||
HashMap map = new HashMap<>(); |
|||
map.put("is_parent_ok", "1"); |
|||
map.put("update_optid", currentUserId); |
|||
map.put("update_optname", currentUsername); |
|||
map.put("update_time", DateUtil.now()); |
|||
if ("1".equals(jsonObject.getString("order_type"))) { |
|||
tab.update(map, "parent_container_name = '" + json.getString("parent_container_name") + "'"); |
|||
mom_jo.put("contain_name", json.getString("contain_name")); |
|||
mom_jo.put("warehouse", "1"); |
|||
} else { |
|||
tab.update(map, "restruct_container_name = '" + json.getString("restruct_container_name") + "'"); |
|||
mom_jo.put("container_name", json.getString("contain_name")); |
|||
mom_jo.put("package_box_sn", json.getString("package_box_sn")); |
|||
mom_jo.put("warehouse", "3"); |
|||
} |
|||
|
|||
//判断该接口是否需要回传
|
|||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssArrival'").uniqueResult(0); |
|||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { |
|||
lmsToMesService.cutPlanMomRollDeliveryComplete(mom_jo); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void caseFinish(JSONObject whereJson) { |
|||
JSONArray data = whereJson.getJSONArray("data"); |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String currentUsername = SecurityUtils.getCurrentUsername(); |
|||
|
|||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan"); |
|||
|
|||
for (int i = 0; i < data.size(); i++) { |
|||
JSONObject json = data.getJSONObject(i); |
|||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0); |
|||
jsonObject.put("is_child_tz_ok", "1"); |
|||
jsonObject.put("update_optid", currentUserId); |
|||
jsonObject.put("update_optname", currentUsername); |
|||
jsonObject.put("update_time", DateUtil.now()); |
|||
tab.update(jsonObject); |
|||
|
|||
//调用MES接口,通知MES已经套轴完成
|
|||
JSONObject jo = new JSONObject(); |
|||
jo.put("container_name", jsonObject.getString("container_name")); |
|||
//判断该接口是否需要回传
|
|||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0); |
|||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { |
|||
lmsToMesService.airSwellWithPaperTubeAssComplete(jo); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void sendFinish(JSONObject whereJson) { |
|||
JSONArray data = whereJson.getJSONArray("data"); |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String currentUsername = SecurityUtils.getCurrentUsername(); |
|||
|
|||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan"); |
|||
|
|||
for (int i = 0; i < data.size(); i++) { |
|||
JSONObject json = data.getJSONObject(i); |
|||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0); |
|||
if (StrUtil.isEmpty(jsonObject.getString("qzzno"))) { |
|||
throw new BadRequestException("还未绑定气涨轴!"); |
|||
} |
|||
HashMap map = new HashMap(); |
|||
jsonObject.put("is_child_ps_ok", "1"); |
|||
jsonObject.put("status", "03"); |
|||
jsonObject.put("update_optid", currentUserId); |
|||
jsonObject.put("update_optname", currentUsername); |
|||
jsonObject.put("update_time", DateUtil.now()); |
|||
tab.update(jsonObject); |
|||
|
|||
//调用MES接口,通知MES已经套轴完成
|
|||
JSONObject jo = new JSONObject(); |
|||
jo.put("container_name", jsonObject.getString("container_name")); |
|||
//判断该接口是否需要回传
|
|||
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0); |
|||
if (ObjectUtil.isNotEmpty(back_jo) && "1".equals(back_jo.getString("is_back"))) { |
|||
lmsToMesService.airSwellWithPaperTubeAssArrival(jo); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void inFinish(JSONObject whereJson) { |
|||
JSONArray data = whereJson.getJSONArray("data"); |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String currentUsername = SecurityUtils.getCurrentUsername(); |
|||
|
|||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan"); |
|||
|
|||
for (int i = 0; i < data.size(); i++) { |
|||
JSONObject json = data.getJSONObject(i); |
|||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0); |
|||
if (StrUtil.isEmpty(jsonObject.getString("qzzno"))) { |
|||
throw new BadRequestException("还未绑定气涨轴!"); |
|||
} |
|||
HashMap map = new HashMap(); |
|||
jsonObject.put("is_child_ps_ok", "1"); |
|||
jsonObject.put("status", "05"); |
|||
jsonObject.put("update_optid", currentUserId); |
|||
jsonObject.put("update_optname", currentUsername); |
|||
jsonObject.put("update_time", DateUtil.now()); |
|||
tab.update(jsonObject); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void compelFinish(JSONObject whereJson) { |
|||
JSONArray data = whereJson.getJSONArray("data"); |
|||
String currentUserId = SecurityUtils.getCurrentUserId(); |
|||
String currentUsername = SecurityUtils.getCurrentUsername(); |
|||
|
|||
WQLObject tab = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan"); |
|||
|
|||
for (int i = 0; i < data.size(); i++) { |
|||
JSONObject json = data.getJSONObject(i); |
|||
JSONObject jsonObject = tab.query("workorder_id = '" + json.getString("workorder_id") + "'").uniqueResult(0); |
|||
if (StrUtil.equals(jsonObject.getString("status"), "09")) { |
|||
throw new BadRequestException("此单号:" + jsonObject.getString("mfg_order_name") + "已完成"); |
|||
} |
|||
jsonObject.put("status", "09"); |
|||
jsonObject.put("end_time", DateUtil.now()); |
|||
jsonObject.put("update_optid", currentUserId); |
|||
jsonObject.put("update_optname", currentUsername); |
|||
jsonObject.put("update_time", DateUtil.now()); |
|||
tab.update(jsonObject); |
|||
} |
|||
} |
|||
|
|||
} |
Loading…
Reference in new issue