Merge remote-tracking branch '惠信/develop' into develop
This commit is contained in:
commit
110b189be3
|
|
@ -5,15 +5,19 @@ import com.nflg.wms.common.pojo.PageData;
|
||||||
import com.nflg.wms.common.pojo.dto.OptRecordDTO;
|
import com.nflg.wms.common.pojo.dto.OptRecordDTO;
|
||||||
import com.nflg.wms.common.pojo.qo.OptRecordQO;
|
import com.nflg.wms.common.pojo.qo.OptRecordQO;
|
||||||
import com.nflg.wms.common.pojo.vo.OptRecordVO;
|
import com.nflg.wms.common.pojo.vo.OptRecordVO;
|
||||||
|
import com.nflg.wms.common.util.UserUtil;
|
||||||
|
import com.nflg.wms.repository.entity.OptRecord;
|
||||||
import com.nflg.wms.repository.service.IOptRecordService;
|
import com.nflg.wms.repository.service.IOptRecordService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,6 +45,11 @@ public class OptRecordController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("add")
|
@PostMapping("add")
|
||||||
public void add(@Valid @RequestBody OptRecordDTO optRecordDTO){
|
public void add(@Valid @RequestBody OptRecordDTO optRecordDTO){
|
||||||
optRecordService.add(optRecordDTO);
|
OptRecord optRecord = new OptRecord();
|
||||||
|
BeanUtils.copyProperties(optRecordDTO, optRecord);
|
||||||
|
optRecord.setOperationTime(LocalDateTime.now());
|
||||||
|
optRecord.setOperatorId(UserUtil.getUserId());
|
||||||
|
optRecord.setOperator(UserUtil.getUserName());
|
||||||
|
optRecordService.add(optRecord);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -96,7 +97,7 @@ public class OutProduceController extends BaseController {
|
||||||
private IWmsQrCodeMasterService qrCodeMasterService;
|
private IWmsQrCodeMasterService qrCodeMasterService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IOptRecordService optRecordService;
|
private OptRecordController optRecordController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询SAP领料订单数据
|
* 查询SAP领料订单数据
|
||||||
|
|
@ -573,13 +574,11 @@ public class OutProduceController extends BaseController {
|
||||||
}).toList()
|
}).toList()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
|
||||||
// optRecordDTO.setOrderId();
|
|
||||||
// optRecordDTO.setOperator();
|
|
||||||
// optRecordDTO.setOperationTime();
|
|
||||||
// optRecordDTO.setOperationType();
|
|
||||||
optRecordService.add(optRecordDTO);
|
|
||||||
|
|
||||||
|
OptRecordDTO optRecordDTO = new OptRecordDTO();
|
||||||
|
optRecordDTO.setOperationType((short)1);
|
||||||
|
optRecordDTO.setOrderId(order.getAufnr());
|
||||||
|
optRecordController.add(optRecordDTO);
|
||||||
|
|
||||||
outProduceTicketService.lambdaUpdate()
|
outProduceTicketService.lambdaUpdate()
|
||||||
.set(WmsOutProduceTicket::getMatDoc, vo.getMat_doc())
|
.set(WmsOutProduceTicket::getMatDoc, vo.getMat_doc())
|
||||||
|
|
|
||||||
|
|
@ -16,27 +16,11 @@ public class OptRecordDTO {
|
||||||
@NotBlank(message = "单号不能为空")
|
@NotBlank(message = "单号不能为空")
|
||||||
private String orderId;
|
private String orderId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作时间(必传)
|
|
||||||
*/
|
|
||||||
@NotNull(message = "操作时间不能为空")
|
|
||||||
private LocalDateTime operationTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作类型(必传)
|
* 操作类型(必传)
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "操作类型不能为空")
|
@NotNull(message = "操作类型不能为空")
|
||||||
private Short operationType;
|
private Short operationType;
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作人员id(必传)
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "操作人员id不能为空")
|
|
||||||
private String operatorId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 操作人员(必传)
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "操作人员不能为空")
|
|
||||||
private String operator;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public class OptRecord implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 操作人员id
|
* 操作人员id
|
||||||
*/
|
*/
|
||||||
private String operatorId;
|
private Long operatorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作人员
|
* 操作人员
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,5 @@ import java.util.List;
|
||||||
public interface IOptRecordService extends IService<OptRecord> {
|
public interface IOptRecordService extends IService<OptRecord> {
|
||||||
List<OptRecordVO> search(OptRecordQO request);
|
List<OptRecordVO> search(OptRecordQO request);
|
||||||
|
|
||||||
void add(OptRecordDTO optRecordDTO);
|
void add(OptRecord optRecord);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,7 @@ public class OptRecordServiceImpl extends ServiceImpl<OptRecordMapper, OptRecord
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void add(OptRecordDTO optRecordDTO) {
|
public void add(OptRecord optRecord) {
|
||||||
OptRecord optRecord = new OptRecord();
|
|
||||||
BeanUtils.copyProperties(optRecordDTO, optRecord);
|
|
||||||
// baseMapper.insert(optRecord);
|
|
||||||
boolean saveSuccess = this.save(optRecord);
|
boolean saveSuccess = this.save(optRecord);
|
||||||
if (!saveSuccess) {
|
if (!saveSuccess) {
|
||||||
throw new RuntimeException("新增操作记录失败,请稍后重试");
|
throw new RuntimeException("新增操作记录失败,请稍后重试");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue