Merge branch 'master' of http://git.picaiba.com/mt-ck/mt-qj-wms-hd
This commit is contained in:
commit
be40d7ede1
@ -106,7 +106,8 @@ public class MyGenerator {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void generateCodeWithInjectConfigForAllTable() {
|
public void generateCodeWithInjectConfigForAllTable() {
|
||||||
generateByTablesWithInjectConfig(new String[]{"t_in_stock_info"});
|
generateByTablesWithInjectConfig(new String[]{"t_curr_task"});
|
||||||
|
generateByTablesWithInjectConfig(new String[]{"t_task_his"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
package com.mt.wms.core.dal.entity;
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.baomidou.mybatisplus.annotation.Version;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 任务表
|
* 任务表
|
||||||
@ -214,6 +210,24 @@ public class CurrTask extends Model<CurrTask> {
|
|||||||
@TableField("task_code")
|
@TableField("task_code")
|
||||||
private String taskCode;
|
private String taskCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单号 APMS生成生产单后返回
|
||||||
|
*/
|
||||||
|
@TableField("sheet_no")
|
||||||
|
private String sheetNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||||
|
*/
|
||||||
|
@TableField("task_type")
|
||||||
|
private Integer taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加工类型:0 初始加工,1 复加工
|
||||||
|
*/
|
||||||
|
@TableField("process_type")
|
||||||
|
private Integer processType;
|
||||||
|
|
||||||
|
|
||||||
public static final String ID = "id";
|
public static final String ID = "id";
|
||||||
|
|
||||||
@ -277,6 +291,12 @@ public class CurrTask extends Model<CurrTask> {
|
|||||||
|
|
||||||
public static final String TASK_CODE = "task_code";
|
public static final String TASK_CODE = "task_code";
|
||||||
|
|
||||||
|
public static final String SHEET_NO = "sheet_no";
|
||||||
|
|
||||||
|
public static final String TASK_TYPE = "task_type";
|
||||||
|
|
||||||
|
public static final String PROCESS_TYPE = "process_type";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Serializable pkVal() {
|
protected Serializable pkVal() {
|
||||||
return this.id;
|
return this.id;
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
package com.mt.wms.core.dal.entity;
|
package com.mt.wms.core.dal.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
import com.baomidou.mybatisplus.annotation.Version;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 任务历史表
|
* 任务历史表
|
||||||
@ -214,6 +210,24 @@ public class TaskHis extends Model<TaskHis> {
|
|||||||
@TableField("task_code")
|
@TableField("task_code")
|
||||||
private String taskCode;
|
private String taskCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加工类型:0 初始加工,1 复加工
|
||||||
|
*/
|
||||||
|
@TableField("process_type")
|
||||||
|
private Integer processType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库
|
||||||
|
*/
|
||||||
|
@TableField("task_type")
|
||||||
|
private Integer taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产单号 APMS生成生产单后返回
|
||||||
|
*/
|
||||||
|
@TableField("sheet_no")
|
||||||
|
private String sheetNo;
|
||||||
|
|
||||||
|
|
||||||
public static final String ID = "id";
|
public static final String ID = "id";
|
||||||
|
|
||||||
@ -277,6 +291,12 @@ public class TaskHis extends Model<TaskHis> {
|
|||||||
|
|
||||||
public static final String TASK_CODE = "task_code";
|
public static final String TASK_CODE = "task_code";
|
||||||
|
|
||||||
|
public static final String PROCESS_TYPE = "process_type";
|
||||||
|
|
||||||
|
public static final String TASK_TYPE = "task_type";
|
||||||
|
|
||||||
|
public static final String SHEET_NO = "sheet_no";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Serializable pkVal() {
|
protected Serializable pkVal() {
|
||||||
return this.id;
|
return this.id;
|
||||||
|
@ -25,21 +25,27 @@
|
|||||||
<result column="run_task_id" property="runTaskId" />
|
<result column="run_task_id" property="runTaskId" />
|
||||||
<result column="start_position" property="startPosition" />
|
<result column="start_position" property="startPosition" />
|
||||||
<result column="target_position" property="targetPosition" />
|
<result column="target_position" property="targetPosition" />
|
||||||
<result column="is_cache" property="isCache" />
|
<result column="is_cache" property="isCache"/>
|
||||||
<result column="cache_satatus" property="cacheSatatus" />
|
<result column="cache_satatus" property="cacheSatatus"/>
|
||||||
<result column="cache_run_task_id" property="cacheRunTaskId" />
|
<result column="cache_run_task_id" property="cacheRunTaskId"/>
|
||||||
<result column="location_id" property="locationId" />
|
<result column="location_id" property="locationId"/>
|
||||||
<result column="location_name" property="locationName" />
|
<result column="location_name" property="locationName"/>
|
||||||
<result column="is_out" property="isOut" />
|
<result column="is_out" property="isOut"/>
|
||||||
<result column="out_run_task_id" property="outRunTaskId" />
|
<result column="out_run_task_id" property="outRunTaskId"/>
|
||||||
<result column="out_start_position" property="outStartPosition" />
|
<result column="out_start_position" property="outStartPosition"/>
|
||||||
<result column="out_target_position" property="outTargetPosition" />
|
<result column="out_target_position" property="outTargetPosition"/>
|
||||||
<result column="task_code" property="taskCode" />
|
<result column="task_code" property="taskCode"/>
|
||||||
|
<result column="sheet_no" property="sheetNo"/>
|
||||||
|
<result column="task_type" property="taskType"/>
|
||||||
|
<result column="process_type" property="processType"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto, auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id, start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out, out_run_task_id, out_start_position, out_target_position, task_code
|
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto,
|
||||||
|
auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id,
|
||||||
|
start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out,
|
||||||
|
out_run_task_id, out_start_position, out_target_position, task_code, sheet_no, task_type, process_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -25,21 +25,27 @@
|
|||||||
<result column="run_task_id" property="runTaskId" />
|
<result column="run_task_id" property="runTaskId" />
|
||||||
<result column="start_position" property="startPosition" />
|
<result column="start_position" property="startPosition" />
|
||||||
<result column="target_position" property="targetPosition" />
|
<result column="target_position" property="targetPosition" />
|
||||||
<result column="is_cache" property="isCache" />
|
<result column="is_cache" property="isCache"/>
|
||||||
<result column="cache_satatus" property="cacheSatatus" />
|
<result column="cache_satatus" property="cacheSatatus"/>
|
||||||
<result column="cache_run_task_id" property="cacheRunTaskId" />
|
<result column="cache_run_task_id" property="cacheRunTaskId"/>
|
||||||
<result column="location_id" property="locationId" />
|
<result column="location_id" property="locationId"/>
|
||||||
<result column="location_name" property="locationName" />
|
<result column="location_name" property="locationName"/>
|
||||||
<result column="is_out" property="isOut" />
|
<result column="is_out" property="isOut"/>
|
||||||
<result column="out_run_task_id" property="outRunTaskId" />
|
<result column="out_run_task_id" property="outRunTaskId"/>
|
||||||
<result column="out_start_position" property="outStartPosition" />
|
<result column="out_start_position" property="outStartPosition"/>
|
||||||
<result column="out_target_position" property="outTargetPosition" />
|
<result column="out_target_position" property="outTargetPosition"/>
|
||||||
<result column="task_code" property="taskCode" />
|
<result column="task_code" property="taskCode"/>
|
||||||
|
<result column="process_type" property="processType"/>
|
||||||
|
<result column="task_type" property="taskType"/>
|
||||||
|
<result column="sheet_no" property="sheetNo"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto, auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id, start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out, out_run_task_id, out_start_position, out_target_position, task_code
|
id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, is_auto,
|
||||||
|
auto_exe_task_id, kiln_id, kiln_name, craft_code_id, plc_value, begin_time, end_time, is_in, run_task_id,
|
||||||
|
start_position, target_position, is_cache, cache_satatus, cache_run_task_id, location_id, location_name, is_out,
|
||||||
|
out_run_task_id, out_start_position, out_target_position, task_code, process_type, task_type, sheet_no
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -79,11 +79,11 @@ public class ApmsController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "apmsCompleteOrder")
|
@PostMapping(value = "apmsCompleteOrder")
|
||||||
@ApiOperation(value = "APMS完成订单,返回加工单检验结果")
|
@ApiOperation(value = "APMS返回加工单检验结果")
|
||||||
public R<String> apmsCompleteOrder(@Validated @RequestBody ApmsCompleteOrder apmsCompleteOrder) {
|
public R<String> apmsCompleteOrder(@Validated @RequestBody ApmsCompleteOrder apmsCompleteOrder) {
|
||||||
CommunicationLog communicationLog = new CommunicationLog();
|
CommunicationLog communicationLog = new CommunicationLog();
|
||||||
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
communicationLog.setCode("APMS" + System.currentTimeMillis());
|
||||||
communicationLog.setLogName("APMS完成订单,返回WMS加工单检验结果");
|
communicationLog.setLogName("APMS返回WMS加工单检验结果");
|
||||||
communicationLog.setType(3);
|
communicationLog.setType(3);
|
||||||
communicationLog.setContent(apmsCompleteOrder.toString());
|
communicationLog.setContent(apmsCompleteOrder.toString());
|
||||||
setCommonField(communicationLog);
|
setCommonField(communicationLog);
|
||||||
|
@ -35,7 +35,7 @@ public class OrderInfoController extends BaseController {
|
|||||||
private OrderInfoService orderInfoService;
|
private OrderInfoService orderInfoService;
|
||||||
|
|
||||||
@PostMapping(value = "page")
|
@PostMapping(value = "page")
|
||||||
@ApiOperation(value = "订单加工管理-获取分页订单信息")
|
@ApiOperation(value = "订单加工管理-当前订单列表")
|
||||||
private R<PageVo<OrderInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody OrderInfoBasePageParam orderBaseParam) {
|
private R<PageVo<OrderInfoVo>> page(@Validated({PageGroup.class, Default.class}) @RequestBody OrderInfoBasePageParam orderBaseParam) {
|
||||||
return orderInfoService.page(orderBaseParam);
|
return orderInfoService.page(orderBaseParam);
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ public class OrderInfoController extends BaseController {
|
|||||||
* 应该没有人工创建信息这个接口
|
* 应该没有人工创建信息这个接口
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "personCreateOrder")
|
@PostMapping(value = "personCreateOrder")
|
||||||
@ApiOperation(value = "人工创建订单信息")
|
@ApiOperation(value = "人工创建订单信息", hidden = true)
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private R<String> personCreateOrder(@Validated({Default.class}) @RequestBody OrderInfoPersonCreateParam orderInfoPersonCreateParam) {
|
private R<String> personCreateOrder(@Validated({Default.class}) @RequestBody OrderInfoPersonCreateParam orderInfoPersonCreateParam) {
|
||||||
return orderInfoService.personCreateOrder(orderInfoPersonCreateParam);
|
return orderInfoService.personCreateOrder(orderInfoPersonCreateParam);
|
||||||
@ -71,7 +71,6 @@ public class OrderInfoController extends BaseController {
|
|||||||
|
|
||||||
@PostMapping(value = "completeOrder")
|
@PostMapping(value = "completeOrder")
|
||||||
@ApiOperation(value = "人工完成订单(不需通知apms,仅在wms完成)")
|
@ApiOperation(value = "人工完成订单(不需通知apms,仅在wms完成)")
|
||||||
@Deprecated
|
|
||||||
private R<String> completeOrder(@Validated @RequestBody IdParam idParam) {
|
private R<String> completeOrder(@Validated @RequestBody IdParam idParam) {
|
||||||
return orderInfoService.completeOrder(idParam);
|
return orderInfoService.completeOrder(idParam);
|
||||||
}
|
}
|
||||||
|
@ -19,17 +19,22 @@ import lombok.experimental.Accessors;
|
|||||||
public class OrderParamForApms extends BaseParam {
|
public class OrderParamForApms extends BaseParam {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单号,APMS系统获取
|
* 订单号,APMS系统获取
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "订单号", required = true)
|
@ApiModelProperty(value = "订单号", required = true)
|
||||||
private String orderNo;
|
private String orderNo;
|
||||||
|
/**
|
||||||
|
* 原订单号,一般为空,如果存在信息,则为返工单 APMS系统获取
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "原订单号", required = false)
|
||||||
|
private String oldOrderNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标识卡号,APMS系统获取
|
* 标识卡号,APMS系统获取
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "标识卡号", required = true)
|
@ApiModelProperty(value = "标识卡号", required = true)
|
||||||
private String idenCardNum;
|
private String idenCardNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz;
|
|||||||
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.utils.BeanUtils;
|
import com.mt.wms.core.utils.BeanUtils;
|
||||||
|
import com.mt.wms.core.utils.IDGenerator;
|
||||||
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.CurrTaskDetQueryParam;
|
import com.mt.wms.empty.params.CurrTaskDetQueryParam;
|
||||||
@ -59,6 +60,7 @@ public class CurrTaskDetServiceImpl extends BaseService implements CurrTaskDetSe
|
|||||||
List<CurrTaskDet> params = BeanUtils.copyList(taskDet, CurrTaskDet.class);
|
List<CurrTaskDet> params = BeanUtils.copyList(taskDet, CurrTaskDet.class);
|
||||||
params.forEach(param -> {
|
params.forEach(param -> {
|
||||||
param.setCurrTaskId(taskId);
|
param.setCurrTaskId(taskId);
|
||||||
|
param.setInterCode(IDGenerator.gen("RWDET", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "TASK_DET_CODE"));
|
||||||
setCommonField(param);
|
setCommonField(param);
|
||||||
});
|
});
|
||||||
currTaskDetServiceBiz.saveBatch(params);
|
currTaskDetServiceBiz.saveBatch(params);
|
||||||
|
@ -10,6 +10,7 @@ import com.mt.wms.core.dal.service.CurrTaskServiceBiz;
|
|||||||
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
|
||||||
import com.mt.wms.core.params.BasePageParam;
|
import com.mt.wms.core.params.BasePageParam;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
|
import com.mt.wms.core.utils.IDGenerator;
|
||||||
import com.mt.wms.core.vo.IdVo;
|
import com.mt.wms.core.vo.IdVo;
|
||||||
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;
|
||||||
@ -25,7 +26,6 @@ import com.mt.wms.empty.vo.ApmsEndProcessVo;
|
|||||||
import com.mt.wms.empty.vo.CurrTaskMainQueryVo;
|
import com.mt.wms.empty.vo.CurrTaskMainQueryVo;
|
||||||
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
import com.mt.wms.empty.vo.CurrTaskQueryVo;
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -89,11 +89,11 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
CurrTask currTask = new CurrTask();
|
CurrTask currTask = new CurrTask();
|
||||||
BeanUtils.copyProperties(param, currTask);
|
BeanUtils.copyProperties(param, currTask);
|
||||||
currTask.setTaskType(TaskTypeEnum.WTK.getValue());
|
currTask.setTaskType(TaskTypeEnum.WTK.getValue());
|
||||||
currTask.setTaskSource(0);
|
|
||||||
//根据工艺号查询工艺id以及工艺plc值
|
//根据工艺号查询工艺id以及工艺plc值
|
||||||
CraftInfo one = craftInfoServiceBiz.getOne(new QueryWrapper<CraftInfo>().eq(CraftInfo.CREATOR_ID, param.getCraftCode()));
|
CraftInfo one = craftInfoServiceBiz.getOne(new QueryWrapper<CraftInfo>().eq(CraftInfo.CREATOR_ID, param.getCraftCode()));
|
||||||
currTask.setFCraftCodeId(one.getId());
|
currTask.setCraftCodeId(one.getId());
|
||||||
currTask.setFPlcValue(one.getPlcValue());
|
currTask.setPlcValue(one.getPlcValue());
|
||||||
|
currTask.setInterCode(IDGenerator.gen("RW", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "TASK_CODE"));
|
||||||
setCommonField(currTask);
|
setCommonField(currTask);
|
||||||
currTaskServiceBiz.save(currTask);
|
currTaskServiceBiz.save(currTask);
|
||||||
return successful(IdVo.builder().id(currTask.getId()).build());
|
return successful(IdVo.builder().id(currTask.getId()).build());
|
||||||
@ -102,7 +102,6 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
@Override
|
@Override
|
||||||
public R<PageVo<CurrTaskQueryVo>> currentTaskPage(CurrTaskQueryParam param) {
|
public R<PageVo<CurrTaskQueryVo>> currentTaskPage(CurrTaskQueryParam param) {
|
||||||
QueryWrapper<CurrTask> currTaskQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<CurrTask> currTaskQueryWrapper = new QueryWrapper<>();
|
||||||
currTaskQueryWrapper.eq(StringUtils.isNotBlank(param.getVehicleId()), CurrTask.VEHICLE_ID, param.getVehicleId());
|
|
||||||
currTaskQueryWrapper.eq(CurrTask.VALID, 1);
|
currTaskQueryWrapper.eq(CurrTask.VALID, 1);
|
||||||
Page<CurrTask> page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper);
|
Page<CurrTask> page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper);
|
||||||
return successful(new PageVo<>(page, CurrTaskQueryVo.class));
|
return successful(new PageVo<>(page, CurrTaskQueryVo.class));
|
||||||
@ -115,6 +114,8 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
|
|||||||
BeanUtils.copyProperties(byId, taskHis);
|
BeanUtils.copyProperties(byId, taskHis);
|
||||||
taskHis.setStatus(2);
|
taskHis.setStatus(2);
|
||||||
taskHis.setId(null);
|
taskHis.setId(null);
|
||||||
|
taskHis.setInterCode(IDGenerator.gen("RWHIS", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "TASKHIS_CODE"));
|
||||||
|
setCommonField(taskHis);
|
||||||
//将主任务放入到历史表,清空id,防止重复
|
//将主任务放入到历史表,清空id,防止重复
|
||||||
R<IdVo> save = taskHisService.save(taskHis);
|
R<IdVo> save = taskHisService.save(taskHis);
|
||||||
byId.setValid(0);
|
byId.setValid(0);
|
||||||
|
@ -19,6 +19,7 @@ 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.enums.WhetherEnum;
|
import com.mt.wms.core.enums.WhetherEnum;
|
||||||
import com.mt.wms.core.params.IdParam;
|
import com.mt.wms.core.params.IdParam;
|
||||||
|
import com.mt.wms.core.utils.IDGenerator;
|
||||||
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.controller.ApmsController;
|
||||||
@ -87,7 +88,7 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
setCommonField(orderInfo);
|
setCommonField(orderInfo);
|
||||||
//设定来源信息为apms
|
//设定来源信息为apms
|
||||||
orderInfo.setOrderSource(OrderSourceEnum.APMS.getValue());
|
orderInfo.setOrderSource(OrderSourceEnum.APMS.getValue());
|
||||||
orderInfo.setInterCode("APMS" + System.currentTimeMillis());
|
orderInfo.setInterCode(IDGenerator.gen("DD", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "ORDER_CODE"));
|
||||||
orderInfoService.save(orderInfo);
|
orderInfoService.save(orderInfo);
|
||||||
return successful("Wms接收Apms订单成功。");
|
return successful("Wms接收Apms订单成功。");
|
||||||
}
|
}
|
||||||
@ -236,19 +237,24 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
|
|||||||
@Override
|
@Override
|
||||||
public R<String> completeOrder(IdParam idParam) {
|
public R<String> completeOrder(IdParam idParam) {
|
||||||
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
||||||
orderInfoHisService.save(byId);
|
|
||||||
byId.setValid(0);
|
byId.setValid(0);
|
||||||
byId.setStatus(2);
|
byId.setStatus(2);
|
||||||
orderInfoService.updateById(byId);
|
orderInfoService.updateById(byId);
|
||||||
return successful("订单状态成功置为完成。");
|
byId.setId(null);
|
||||||
|
byId.setValid(1);
|
||||||
|
byId.setInterCode(IDGenerator.gen("DDHIS", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "ORDER_HIS_CODE"));
|
||||||
|
setCommonField(byId);
|
||||||
|
orderInfoHisService.save(byId);
|
||||||
|
return successful("成功,订单状态置为完成。");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<String> voidOrder(IdParam idParam) {
|
public R<String> voidOrder(IdParam idParam) {
|
||||||
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
OrderInfo byId = orderInfoService.getById(idParam.getId());
|
||||||
|
byId.setUpdateTime(LocalDateTime.now());
|
||||||
byId.setValid(0);
|
byId.setValid(0);
|
||||||
orderInfoService.updateById(byId);
|
orderInfoService.updateById(byId);
|
||||||
return successful("订单状态成功置为作废。");
|
return successful("成功,订单状态置为作废。");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -13,7 +13,6 @@ import com.mt.wms.empty.params.TaskHisQueryParam;
|
|||||||
import com.mt.wms.empty.service.TaskHisService;
|
import com.mt.wms.empty.service.TaskHisService;
|
||||||
import com.mt.wms.empty.vo.CurrTaskVo;
|
import com.mt.wms.empty.vo.CurrTaskVo;
|
||||||
import com.mt.wms.empty.vo.TaskHisQueryVo;
|
import com.mt.wms.empty.vo.TaskHisQueryVo;
|
||||||
import jodd.util.StringUtil;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -53,8 +52,7 @@ public class TaskHisServiceImpl extends BaseService implements TaskHisService {
|
|||||||
@Override
|
@Override
|
||||||
public R<PageVo<TaskHisQueryVo>> taskHisPage(TaskHisQueryParam param) {
|
public R<PageVo<TaskHisQueryVo>> taskHisPage(TaskHisQueryParam param) {
|
||||||
QueryWrapper<TaskHis> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<TaskHis> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq(StringUtil.isNotBlank(param.getVehicleId()), TaskHis.VEHICLE_ID, param.getVehicleId())
|
queryWrapper.between(Objects.nonNull(param.getStartTime()) && Objects.nonNull(param.getEndTime()), TaskHis.CREATE_TIME, param.getStartTime(), param.getEndTime())
|
||||||
.between(Objects.nonNull(param.getStartTime()) && Objects.nonNull(param.getEndTime()), TaskHis.CREATE_TIME, param.getStartTime(), param.getEndTime())
|
|
||||||
.eq(TaskHis.VALID, 1).orderByDesc(TaskHis.CREATE_TIME);
|
.eq(TaskHis.VALID, 1).orderByDesc(TaskHis.CREATE_TIME);
|
||||||
Page<TaskHis> page = taskHisService.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
Page<TaskHis> page = taskHisService.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
|
||||||
return successful(new PageVo<>(page, TaskHisQueryVo.class));
|
return successful(new PageVo<>(page, TaskHisQueryVo.class));
|
||||||
|
@ -28,6 +28,10 @@ public class OrderInfoVo extends BaseVo implements PageVo.ConvertVo {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单状态")
|
||||||
|
private Integer valid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来源:1.APMS 2.人工输入
|
* 来源:1.APMS 2.人工输入
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user