添加apms检验结果表生成代码,优化订单相关和apms

This commit is contained in:
徐晨晨 2021-11-19 15:25:52 +08:00
parent aecf651292
commit 6be427ba79
12 changed files with 400 additions and 24 deletions

View File

@ -0,0 +1,129 @@
package com.mt.wms.core.dal.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
* apms推送检验结果表
* </p>
*
* @author mt
* @since 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_apms_check_result")
public class ApmsCheckResult extends Model<ApmsCheckResult> {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 删除标志是否有效:1 可用 0不可用2停止
*/
@TableField("valid")
@TableLogic
private Integer valid;
/**
* 添加时间入库时间
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 创建人id
*/
@TableField("creator_id")
private Integer creatorId;
/**
* 更新人id
*/
@TableField("updater_id")
private Integer updaterId;
/**
* 修改时间更具修改时间来判断下次执行顺序第一次修改时间和新增时间相同
*/
@TableField("update_time")
private LocalDateTime updateTime;
/**
* 版本号 默认为 1
*/
@TableField("version")
@Version
private String version;
/**
* 生产单号
*/
@TableField("sheet_no")
private String sheetNo;
/**
* 标识卡号
*/
@TableField("iden_card_num")
private String idenCardNum;
/**
* 硬度检验结果合格不合格返工作废
*/
@TableField("hardness")
private String hardness;
/**
* 金相检验结果合格不合格
*/
@TableField("metallography")
private String metallography;
/**
* 心部硬度检验值
*/
@TableField("heart_hardness")
private Float heartHardness;
public static final String ID = "id";
public static final String VALID = "valid";
public static final String CREATE_TIME = "create_time";
public static final String CREATOR_ID = "creator_id";
public static final String UPDATER_ID = "updater_id";
public static final String UPDATE_TIME = "update_time";
public static final String VERSION = "version";
public static final String SHEET_NO = "sheet_no";
public static final String IDEN_CARD_NUM = "iden_card_num";
public static final String HARDNESS = "hardness";
public static final String METALLOGRAPHY = "metallography";
public static final String HEART_HARDNESS = "heart_hardness";
@Override
protected Serializable pkVal() {
return this.id;
}
}

View File

@ -0,0 +1,16 @@
package com.mt.wms.core.dal.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mt.wms.core.dal.entity.ApmsCheckResult;
/**
* <p>
* apms推送检验结果表 Mapper 接口
* </p>
*
* @author mt
* @since 2021-11-19
*/
public interface ApmsCheckResultMapper extends BaseMapper<ApmsCheckResult> {
}

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mt.wms.core.dal.mapper.ApmsCheckResultMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.ApmsCheckResult">
<id column="id" property="id"/>
<result column="valid" property="valid"/>
<result column="create_time" property="createTime"/>
<result column="creator_id" property="creatorId"/>
<result column="updater_id" property="updaterId"/>
<result column="update_time" property="updateTime"/>
<result column="version" property="version"/>
<result column="sheet_no" property="sheetNo"/>
<result column="iden_card_num" property="idenCardNum"/>
<result column="hardness" property="hardness"/>
<result column="metallography" property="metallography"/>
<result column="heart_hardness" property="heartHardness"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, valid, create_time, creator_id, updater_id, update_time, version, sheet_no, iden_card_num, hardness,
metallography, heart_hardness
</sql>
</mapper>

View File

@ -0,0 +1,16 @@
package com.mt.wms.core.dal.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mt.wms.core.dal.entity.ApmsCheckResult;
/**
* <p>
* apms推送检验结果表 服务类
* </p>
*
* @author mt
* @since 2021-11-19
*/
public interface ApmsCheckResultServiceBiz extends IService<ApmsCheckResult> {
}

View File

@ -0,0 +1,20 @@
package com.mt.wms.core.dal.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mt.wms.core.dal.entity.ApmsCheckResult;
import com.mt.wms.core.dal.mapper.ApmsCheckResultMapper;
import com.mt.wms.core.dal.service.ApmsCheckResultServiceBiz;
import org.springframework.stereotype.Service;
/**
* <p>
* apms推送检验结果表 服务实现类
* </p>
*
* @author mt
* @since 2021-11-19
*/
@Service
public class ApmsCheckResultServiceBizImpl extends ServiceImpl<ApmsCheckResultMapper, ApmsCheckResult> implements ApmsCheckResultServiceBiz {
}

View File

@ -6,6 +6,8 @@ import cn.hutool.json.JSON;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.mt.wms.core.base.BaseController; import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant; import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.dal.entity.CommunicationLog;
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
import com.mt.wms.core.vo.R; import com.mt.wms.core.vo.R;
import com.mt.wms.empty.params.*; import com.mt.wms.empty.params.*;
import com.mt.wms.empty.service.OrderInfoService; import com.mt.wms.empty.service.OrderInfoService;
@ -21,6 +23,11 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap; import java.util.HashMap;
/**
* @author xcc
* @date 2021年11月18日
* @since 1.0
*/
@RestController @RestController
@RequestMapping(CommonConstant.API_MODULE_BASE + "apms") @RequestMapping(CommonConstant.API_MODULE_BASE + "apms")
@Slf4j @Slf4j
@ -29,65 +36,118 @@ public class ApmsController extends BaseController {
@Autowired @Autowired
private OrderInfoService orderInfoService; private OrderInfoService orderInfoService;
@Autowired
private CommunicationLogServiceBiz communicationLogServiceBiz;
static String Token = ""; static String Token = "";
static String ApiAddress = "http://59.110.171.25:9010"; static String ApiAddress = "http://59.110.171.25:9010";
@PostMapping(value = "apmsPostOrder") @PostMapping(value = "apmsPostOrder")
@ApiOperation(value = "接收APMS推送订单信息") @ApiOperation(value = "接收APMS推送订单信息")
public R apmsPostOrder(@Validated @RequestBody OrderParamForApms apmsPostOrderParam) { public R apmsPostOrder(@Validated @RequestBody OrderParamForApms apmsPostOrderParam) {
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("Wms接收Apms订单");
communicationLog.setContent(apmsPostOrderParam.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return orderInfoService.apmsPostOrder(apmsPostOrderParam); return orderInfoService.apmsPostOrder(apmsPostOrderParam);
} }
@PostMapping(value = "apmsVoidOrder")
@ApiOperation(value = "APMS作废订单")
public R apmsVoidOrder(@Validated @RequestBody String idenCardNum) {
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("APMS作废订单");
communicationLog.setContent(idenCardNum);
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return orderInfoService.apmsVoidOrder(idenCardNum);
}
@PostMapping(value = "apmsCompleteOrder")
@ApiOperation(value = "APMS完成订单")
public R apmsCompleteOrder(@Validated @RequestBody ApmsCompleteOrder apmsCompleteOrder) {
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("APMS完成订单");
communicationLog.setContent(apmsCompleteOrder.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return orderInfoService.apmsCompleteOrder(apmsCompleteOrder);
}
@PostMapping(value = "createProcessSheet") @PostMapping(value = "createProcessSheet")
@ApiOperation(value = "通知APMS开始加工处理信息") @ApiOperation(value = "APMS创建生产单接口")
public R createProcessSheet(@Validated @RequestBody ApmsCreateProcessSheet apmsCreateProcess) { public R createProcessSheet(@Validated @RequestBody ApmsCreateProcessSheet apmsCreateProcess) {
//todo
checkToken(); checkToken();
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("entity", apmsCreateProcess); paramMap.put("entity", apmsCreateProcess);
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/createProcessSheet") HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/createProcessSheet")
.header("token", Token).form(paramMap).execute(); .header("token", Token).form(paramMap).execute();
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("APMS创建生产单");
communicationLog.setContent(paramMap.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return successful(response); return successful(response);
} }
@PostMapping(value = "startProcess") @PostMapping(value = "startProcess")
@ApiOperation(value = "通知APMS订单开始处理") @ApiOperation(value = "通知APMS生产单开始处理")
public R startProcess(@Validated @RequestBody ApmsStartProcess apmsStartProcess) { public R startProcess(@Validated @RequestBody ApmsStartProcess apmsStartProcess) {
//todo
checkToken(); checkToken();
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("entity", apmsStartProcess); paramMap.put("entity", apmsStartProcess);
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/startProcess") HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/startProcess")
.header("token", Token).form(paramMap).execute(); .header("token", Token).form(paramMap).execute();
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("通知APMS生产单开始处理");
communicationLog.setContent(paramMap.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return successful(response); return successful(response);
} }
@PostMapping(value = "endProcess") @PostMapping(value = "endProcess")
@ApiOperation(value = "通知APMS订单结束处理") @ApiOperation(value = "通知APMS订单结束处理")
public R endProcess(@Validated @RequestBody ApmsEndProcess apmsEndProcess) { public R endProcess(@Validated @RequestBody ApmsEndProcess apmsEndProcess) {
//todo
checkToken(); checkToken();
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("entity", apmsEndProcess); paramMap.put("entity", apmsEndProcess);
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/endProcess") HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/endProcess")
.header("token", Token).form(paramMap).execute(); .header("token", Token).form(paramMap).execute();
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("通知APMS订单结束处理");
communicationLog.setContent(paramMap.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return successful(response); return successful(response);
} }
@PostMapping(value = "finishProcessSheet") @PostMapping(value = "finishProcessSheet")
@ApiOperation(value = "通知APMS结束加工处理信息") @ApiOperation(value = "通知APMS完成生产单接口")
public R finishProcessSheet(@Validated @RequestBody ApmsFinishProcessSheet apmsFinishProcessSheet) { public R finishProcessSheet(@Validated @RequestBody ApmsFinishProcessSheet apmsFinishProcessSheet) {
//todo
checkToken(); checkToken();
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("entity", apmsFinishProcessSheet); paramMap.put("entity", apmsFinishProcessSheet);
HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/finishProcessSheet") HttpResponse response = HttpUtil.createPost(ApiAddress + "/platform/api/finishProcessSheet")
.header("token", Token).form(paramMap).execute(); .header("token", Token).form(paramMap).execute();
CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("通知APMS完成生产单接口");
communicationLog.setContent(paramMap.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return successful(response); return successful(response);
} }
@PostMapping(value = "getApmsToken") @PostMapping(value = "getApmsToken")
@ApiOperation(value = "获取APMS获得Token") @ApiOperation(value = "获取APMS Token")
public R getApmsToken() { public R getApmsToken() {
HashMap<String, Object> paramMap = new HashMap<>(); HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("apiKey", "7ee8f59bbaeae27e"); paramMap.put("apiKey", "7ee8f59bbaeae27e");
@ -96,7 +156,12 @@ public class ApmsController extends BaseController {
JSON parse = JSONUtil.parse(result); JSON parse = JSONUtil.parse(result);
Object token = parse.getByPath("token"); Object token = parse.getByPath("token");
Token = token.toString(); Token = token.toString();
//todo 记录通讯日志 CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("获取APMS Token");
communicationLog.setContent(paramMap.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return successful(result); return successful(result);
} }
@ -108,7 +173,12 @@ public class ApmsController extends BaseController {
paramMap.put("workShopCode", workShopCode); paramMap.put("workShopCode", workShopCode);
HttpResponse response = HttpUtil.createGet(ApiAddress + "/platform/api/getStoveCodeByWorkShopCode") HttpResponse response = HttpUtil.createGet(ApiAddress + "/platform/api/getStoveCodeByWorkShopCode")
.header("token", Token).form(paramMap).execute(); .header("token", Token).form(paramMap).execute();
//todo 记录通讯日志 CommunicationLog communicationLog = new CommunicationLog();
communicationLog.setCode("APMS" + System.currentTimeMillis());
communicationLog.setLogName("APMS通过车间编码获取炉号信息");
communicationLog.setContent(paramMap.toString());
setCommonField(communicationLog);
communicationLogServiceBiz.save(communicationLog);
return successful(response); return successful(response);
} }

View File

@ -0,0 +1,37 @@
package com.mt.wms.empty.params;
import com.mt.wms.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Apms返回订单检验结果", description = "Apms返回订单检验结果")
public class ApmsCompleteOrder extends BaseParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "生产单编号", required = false)
private String sheetNo;
/**
* 标识卡号APMS系统获取
*/
@ApiModelProperty(value = "标识卡号", required = true)
private String idenCardNum;
@ApiModelProperty(value = "硬度检验结果", required = true)
private String hardness;
@ApiModelProperty(value = "金相检验结果", required = true)
private String metallographic;
@ApiModelProperty(value = "心部硬度检验值", required = true)
private Float heartHardness;
}

View File

@ -67,4 +67,13 @@ public class OrderParamForApms extends BaseParam {
*/ */
@ApiModelProperty(value = "工艺要求") @ApiModelProperty(value = "工艺要求")
private String craftIll; private String craftIll;
@ApiModelProperty(value = "加工数量")
private Float quantity;
@ApiModelProperty(value = "加工重量")
private Float weight;
@ApiModelProperty(value = "单位")
private String unit;
} }

View File

@ -50,4 +50,12 @@ public interface CurrTaskDetService {
* @return 结果 * @return 结果
*/ */
List<CurrTaskDet> getTaskDetailsByMainId(IdParam idParam); List<CurrTaskDet> getTaskDetailsByMainId(IdParam idParam);
/**
* 查询某个标识卡号的详细任务列表
*
* @param idenCardNum 标识卡号
* @return 结果
*/
List<CurrTaskDet> getTaskDetailsByIdenCardNum(String idenCardNum);
} }

View File

@ -3,10 +3,7 @@ package com.mt.wms.empty.service;
import com.mt.wms.core.params.IdParam; import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.PageVo; import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R; import com.mt.wms.core.vo.R;
import com.mt.wms.empty.params.OrderInfoBasePageParam; import com.mt.wms.empty.params.*;
import com.mt.wms.empty.params.OrderInfoPersonCreateParam;
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
import com.mt.wms.empty.params.OrderParamForApms;
import com.mt.wms.empty.vo.OrderInfoTaskDetVo; import com.mt.wms.empty.vo.OrderInfoTaskDetVo;
import com.mt.wms.empty.vo.OrderInfoVo; import com.mt.wms.empty.vo.OrderInfoVo;
@ -77,4 +74,21 @@ public interface OrderInfoService {
* @return 结果 * @return 结果
*/ */
R voidOrder(IdParam idParam); R voidOrder(IdParam idParam);
/**
* APMS作废订单
*
* @param idenCardNum 标识卡号
* @return 结果
*/
R apmsVoidOrder(String idenCardNum);
/**
* APMS返回订单结果
*
* @param apmsCompleteOrder 订单检验结果
* @return 结果
*/
R apmsCompleteOrder(ApmsCompleteOrder apmsCompleteOrder);
} }

