工单管理
This commit is contained in:
@@ -125,7 +125,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String ext_order_id = orderJson.getString("ext_order_id");
|
||||
// JSONArray array = JSONArray.parseArray(string);
|
||||
String now = DateUtil.now();
|
||||
WQLObject wo = WQLObject.getWQLObject("MPS_BD_ProduceShiftOrder");
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WORKORDER");
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("workorder_id", ext_order_id);
|
||||
map.put("order_status", "04");
|
||||
|
||||
@@ -7,8 +7,8 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.logging.annotation.Log;
|
||||
import org.nl.wms.pdm.service.ProduceshiftorderService;
|
||||
import org.nl.wms.pdm.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.wms.pdm.service.WorkordeService;
|
||||
import org.nl.wms.pdm.service.dto.WorkorderDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -24,26 +24,26 @@ import java.util.Map;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "工单管理")
|
||||
@RequestMapping("/api/produceshiftorder")
|
||||
@RequestMapping("/api/workorder")
|
||||
@Slf4j
|
||||
public class ProduceshiftorderController {
|
||||
public class WorkorderController {
|
||||
|
||||
private final ProduceshiftorderService produceshiftorderService;
|
||||
private final WorkordeService workordeService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询工单")
|
||||
@ApiOperation("查询工单")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||
return new ResponseEntity<>(produceshiftorderService.queryAll(whereJson,page),HttpStatus.OK);
|
||||
return new ResponseEntity<>(workordeService.queryAll(whereJson,page),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增工单")
|
||||
@ApiOperation("新增工单")
|
||||
//@SaCheckPermission("produceshiftorder:add")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody ProduceshiftorderDto dto){
|
||||
produceshiftorderService.create(dto);
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody WorkorderDto dto){
|
||||
workordeService.create(dto);
|
||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@@ -51,8 +51,8 @@ public class ProduceshiftorderController {
|
||||
@Log("修改工单")
|
||||
@ApiOperation("修改工单")
|
||||
//@SaCheckPermission("produceshiftorder:edit")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody ProduceshiftorderDto dto){
|
||||
produceshiftorderService.update(dto);
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody WorkorderDto dto){
|
||||
workordeService.update(dto);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ProduceshiftorderController {
|
||||
//@SaCheckPermission("produceshiftorder:del")
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||
produceshiftorderService.deleteAll(ids);
|
||||
workordeService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("工单下发")
|
||||
//@SaCheckPermission("produceshiftorder:edit")
|
||||
public ResponseEntity<Object> submits(@RequestBody JSONObject param){
|
||||
produceshiftorderService.submits(param);
|
||||
workordeService.submits(param);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("根据登录用户设备下拉")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> getDevice(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(produceshiftorderService.getDevice(param),HttpStatus.OK);
|
||||
return new ResponseEntity<>(workordeService.getDevice(param),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getTable")
|
||||
@@ -87,7 +87,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("获取工单生产记录")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> getTable(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(produceshiftorderService.getTable(param),HttpStatus.OK);
|
||||
return new ResponseEntity<>(workordeService.getTable(param),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/openStart")
|
||||
@@ -95,7 +95,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("看板开工")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> openStart(@RequestBody JSONObject param){
|
||||
produceshiftorderService.openStart(param);
|
||||
workordeService.openStart(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("看板报工")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> saveReport(@RequestBody JSONObject param){
|
||||
produceshiftorderService.saveReport(param);
|
||||
workordeService.saveReport(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("看板强制完成")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> finish(@RequestBody JSONObject param){
|
||||
produceshiftorderService.finish(param);
|
||||
workordeService.finish(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("获取当前报工记录")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> getReportWork(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(produceshiftorderService.getReportWork(param),HttpStatus.OK);
|
||||
return new ResponseEntity<>(workordeService.getReportWork(param),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/forceFinish")
|
||||
@@ -130,7 +130,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("工单强制完成")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> forceFinish(@RequestBody JSONObject param){
|
||||
produceshiftorderService.forceFinish(param);
|
||||
workordeService.forceFinish(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class ProduceshiftorderController {
|
||||
@ApiOperation("获取当前工单下的工单生产记录")
|
||||
//@SaCheckPermission("produceshiftorder:list")
|
||||
public ResponseEntity<Object> getDtl(@RequestBody JSONObject param){
|
||||
return new ResponseEntity<>(produceshiftorderService.getDtl(param),HttpStatus.OK);
|
||||
return new ResponseEntity<>(workordeService.getDtl(param),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package org.nl.wms.pdm.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.pdm.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.wms.pdm.service.dto.WorkorderDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,7 +13,7 @@ import java.util.Map;
|
||||
* @author qinx
|
||||
* @date 2022-05-24
|
||||
**/
|
||||
public interface ProduceshiftorderService {
|
||||
public interface WorkordeService {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
@@ -26,36 +26,36 @@ public interface ProduceshiftorderService {
|
||||
/**
|
||||
* 查询所有数据不分页
|
||||
* @param whereJson 条件参数
|
||||
* @return List<ProduceshiftorderDto>
|
||||
* @return List<WorkorderDto>
|
||||
*/
|
||||
List<ProduceshiftorderDto> queryAll(Map whereJson);
|
||||
List<WorkorderDto> queryAll(Map whereJson);
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
* @param workorder_id ID
|
||||
* @return Produceshiftorder
|
||||
*/
|
||||
ProduceshiftorderDto findById(Long workorder_id);
|
||||
WorkorderDto findById(Long workorder_id);
|
||||
|
||||
/**
|
||||
* 根据编码查询
|
||||
* @param code code
|
||||
* @return Produceshiftorder
|
||||
*/
|
||||
ProduceshiftorderDto findByCode(String code);
|
||||
WorkorderDto findByCode(String code);
|
||||
|
||||
|
||||
/**
|
||||
* 创建
|
||||
* @param dto /
|
||||
*/
|
||||
void create(ProduceshiftorderDto dto);
|
||||
void create(WorkorderDto dto);
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param dto /
|
||||
*/
|
||||
void update(ProduceshiftorderDto dto);
|
||||
void update(WorkorderDto dto);
|
||||
|
||||
/**
|
||||
* 多选删除
|
||||
@@ -1,158 +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 qinx
|
||||
* @description /
|
||||
* @date 2022-05-24
|
||||
**/
|
||||
@Data
|
||||
public class ProduceshiftorderDto implements Serializable {
|
||||
|
||||
/** 生产班次工单标识 */
|
||||
/**
|
||||
* 防止精度丢失
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long workorder_id;
|
||||
|
||||
/**
|
||||
* 生产班次工单编号
|
||||
*/
|
||||
private String produceorder_code;
|
||||
|
||||
/**
|
||||
* 机台工单号
|
||||
*/
|
||||
private String producedeviceorder_code;
|
||||
|
||||
/**
|
||||
* 班次类型
|
||||
*/
|
||||
private String shift_type_scode;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private String produce_date;
|
||||
|
||||
/**
|
||||
* 计划数量
|
||||
*/
|
||||
private BigDecimal plan_qty;
|
||||
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
private BigDecimal real_qty;
|
||||
|
||||
/**
|
||||
* 报工数量
|
||||
*/
|
||||
private BigDecimal report_qty;
|
||||
|
||||
/**
|
||||
* 物料标识
|
||||
*/
|
||||
private Long material_id;
|
||||
|
||||
/**
|
||||
* 物料单重
|
||||
*/
|
||||
private BigDecimal material_weight;
|
||||
|
||||
/**
|
||||
* 托盘类型
|
||||
*/
|
||||
private String vehicle_type;
|
||||
|
||||
/**
|
||||
* 计划生产开始时间
|
||||
*/
|
||||
private String planproducestart_date;
|
||||
|
||||
/**
|
||||
* 计划生产结束时间
|
||||
*/
|
||||
private String planproduceend_date;
|
||||
|
||||
/**
|
||||
* 实际生产开始时间
|
||||
*/
|
||||
private String realproducestart_date;
|
||||
|
||||
/**
|
||||
* 实际生产结束时间
|
||||
*/
|
||||
private String realproduceend_date;
|
||||
|
||||
/**
|
||||
* 工单状态
|
||||
*/
|
||||
private String order_status;
|
||||
|
||||
/**
|
||||
* 是否搬运
|
||||
*/
|
||||
private String is_needmove;
|
||||
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
private String order_type_scode;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private Long update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Long sysdeptid;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
private Long syscompanyid;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
private String is_canupdate_update;
|
||||
|
||||
private Long device_id;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package org.nl.wms.pdm.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
/**
|
||||
* @description /
|
||||
* @author 1
|
||||
* @date 2022-10-18
|
||||
**/
|
||||
@Data
|
||||
public class WorkorderDto implements Serializable {
|
||||
|
||||
/** 工单标识 */
|
||||
/** 防止精度丢失 */
|
||||
@JsonSerialize(using= ToStringSerializer.class)
|
||||
private Long workorder_id;
|
||||
|
||||
/** 生产日期 */
|
||||
private String produce_date;
|
||||
|
||||
/** 计划数量 */
|
||||
private BigDecimal plan_qty;
|
||||
|
||||
/** 实际数量 */
|
||||
private BigDecimal real_qty;
|
||||
|
||||
/** 物料标识 */
|
||||
private Long material_id;
|
||||
|
||||
/** 载具类型 */
|
||||
private String vehicle_type;
|
||||
|
||||
/** 计划生产开始时间 */
|
||||
private String planproducestart_date;
|
||||
|
||||
/** 计划生产结束时间 */
|
||||
private String planproduceend_date;
|
||||
|
||||
/** 实际生产开始时间 */
|
||||
private String realproducestart_date;
|
||||
|
||||
/** 实际生产结束时间 */
|
||||
private String realproduceend_date;
|
||||
|
||||
/** 设备标识 */
|
||||
private Long device_id;
|
||||
|
||||
/** 所属工序 */
|
||||
private String workorder_procedure;
|
||||
|
||||
/** 工单状态 */
|
||||
private String order_status;
|
||||
|
||||
/** 是否搬运 */
|
||||
private String is_needmove;
|
||||
|
||||
/** 回传MES状态 */
|
||||
private String passback_status;
|
||||
|
||||
/** 外部标识 */
|
||||
private String ext_id;
|
||||
|
||||
/** 是否删除 */
|
||||
private String is_delete;
|
||||
|
||||
/** 创建人 */
|
||||
private Long create_id;
|
||||
|
||||
/** 创建人 */
|
||||
private String create_name;
|
||||
|
||||
/** 创建时间 */
|
||||
private String create_time;
|
||||
|
||||
/** 修改人 */
|
||||
private Long update_optid;
|
||||
|
||||
/** 修改人 */
|
||||
private String update_optname;
|
||||
|
||||
/** 工单编号 */
|
||||
private String workorder_code;
|
||||
|
||||
/** 修改时间 */
|
||||
private String update_time;
|
||||
}
|
||||
@@ -23,8 +23,8 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.service.ClassstandardService;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pdm.service.ProduceshiftorderService;
|
||||
import org.nl.wms.pdm.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.wms.pdm.service.WorkordeService;
|
||||
import org.nl.wms.pdm.service.dto.WorkorderDto;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -41,9 +41,8 @@ import java.util.Map;
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
public class WorkorderServiceImpl implements WorkordeService {
|
||||
|
||||
private final ClassstandardService classstandardService;
|
||||
private final WmsToAcsService wmsToAcsService;
|
||||
|
||||
@Override
|
||||
@@ -77,41 +76,43 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
if (StrUtil.isNotEmpty(material)) {
|
||||
map.put("material", "%" + material + "%");
|
||||
}
|
||||
// 工序名称
|
||||
map.put("workorder_procedure", whereJson.get("workorder_procedure"));
|
||||
JSONObject jsonObject = WQL.getWO("MPS_PRODUCEDURE001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ShiftOrder.update_time desc");
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProduceshiftorderDto> queryAll(Map whereJson) {
|
||||
public List<WorkorderDto> queryAll(Map whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(ProduceshiftorderDto.class);
|
||||
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(WorkorderDto.class);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProduceshiftorderDto findById(Long workorder_id) {
|
||||
public WorkorderDto findById(Long workorder_id) {
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||
JSONObject json = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(json)) {
|
||||
return json.toJavaObject(ProduceshiftorderDto.class);
|
||||
return json.toJavaObject(WorkorderDto.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProduceshiftorderDto findByCode(String code) {
|
||||
public WorkorderDto findByCode(String code) {
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(json)) {
|
||||
return json.toJavaObject(ProduceshiftorderDto.class);
|
||||
return json.toJavaObject(WorkorderDto.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void create(ProduceshiftorderDto dto) {
|
||||
public void create(WorkorderDto dto) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
@@ -119,15 +120,14 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
Long deptId = currentUser.getUser().getDeptId();
|
||||
String newCode = CodeUtil.getNewCode("PDM_SHIFTORDER");
|
||||
dto.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setProduceorder_code(newCode);
|
||||
dto.setProducedeviceorder_code(newCode);
|
||||
dto.setWorkorder_code(newCode);
|
||||
dto.setOrder_status("00");
|
||||
dto.setCreate_id(currentUserId);
|
||||
dto.setCreate_time(now);
|
||||
dto.setCreate_name(nickName);
|
||||
dto.setUpdate_optid(currentUserId);
|
||||
dto.setUpdate_optname(nickName);
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WorkOrder");
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
json.put("sysdeptid", deptId);
|
||||
@@ -137,8 +137,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(ProduceshiftorderDto dto) {
|
||||
ProduceshiftorderDto entity = this.findById(dto.getWorkorder_id());
|
||||
public void update(WorkorderDto dto) {
|
||||
WorkorderDto entity = this.findById(dto.getWorkorder_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
@@ -261,7 +261,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
String plan_qty = row.getString("plan_qty");
|
||||
String order_status = row.getString("order_status");
|
||||
//开工时修改生产班次工单表 生产设备、以及工单状态
|
||||
WQLObject wo = WQLObject.getWQLObject("MPS_BD_ProduceShiftOrder");
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WORKORDER");
|
||||
JSONObject jsonObject1 = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
||||
JSONObject produceorderMap = new JSONObject();
|
||||
produceorderMap.put("workorder_id", workorder_id);
|
||||
@@ -339,7 +339,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
final JSONObject row = param.getJSONObject("row");
|
||||
final String workorder_id = row.getString("workorder_id");
|
||||
//报工时工单的工单状态为暂停,报工数量为这条工单上次加这次报工数量的和,也就是这条工单每次记录的和
|
||||
WQLObject wo = WQLObject.getWQLObject("MPS_BD_ProduceShiftOrder");
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WORKORDER");
|
||||
JSONObject jsonObject = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
||||
JSONObject produceorderMap = new JSONObject();
|
||||
produceorderMap.put("workorder_id",workorder_id);
|
||||
@@ -383,7 +383,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
String now = DateUtil.now();
|
||||
JSONObject row = param.getJSONObject("row");
|
||||
String workorder_id = row.getString("workorder_id");
|
||||
WQLObject wo = WQLObject.getWQLObject("MPS_BD_ProduceShiftOrder");
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WORKORDER");
|
||||
JSONObject produceorderMap = new JSONObject();
|
||||
produceorderMap.put("workorder_id",workorder_id);
|
||||
produceorderMap.put("order_status","04");
|
||||
@@ -406,7 +406,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService {
|
||||
@Override
|
||||
public JSONObject getReportWork(JSONObject param) {
|
||||
String workorder_id = param.getString("workorder_id");
|
||||
WQLObject wo = WQLObject.getWQLObject("MPS_BD_ProduceShiftOrder");
|
||||
WQLObject wo = WQLObject.getWQLObject("PDM_BD_WORKORDER");
|
||||
JSONObject jsonProduceShiftOrder = wo.query("workorder_id = '" + workorder_id + "'").uniqueResult(0);
|
||||
WQLObject wo_record = WQLObject.getWQLObject("MPS_BD_MacOperateRecord");
|
||||
//获取最新的工单的对应记录信息
|
||||
@@ -19,6 +19,7 @@
|
||||
输入.workprocedure_id TYPEAS s_string
|
||||
输入.order_type_scode TYPEAS s_string
|
||||
输入.order_status TYPEAS s_string
|
||||
输入.workorder_procedure TYPEAS s_string
|
||||
输入.shift_type_scode TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
@@ -63,7 +64,7 @@
|
||||
classstandard.class_name,
|
||||
device.device_name
|
||||
FROM
|
||||
MPS_BD_ProduceShiftOrder ShiftOrder
|
||||
PDM_BD_WORKORDER ShiftOrder
|
||||
LEFT JOIN md_me_materialbase material ON material.material_id = ShiftOrder.material_id
|
||||
LEFT JOIN pdm_bi_device device ON ShiftOrder.device_id = device.device_id
|
||||
LEFT JOIN md_pb_classstandard classstandard ON classstandard.class_id = material.product_series
|
||||
@@ -80,6 +81,9 @@
|
||||
ENDOPTION
|
||||
OPTION 输入.shift_type_scode <> ""
|
||||
ShiftOrder.shift_type_scode = 输入.shift_type_scode
|
||||
ENDOPTION
|
||||
OPTION 输入.workorder_procedure <> ""
|
||||
ShiftOrder.workorder_procedure = 输入.workorder_procedure
|
||||
ENDOPTION
|
||||
OPTION 输入.begin_time <> ""
|
||||
ShiftOrder.produce_date >= 输入.begin_time
|
||||
@@ -126,7 +130,7 @@
|
||||
material.material_name,
|
||||
material.material_spec
|
||||
FROM
|
||||
MPS_BD_ProduceShiftOrder shiftOrder
|
||||
PDM_BD_WORKORDER shiftOrder
|
||||
left join PDM_BI_WorkProcedure workprocedure on workprocedure.workprocedure_id = shiftOrder.workprocedure_id
|
||||
left join md_me_materialbase material on material.material_id = shiftOrder.material_id
|
||||
WHERE
|
||||
|
||||
Reference in New Issue
Block a user