chenshuichuan 2 years ago
parent f9b02681a0
commit 29ba7196af

@ -174,16 +174,17 @@ public class ErpStockInController {
}
@PostMapping("/createMesStockIn")
@Operation(summary = "创建其它入库单")
@Operation(summary = "创建生产入库单")
public CommonResult<Long> createMesStockIn(@Valid @RequestBody ErpStockInSaveReqVO createReqVO) {
createReqVO.setInType(StockInTypeEnum..getValue());
return success(stockInService.createStockIn(createReqVO));
}
@GetMapping("/pageMesStockIn")
@Operation(summary = "获得其它入库单分页")
@Operation(summary = "获得生产入库单分页")
public CommonResult<PageResult<ErpStockInRespVO>> pageMesStockIn(@Valid ErpStockInPageReqVO pageReqVO) {
pageReqVO.setInType(StockInTypeEnum..getValue());
PageResult<ErpStockInDO> pageResult = stockInService.getStockInPage(pageReqVO);
return success(buildStockInVOPageResult(pageResult));
}
}

@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.module.erp.controller.admin.product.vo.product.ErpProductRespVO;
import cn.iocoder.yudao.module.iot.framework.mqtt.utils.DateUtils;
import cn.iocoder.yudao.module.mes.controller.admin.itemrequisition.vo.ItemRequisitionSaveReqVO;
import cn.iocoder.yudao.module.mes.controller.admin.plan.vo.*;
import cn.iocoder.yudao.module.mes.dal.dataobject.plan.PlanDO;
@ -165,5 +166,16 @@ public class PlanController {
List<PlanRespVO> planRespVOList = planService.buildVOList(proList);
return success(planRespVOList);
}
@GetMapping("/setTop")
@Operation(summary = "置顶生产计划")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<Boolean> setTop(@RequestParam("id") Long id) {
PlanDO plan = planService.getPlan(id);
plan.setPriorityNum(DateUtils.getMillsLong());
planMapper.updateById(plan);
return success(true);
}
}

@ -43,8 +43,8 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
.eqIfPresent(PlanDO::getRemark, reqVO.getRemark())
.betweenIfPresent(PlanDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(PlanDO::getPriorityNum)
.orderByAsc(PlanDO::getPlanStartTime)
.orderByAsc(PlanDO::getPlanEndTime));
.orderByDesc(PlanDO::getPlanStartTime)
.orderByDesc(PlanDO::getPlanEndTime));
}
default PlanDO selectByNo(String no) {

@ -149,6 +149,7 @@ public class StockInDetailServiceImpl implements StockInDetailService {
//查找开工、完工的计划
List<PlanDO> planList = planService.getPlanByStatusAndProduct(statusList,inItem.getProductId());
if(planList!=null&& planList.size()>0){
//该产品只有一个计划在开工
if(planList.size()==1){
StockInDetailDO detailDO = new StockInDetailDO()
.setStockInId(stockIn.getId()).setStockInNo(stockIn.getNo())

Loading…
Cancel
Save