修正数据库字段错误。

This commit is contained in:
2021-12-14 16:05:40 +08:00
parent 169e442af0
commit 336bc29ddc
7 changed files with 95 additions and 47 deletions

View File

@@ -26,7 +26,6 @@ import com.mt.wms.empty.vo.ApmsEndProcessVo;
import com.mt.wms.empty.vo.CurrTaskMainQueryVo;
import com.mt.wms.empty.vo.CurrTaskQueryVo;
import com.mt.wms.empty.vo.CurrTaskVo;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -90,11 +89,10 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
CurrTask currTask = new CurrTask();
BeanUtils.copyProperties(param, currTask);
currTask.setTaskType(TaskTypeEnum.WTK.getValue());
currTask.setTaskSource(0);
//根据工艺号查询工艺id以及工艺plc值
CraftInfo one = craftInfoServiceBiz.getOne(new QueryWrapper<CraftInfo>().eq(CraftInfo.CREATOR_ID, param.getCraftCode()));
currTask.setFCraftCodeId(one.getId());
currTask.setFPlcValue(one.getPlcValue());
currTask.setCraftCodeId(one.getId());
currTask.setPlcValue(one.getPlcValue());
currTask.setInterCode(IDGenerator.gen("RW", IDGenerator.PATTERN_YYYYMMDDHHMM, 2, "TASK_CODE"));
setCommonField(currTask);
currTaskServiceBiz.save(currTask);
@@ -104,7 +102,6 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
@Override
public R<PageVo<CurrTaskQueryVo>> currentTaskPage(CurrTaskQueryParam param) {
QueryWrapper<CurrTask> currTaskQueryWrapper = new QueryWrapper<>();
currTaskQueryWrapper.eq(StringUtils.isNotBlank(param.getVehicleId()), CurrTask.VEHICLE_ID, param.getVehicleId());
currTaskQueryWrapper.eq(CurrTask.VALID, 1);
Page<CurrTask> page = currTaskServiceBiz.page(new Page<>(param.getCurrent(), param.getSize()), currTaskQueryWrapper);
return successful(new PageVo<>(page, CurrTaskQueryVo.class));

View File

@@ -13,7 +13,6 @@ import com.mt.wms.empty.params.TaskHisQueryParam;
import com.mt.wms.empty.service.TaskHisService;
import com.mt.wms.empty.vo.CurrTaskVo;
import com.mt.wms.empty.vo.TaskHisQueryVo;
import jodd.util.StringUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -53,8 +52,7 @@ public class TaskHisServiceImpl extends BaseService implements TaskHisService {
@Override
public R<PageVo<TaskHisQueryVo>> taskHisPage(TaskHisQueryParam param) {
QueryWrapper<TaskHis> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtil.isNotBlank(param.getVehicleId()), TaskHis.VEHICLE_ID, param.getVehicleId())
.between(Objects.nonNull(param.getStartTime()) && Objects.nonNull(param.getEndTime()), TaskHis.CREATE_TIME, param.getStartTime(), param.getEndTime())
queryWrapper.between(Objects.nonNull(param.getStartTime()) && Objects.nonNull(param.getEndTime()), TaskHis.CREATE_TIME, param.getStartTime(), param.getEndTime())
.eq(TaskHis.VALID, 1).orderByDesc(TaskHis.CREATE_TIME);
Page<TaskHis> page = taskHisService.page(new Page<>(param.getCurrent(), param.getSize()), queryWrapper);
return successful(new PageVo<>(page, TaskHisQueryVo.class));