Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
009fbbf04d
@ -157,6 +157,12 @@
|
||||
<version>2.2.9</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>annotationProcessor</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -8,11 +8,13 @@ import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.generator.util.MultiModuleCodeGenerator;
|
||||
import com.ktg.mes.md.domain.AP0AE;
|
||||
import com.ktg.mes.md.domain.WmsOutPlan;
|
||||
import com.ktg.mes.md.domain.WmsOutPlanDetailEntity;
|
||||
import com.ktg.mes.md.service.IAP0AEService;
|
||||
import com.ktg.mes.md.service.IWmsOutPlanService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -29,9 +31,9 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/md/PLAN")
|
||||
@RequiredArgsConstructor
|
||||
public class WmsOutPlanController extends BaseController {
|
||||
@Autowired
|
||||
private IWmsOutPlanService wmsOutPlanService;
|
||||
private final IWmsOutPlanService wmsOutPlanService;
|
||||
|
||||
/**
|
||||
* 查询出库计划管理列表
|
||||
@ -83,8 +85,12 @@ public class WmsOutPlanController extends BaseController {
|
||||
@Log(title = "出库计划管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WmsOutPlan wmsOutPlan) {
|
||||
if (UserConstants.NOT_UNIQUE.equals(wmsOutPlanService.checkPlanCodeUnique(wmsOutPlan))) {
|
||||
return AjaxResult.error("新增出库计划失败,出库计划编码“" + wmsOutPlan.getPlanCode() + "”已存在");
|
||||
// if (UserConstants.NOT_UNIQUE.equals(wmsOutPlanService.checkPlanCodeUnique(wmsOutPlan))) {
|
||||
// return AjaxResult.error("新增出库计划失败,出库计划编码“" + wmsOutPlan.getPlanCode() + "”已存在");
|
||||
// }
|
||||
// 出库计划编码自动生成
|
||||
if (wmsOutPlan.getPlanCode().isEmpty() || wmsOutPlan.getPlanCode() == null) {
|
||||
wmsOutPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("CKP"));
|
||||
}
|
||||
wmsOutPlan.setCreateBy(getUsername());
|
||||
return toAjax(wmsOutPlanService.insertWmsOutPlan(wmsOutPlan));
|
||||
|
@ -3,12 +3,14 @@ package com.ktg.mes.md.mapper;
|
||||
import com.ktg.common.annotation.DataSource;
|
||||
import com.ktg.common.enums.DataSourceType;
|
||||
import com.ktg.mes.md.domain.AP0AE;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Kelvin
|
||||
*/
|
||||
@Mapper
|
||||
public interface AP0AEMapper {
|
||||
@DataSource(DataSourceType.SQLSERVER)
|
||||
List<AP0AE> selectOutNewData();
|
||||
|
@ -2,6 +2,7 @@ package com.ktg.mes.md.mapper;
|
||||
|
||||
import com.ktg.mes.md.domain.BaseKnife;
|
||||
import com.ktg.mes.md.domain.MdItem;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -12,6 +13,7 @@ import java.util.List;
|
||||
* @author yinjinlu
|
||||
* @date 2024-10-31
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseKnifeMapper {
|
||||
/**
|
||||
* 查询工具台账
|
||||
|
@ -2,6 +2,7 @@ package com.ktg.mes.md.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.md.domain.BaseTechnologyBom;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 工艺bomMapper接口
|
||||
@ -9,7 +10,8 @@ import com.ktg.mes.md.domain.BaseTechnologyBom;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-01
|
||||
*/
|
||||
public interface BaseTechnologyBomMapper
|
||||
@Mapper
|
||||
public interface BaseTechnologyBomMapper
|
||||
{
|
||||
/**
|
||||
* 查询工艺bom
|
||||
|
@ -3,6 +3,7 @@ package com.ktg.mes.md.mapper;
|
||||
import java.util.List;
|
||||
import com.ktg.mes.md.domain.BomRoute;
|
||||
import com.ktg.mes.md.domain.MbbProduBom;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* BOM头Mapper接口
|
||||
@ -10,7 +11,8 @@ import com.ktg.mes.md.domain.MbbProduBom;
|
||||
* @author yinjinlu
|
||||
* @date 2024-10-31
|
||||
*/
|
||||
public interface BomRouteMapper
|
||||
@Mapper
|
||||
public interface BomRouteMapper
|
||||
{
|
||||
/**
|
||||
* 查询BOM头
|
||||
|
@ -1,9 +1,11 @@
|
||||
package com.ktg.mes.md.mapper;
|
||||
|
||||
import com.ktg.mes.md.domain.MdItem;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MdItemMapper {
|
||||
/**
|
||||
* 根据条件查询物料编码
|
||||
|
@ -3,6 +3,7 @@ package com.ktg.mes.md.mapper;
|
||||
import java.util.List;
|
||||
|
||||
import com.ktg.mes.md.domain.WmsOutPlanDetailEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 出库计划明细实体Mapper接口
|
||||
@ -10,6 +11,7 @@ import com.ktg.mes.md.domain.WmsOutPlanDetailEntity;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface WmsOutPlanDetailEntityMapper {
|
||||
/**
|
||||
* 查询出库计划明细实体
|
||||
|
@ -2,6 +2,7 @@ package com.ktg.mes.md.mapper;
|
||||
|
||||
import com.ktg.mes.md.domain.WmsOutPlan;
|
||||
import com.ktg.mes.md.domain.WmsOutPlanDetail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -12,6 +13,7 @@ import java.util.List;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-01
|
||||
*/
|
||||
@Mapper
|
||||
public interface WmsOutPlanMapper {
|
||||
/**
|
||||
* 查询出库计划管理
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ktg.mes.md.mapper;
|
||||
|
||||
import com.ktg.mes.md.domain.WmsOutTask;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -10,6 +11,7 @@ import java.util.List;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface WmsOutTaskMapper {
|
||||
/**
|
||||
* 查询出库任务
|
||||
|
@ -8,8 +8,16 @@ import java.util.List;
|
||||
* @author luo26
|
||||
*/
|
||||
public interface IAP0AEService {
|
||||
public List<AP0AE> selectOutNewData();
|
||||
|
||||
/**
|
||||
* 获取借用记录
|
||||
* @return 借用记录列表
|
||||
*/
|
||||
public List<AP0AE> selectBorrowedNewData();
|
||||
|
||||
public List<AP0AE> selectInNewData();
|
||||
/**
|
||||
* 获取归还记录
|
||||
* @return 归还记录列表
|
||||
*/
|
||||
public List<AP0AE> selectReturnedNewData();
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import com.ktg.mes.wm.domain.WmsInTask;
|
||||
import com.ktg.mes.wm.service.IWmStorageAreaService;
|
||||
import com.ktg.mes.wm.service.IWmsInPlanService;
|
||||
import com.ktg.mes.wm.service.IWmsInTaskService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -29,29 +30,21 @@ import java.util.List;
|
||||
* @author Kelvin
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AP0AEServiceImpl implements IAP0AEService {
|
||||
@Autowired
|
||||
private AP0AEMapper aP0AEMapper;
|
||||
|
||||
@Autowired
|
||||
private IWmsInPlanService wmsInPlanService;
|
||||
|
||||
@Autowired
|
||||
private IWmsInTaskService wmsInTaskService;
|
||||
|
||||
@Autowired
|
||||
private IWmStorageAreaService wmStorageAreaService;
|
||||
|
||||
@Autowired
|
||||
private IMdItemService mdItemService;
|
||||
private final AP0AEMapper aP0AEMapper;
|
||||
private final IWmsInPlanService wmsInPlanService;
|
||||
private final IWmsInTaskService wmsInTaskService;
|
||||
private final IWmStorageAreaService wmStorageAreaService;
|
||||
private final IMdItemService mdItemService;
|
||||
|
||||
@Override
|
||||
public List<AP0AE> selectOutNewData() {
|
||||
public List<AP0AE> selectBorrowedNewData() {
|
||||
return this.aP0AEMapper.selectOutNewData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AP0AE> selectInNewData() {
|
||||
public List<AP0AE> selectReturnedNewData() {
|
||||
List<AP0AE> ap0aeList = aP0AEMapper.selectInNewData();
|
||||
ap0aeList.stream().filter(ap0ae -> ap0ae.getAE003() != null).forEach(ap0ae -> {
|
||||
WmsInPlan wmsInPlan = new WmsInPlan();
|
||||
|
@ -4,8 +4,8 @@ import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ktg.mes.md.service.IAP0AEService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@ -26,17 +26,15 @@ import com.ktg.common.core.page.TableDataInfo;
|
||||
/**
|
||||
* 入库计划Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @author Kelvin
|
||||
* @date 2024-10-31
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wm/PLAN")
|
||||
@RequiredArgsConstructor
|
||||
public class WmsInPlanController extends BaseController {
|
||||
@Autowired
|
||||
private IWmsInPlanService wmsInPlanService;
|
||||
|
||||
@Autowired
|
||||
private IAP0AEService iAP0AEService;
|
||||
private final IWmsInPlanService wmsInPlanService;
|
||||
private final IAP0AEService iAP0AEService;
|
||||
|
||||
/**
|
||||
* 查询入库计划列表
|
||||
@ -54,7 +52,7 @@ public class WmsInPlanController extends BaseController {
|
||||
*/
|
||||
@GetMapping(value = "/sync")
|
||||
public AjaxResult sync() {
|
||||
return AjaxResult.success(iAP0AEService.selectInNewData());
|
||||
return AjaxResult.success(iAP0AEService.selectReturnedNewData());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,6 +13,7 @@ import com.ktg.mes.md.service.IBaseKnifeService;
|
||||
import com.ktg.mes.md.service.IMdItemService;
|
||||
import com.ktg.mes.wm.domain.*;
|
||||
import com.ktg.mes.wm.service.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -35,51 +36,25 @@ import com.ktg.mes.md.mapper.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wm/wmsInTask")
|
||||
@RequiredArgsConstructor
|
||||
public class WmsInTaskController extends BaseController {
|
||||
@Autowired
|
||||
private IWmsInTaskService wmsInTaskService;
|
||||
@Autowired
|
||||
private IWmsInPlanService wmsInPlanService;
|
||||
@Autowired
|
||||
private IWmsZdTaskService wmsZdTaskService;
|
||||
@Autowired
|
||||
private IMdItemService mdItemService;
|
||||
@Autowired
|
||||
private IBaseKnifeService baseKnifeService;
|
||||
@Autowired
|
||||
private IWmStorageAreaService wmStorageAreaService;
|
||||
@Autowired
|
||||
private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
||||
|
||||
@Autowired
|
||||
private WmsOutPlanMapper wmsOutPlanMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsOutTaskMapper wmsOutTaskMapper;
|
||||
|
||||
@Autowired
|
||||
private ProductionArrangementsMapper productionArrangementsMapper;
|
||||
|
||||
@Autowired
|
||||
private BaseKnifeMapper baseKnifeMapper;
|
||||
|
||||
@Autowired
|
||||
private BomRouteMapper bomRouteMapper;
|
||||
|
||||
@Autowired
|
||||
private MdItemMapper mdItemMapper;
|
||||
|
||||
@Autowired
|
||||
private BaseTechnologyBomMapper baseTechnologyBomMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsZdTaskMapper wmsZdTaskMapper;
|
||||
|
||||
@Autowired
|
||||
private WmStorageAreaMapper wmStorageAreaMapper;
|
||||
private final IWmsInTaskService wmsInTaskService;
|
||||
private final IWmsInPlanService wmsInPlanService;
|
||||
private final IWmsZdTaskService wmsZdTaskService;
|
||||
private final IMdItemService mdItemService;
|
||||
private final IBaseKnifeService baseKnifeService;
|
||||
private final IWmStorageAreaService wmStorageAreaService;
|
||||
private final IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
||||
private final WmsOutPlanMapper wmsOutPlanMapper;
|
||||
private final WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper;
|
||||
private final WmsOutTaskMapper wmsOutTaskMapper;
|
||||
private final ProductionArrangementsMapper productionArrangementsMapper;
|
||||
private final BaseKnifeMapper baseKnifeMapper;
|
||||
private final BomRouteMapper bomRouteMapper;
|
||||
private final MdItemMapper mdItemMapper;
|
||||
private final BaseTechnologyBomMapper baseTechnologyBomMapper;
|
||||
private final WmsZdTaskMapper wmsZdTaskMapper;
|
||||
private final WmStorageAreaMapper wmStorageAreaMapper;
|
||||
|
||||
/**
|
||||
* 查询入库任务列表
|
||||
|
@ -2,6 +2,7 @@ package com.ktg.mes.wm.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.wm.domain.ProductionArrangements;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 生产准备记录Mapper接口
|
||||
@ -9,7 +10,8 @@ import com.ktg.mes.wm.domain.ProductionArrangements;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-18
|
||||
*/
|
||||
public interface ProductionArrangementsMapper
|
||||
@Mapper
|
||||
public interface ProductionArrangementsMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产准备记录
|
||||
|
@ -3,6 +3,7 @@ package com.ktg.mes.wm.mapper;
|
||||
import java.util.List;
|
||||
import com.ktg.mes.wm.domain.WmStorageArea;
|
||||
import com.ktg.mes.wm.domain.vo.AreaVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Select;
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-08
|
||||
*/
|
||||
@Mapper
|
||||
public interface WmStorageAreaMapper
|
||||
{
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@ package com.ktg.mes.wm.mapper;
|
||||
import java.util.List;
|
||||
import com.ktg.mes.wm.domain.WmsInTask;
|
||||
import com.ktg.mes.wm.domain.WmsZdTask;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 入库任务Mapper接口
|
||||
@ -10,7 +11,8 @@ import com.ktg.mes.wm.domain.WmsZdTask;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-01
|
||||
*/
|
||||
public interface WmsInTaskMapper
|
||||
@Mapper
|
||||
public interface WmsInTaskMapper
|
||||
{
|
||||
/**
|
||||
* 查询入库任务
|
||||
|
@ -2,6 +2,7 @@ package com.ktg.mes.wm.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.wm.domain.WmsZdTask;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 组装任务Mapper接口
|
||||
@ -9,7 +10,8 @@ import com.ktg.mes.wm.domain.WmsZdTask;
|
||||
* @author yinjinlu
|
||||
* @date 2024-11-01
|
||||
*/
|
||||
public interface WmsZdTaskMapper
|
||||
@Mapper
|
||||
public interface WmsZdTaskMapper
|
||||
{
|
||||
/**
|
||||
* 查询组装任务
|
||||
|
@ -92,7 +92,9 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService {
|
||||
public int insertWmsInPlan(WmsInPlan wmsInPlan) {
|
||||
wmsInPlan.setCreateTime(DateUtils.getNowDate());
|
||||
// 设置计划编码
|
||||
if (wmsInPlan.getPlanCode() == null) wmsInPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("RKP"));
|
||||
if (wmsInPlan.getPlanCode() == null) {
|
||||
wmsInPlan.setPlanCode(MultiModuleCodeGenerator.generateTaskCode("RKP"));
|
||||
}
|
||||
int rows = wmsInPlanMapper.insertWmsInPlan(wmsInPlan);
|
||||
insertWmsInPlanDetails(wmsInPlan);
|
||||
return rows;
|
||||
@ -161,6 +163,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService {
|
||||
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = list.get(i).getWmsInPlanDetailEntityList();
|
||||
wmsInPlanDetailsList1.get(i).setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
|
||||
wmsInPlanDetailEntityMapper.deleteWmsInPlanDetailEntityByPlanDetailsId(wmsInPlanDetailsList1.get(i).getDetailsId());
|
||||
// 插入实例
|
||||
insertWmsInPlanDetailEntity(wmsInPlanDetailsList1.get(i));
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ import com.ktg.mes.md.service.IMdItemService;
|
||||
import com.ktg.mes.wm.domain.*;
|
||||
import com.ktg.mes.wm.mapper.WmStorageAreaMapper;
|
||||
import com.ktg.mes.wm.service.*;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -25,23 +26,16 @@ import com.ktg.mes.wm.mapper.WmsInTaskMapper;
|
||||
* @date 2024-11-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
||||
@Autowired
|
||||
private WmsInTaskMapper wmsInTaskMapper;
|
||||
@Autowired
|
||||
private IMdItemService mdItemService;
|
||||
@Autowired
|
||||
private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
||||
@Autowired
|
||||
private WmStorageAreaMapper wmStorageAreaMapper;
|
||||
@Autowired
|
||||
private IWmsInPlanService wmsInPlanService;
|
||||
@Autowired
|
||||
private IWmStorageAreaService wmStorageAreaService;
|
||||
@Autowired
|
||||
private IWmsZdTaskService wmsZdTaskService;
|
||||
@Autowired
|
||||
private IBaseKnifeService baseKnifeService;
|
||||
private final WmsInTaskMapper wmsInTaskMapper;
|
||||
private final IMdItemService mdItemService;
|
||||
private final IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
||||
private final WmStorageAreaMapper wmStorageAreaMapper;
|
||||
private final IWmsInPlanService wmsInPlanService;
|
||||
private final IWmStorageAreaService wmStorageAreaService;
|
||||
private final IWmsZdTaskService wmsZdTaskService;
|
||||
private final IBaseKnifeService baseKnifeService;
|
||||
|
||||
/**
|
||||
* 查询入库任务
|
||||
|
Loading…
Reference in New Issue
Block a user