View File

@ -71,4 +71,12 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
.eq(CurrTaskDet.VALID, 1); .eq(CurrTaskDet.VALID, 1);
return currTaskDetServiceBiz.list(queryWrapper); return currTaskDetServiceBiz.list(queryWrapper);
} }
@Override
public List<CurrTaskDet> getTaskDetailsByIdenCardNum(String idenCardNum) {
QueryWrapper<CurrTaskDet> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(CurrTaskDet.IDEN_CARD_NUM, idenCardNum)
.eq(CurrTaskDet.VALID, 1);
return currTaskDetServiceBiz.list(queryWrapper);
}
} }

View File

@ -11,16 +11,16 @@ import com.mt.wms.basic.vo.KilnInfoVo;
import com.mt.wms.basic.vo.VehicleVo; import com.mt.wms.basic.vo.VehicleVo;
import com.mt.wms.core.api.Assert; import com.mt.wms.core.api.Assert;
import com.mt.wms.core.base.BaseService; import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.CurrTaskDet;
import com.mt.wms.core.dal.entity.OrderInfo; import com.mt.wms.core.dal.entity.OrderInfo;
import com.mt.wms.core.dal.service.CommunicationLogServiceBiz;
import com.mt.wms.core.dal.service.OrderInfoServiceBiz; import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
import com.mt.wms.core.params.IdParam; import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.PageVo; import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R; import com.mt.wms.core.vo.R;
import com.mt.wms.empty.controller.ApmsController;
import com.mt.wms.empty.enums.OrderSourceEnum; import com.mt.wms.empty.enums.OrderSourceEnum;
import com.mt.wms.empty.params.OrderInfoBasePageParam; import com.mt.wms.empty.params.*;
import com.mt.wms.empty.params.OrderInfoPersonCreateParam;
import com.mt.wms.empty.params.OrderInfoTaskDetParam;
import com.mt.wms.empty.params.OrderParamForApms;
import com.mt.wms.empty.service.CurrTaskDetService; import com.mt.wms.empty.service.CurrTaskDetService;
import com.mt.wms.empty.service.CurrTaskService; import com.mt.wms.empty.service.CurrTaskService;
import com.mt.wms.empty.service.OrderInfoHisService; import com.mt.wms.empty.service.OrderInfoHisService;
@ -67,17 +67,20 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
@Autowired @Autowired
LocationInfoService locationInfoService; LocationInfoService locationInfoService;
@Autowired
CommunicationLogServiceBiz communicationLogServiceBiz;
@Autowired
ApmsController apmsControl;
@Override @Override
public R apmsPostOrder(OrderParamForApms apmsPostOrderParam) { public R apmsPostOrder(OrderParamForApms apmsPostOrderParam) {
OrderInfo orderInfo = new OrderInfo(); OrderInfo orderInfo = new OrderInfo();
BeanUtils.copyProperties(apmsPostOrderParam,orderInfo); BeanUtils.copyProperties(apmsPostOrderParam, orderInfo);
setCommonField(orderInfo); setCommonField(orderInfo);
//设定来源信息为apms //设定来源信息为apms
orderInfo.setOrderSource(OrderSourceEnum.APMS.getValue()); orderInfo.setOrderSource(OrderSourceEnum.APMS.getValue());
orderInfo.setInterCode("APMS"+System.currentTimeMillis()); orderInfo.setInterCode("APMS" + System.currentTimeMillis());
orderInfoService.save(orderInfo); orderInfoService.save(orderInfo);
//todo 记录通讯日志信息
return successful("Wms接收Apms订单成功。"); return successful("Wms接收Apms订单成功。");
} }
@ -101,7 +104,6 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
orderInfo.setOrderSource(OrderSourceEnum.PERSON.getValue()); orderInfo.setOrderSource(OrderSourceEnum.PERSON.getValue());
orderInfo.setInterCode("PERSONAL"+System.currentTimeMillis()); orderInfo.setInterCode("PERSONAL"+System.currentTimeMillis());
orderInfoService.save(orderInfo); orderInfoService.save(orderInfo);
//todo 通知apms创建了一个订单
return successful("人工创建订单成功。"); return successful("人工创建订单成功。");
} }
@ -181,4 +183,24 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
orderInfoService.updateById(byId); orderInfoService.updateById(byId);
return successful("操作成功。"); return successful("操作成功。");
} }
@Override
public R apmsVoidOrder(String idenCardNum) {
OrderInfo byId = orderInfoService.getOne(new QueryWrapper<OrderInfo>().eq(OrderInfo.IDEN_CARD_NUM, idenCardNum));
//确定是否有订单在生产
List<CurrTaskDet> taskDetailsByIdenCardNum = currTaskDetService.getTaskDetailsByIdenCardNum(idenCardNum);
if (taskDetailsByIdenCardNum.size() > 0)
{
return failed("操作失败,已经存在生产中的任务单。");
}
else
{
return voidOrder(IdParam.builder().id(byId.getId()).build());
}
}
@Override
public R apmsCompleteOrder(ApmsCompleteOrder apmsCompleteOrder) {
return null;
}
} }