parent
7a9b965fcb
commit
cda789adcb
60 changed files with 1101 additions and 203 deletions
@ -0,0 +1,25 @@ |
||||
package org.springblade.desk.order.request; |
||||
|
||||
import lombok.Data; |
||||
import org.springblade.desk.order.entity.AssayContent; |
||||
import org.springblade.desk.order.entity.AssayContentDetail; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 化验含量 - 保存请求参数 |
||||
* |
||||
* @author lqk |
||||
*/ |
||||
@Data |
||||
public class AssayContentSave { |
||||
/** |
||||
* 化验含量 |
||||
*/ |
||||
private AssayContent assayContent; |
||||
|
||||
/** |
||||
* 化验含量明细 |
||||
*/ |
||||
private List<AssayContentDetail> detailList; |
||||
} |
||||
@ -0,0 +1,31 @@ |
||||
package org.springblade.desk.order.request; |
||||
|
||||
import lombok.Data; |
||||
import org.springblade.desk.order.entity.MoldPlan; |
||||
import org.springblade.desk.order.entity.MoldPlanOrder; |
||||
import org.springblade.desk.order.entity.MoldPlanTool; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 烧结模具计划 - 保存请求参数 |
||||
* |
||||
* @author lqk |
||||
*/ |
||||
@Data |
||||
public class MoldPlanSave { |
||||
/** |
||||
* 烧结模具计划 |
||||
*/ |
||||
private MoldPlan moldPlan; |
||||
|
||||
/** |
||||
* 关联订单明细 |
||||
*/ |
||||
private List<MoldPlanOrder> orderList; |
||||
|
||||
/** |
||||
* 关联工装明细 |
||||
*/ |
||||
private List<MoldPlanTool> toolList; |
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
package org.springblade.desk.order.request; |
||||
|
||||
import lombok.Data; |
||||
import org.springblade.desk.order.entity.PlateGoodsApply; |
||||
import org.springblade.desk.order.entity.PlateGoodsApplyDetail; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 镀层物料申报 - 保存请求参数 |
||||
* |
||||
* @author lqk |
||||
*/ |
||||
@Data |
||||
public class PlateGoodsApplySave { |
||||
/** |
||||
* 化验含量 |
||||
*/ |
||||
private PlateGoodsApply assayContent; |
||||
|
||||
/** |
||||
* 化验含量明细 |
||||
*/ |
||||
private List<PlateGoodsApplyDetail> detailList; |
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
package org.springblade.desk.order.request; |
||||
|
||||
import lombok.Data; |
||||
import org.springblade.desk.order.entity.PlateGoodsRecord; |
||||
import org.springblade.desk.order.entity.PlateGoodsRecordDetail; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 镀层物料需求 - 保存请求参数 |
||||
* |
||||
* @author lqk |
||||
*/ |
||||
@Data |
||||
public class PlateGoodsRecordSave { |
||||
/** |
||||
* 化验含量 |
||||
*/ |
||||
private PlateGoodsRecord assayContent; |
||||
|
||||
/** |
||||
* 化验含量明细 |
||||
*/ |
||||
private List<PlateGoodsRecordDetail> detailList; |
||||
} |
||||
@ -0,0 +1,28 @@ |
||||
package org.springblade.desk.order.constant; |
||||
|
||||
/** |
||||
* 烧结模具计划相关常量 |
||||
* |
||||
* @author lqk |
||||
* @date 2025-11-27 10:40 |
||||
*/ |
||||
public interface MoldPlanConst { |
||||
//region 状态相关常量
|
||||
/** |
||||
* 待出库 |
||||
*/ |
||||
Integer STATUS_WAITING = 0; |
||||
/** |
||||
* 已出库 |
||||
*/ |
||||
Integer STATUS_OUT_STORE = 1; |
||||
/** |
||||
* 完成 |
||||
*/ |
||||
Integer STATUS_DONE = 2; |
||||
/** |
||||
* 关闭 |
||||
*/ |
||||
Integer STATUS_CLOSE = 3; |
||||
//endregion
|
||||
} |
||||
@ -0,0 +1,40 @@ |
||||
package org.springblade.desk.order.constant; |
||||
|
||||
/** |
||||
* 镀层物料需求相关常量 |
||||
* |
||||
* @author lqk |
||||
* @date 2025-11-27 10:40 |
||||
*/ |
||||
public interface PlateGoodsConst { |
||||
//region 状态相关常量
|
||||
/** |
||||
* 待审核 |
||||
*/ |
||||
Integer STATUS_WAITING = 0; |
||||
/** |
||||
* 审核通过 |
||||
*/ |
||||
Integer STATUS_PASS = 1; |
||||
/** |
||||
* 使用中 |
||||
*/ |
||||
Integer STATUS_USING = 2; |
||||
/** |
||||
* 已超期 |
||||
*/ |
||||
Integer STATUS_OUT_DATE = 2; |
||||
/** |
||||
* 已完成 |
||||
*/ |
||||
Integer STATUS_DONE = 3; |
||||
/** |
||||
* 审核未通过 |
||||
*/ |
||||
Integer STATUS_NOT_PASS = 3; |
||||
/** |
||||
* 已关闭 |
||||
*/ |
||||
Integer STATUS_CLOSE = 3; |
||||
//endregion
|
||||
} |
||||
@ -1,22 +1,54 @@ |
||||
package org.springblade.desk.order.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.order.entity.AssayContent; |
||||
import org.springblade.desk.order.entity.AssayContentDetail; |
||||
import org.springblade.desk.order.mapper.AssayContentMapper; |
||||
import org.springblade.desk.order.service.IAssayContentDetailService; |
||||
import org.springblade.desk.order.service.IAssayContentService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
*/ |
||||
@RequiredArgsConstructor |
||||
@Service |
||||
public class AssayContentServiceImpl extends BaseServiceImpl<AssayContentMapper, AssayContent> implements IAssayContentService { |
||||
|
||||
private final IAssayContentDetailService detailService; |
||||
|
||||
@Override |
||||
public IPage<AssayContent> selectPage(IPage<AssayContent> page, AssayContent entity) { |
||||
return null; |
||||
List<AssayContent> dataList = baseMapper.selectPage(page, entity); |
||||
return page.setRecords(dataList); |
||||
} |
||||
|
||||
@Override |
||||
public boolean save(AssayContent entity, List<AssayContentDetail> detailList) { |
||||
if (this.save(entity)) { |
||||
for (AssayContentDetail detail : detailList) { |
||||
detail.setAcId(entity.getId()); |
||||
} |
||||
detailService.saveBatch(detailList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public boolean update(AssayContent entity, List<AssayContentDetail> detailList) { |
||||
if (this.updateById(entity)) { |
||||
detailService.saveBatch(detailList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
|
||||
} |
||||
|
||||
@ -1,22 +1,65 @@ |
||||
package org.springblade.desk.order.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.desk.order.entity.MoldPlan; |
||||
import org.springblade.desk.order.entity.MoldPlanOrder; |
||||
import org.springblade.desk.order.entity.MoldPlanTool; |
||||
import org.springblade.desk.order.mapper.MoldPlanMapper; |
||||
import org.springblade.desk.order.service.IMoldPlanOrderService; |
||||
import org.springblade.desk.order.service.IMoldPlanService; |
||||
import org.springblade.desk.order.service.IMoldPlanToolService; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
*/ |
||||
@RequiredArgsConstructor |
||||
@Service |
||||
public class MoldPlanServiceImpl extends BaseServiceImpl<MoldPlanMapper, MoldPlan> implements IMoldPlanService { |
||||
|
||||
private final IMoldPlanOrderService orderService; |
||||
|
||||
private final IMoldPlanToolService toolService; |
||||
|
||||
@Override |
||||
public IPage<MoldPlan> selectPage(IPage<MoldPlan> page, MoldPlan entity) { |
||||
return null; |
||||
List<MoldPlan> dataList = baseMapper.selectPage(page, entity); |
||||
return page.setRecords(dataList); |
||||
} |
||||
|
||||
@Transactional(rollbackFor = Exception.class) |
||||
@Override |
||||
public boolean save(MoldPlan entity, List<MoldPlanOrder> orderList, List<MoldPlanTool> toolList) { |
||||
if (this.save(entity)) { |
||||
for (MoldPlanOrder moldPlanOrder : orderList) { |
||||
moldPlanOrder.setMpId(entity.getId()); |
||||
} |
||||
orderService.saveBatch(orderList); |
||||
|
||||
for (MoldPlanTool moldPlanTool : toolList) { |
||||
moldPlanTool.setMpId(entity.getId()); |
||||
} |
||||
toolService.saveBatch(toolList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
@Transactional(rollbackFor = Exception.class) |
||||
@Override |
||||
public boolean update(MoldPlan entity, List<MoldPlanOrder> orderList, List<MoldPlanTool> toolList) { |
||||
if (this.save(entity)) { |
||||
orderService.saveBatch(orderList); |
||||
toolService.saveBatch(toolList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
@ -1,22 +1,77 @@ |
||||
package org.springblade.desk.order.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.desk.order.entity.PlateGoodsApply; |
||||
import org.springblade.desk.order.entity.PlateGoodsApplyDetail; |
||||
import org.springblade.desk.order.mapper.PlateGoodsApplyMapper; |
||||
import org.springblade.desk.order.service.IPlateGoodsApplyDetailService; |
||||
import org.springblade.desk.order.service.IPlateGoodsApplyService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
*/ |
||||
@RequiredArgsConstructor |
||||
@Service |
||||
public class PlateGoodsApplyServiceImpl extends BaseServiceImpl<PlateGoodsApplyMapper, PlateGoodsApply> implements IPlateGoodsApplyService { |
||||
|
||||
private final IPlateGoodsApplyDetailService detailService; |
||||
|
||||
@Override |
||||
public IPage<PlateGoodsApply> selectPage(IPage<PlateGoodsApply> page, PlateGoodsApply entity) { |
||||
return null; |
||||
List<PlateGoodsApply> dataList = baseMapper.selectPage(page, entity); |
||||
return page.setRecords(dataList); |
||||
} |
||||
|
||||
@Override |
||||
public boolean save(PlateGoodsApply entity, List<PlateGoodsApplyDetail> detailList) { |
||||
if (this.save(entity)) { |
||||
for (PlateGoodsApplyDetail detail : detailList) { |
||||
detail.setPgadId(entity.getId()); |
||||
} |
||||
detailService.saveBatch(detailList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public boolean update(PlateGoodsApply entity, List<PlateGoodsApplyDetail> detailList) { |
||||
if (this.save(entity)) { |
||||
//TODO 先根据需求ID将原明细删除
|
||||
|
||||
// 保存新的明细
|
||||
detailService.saveBatch(detailList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public boolean confirmBatch(List<Long> ids, Integer approvalStatus, String approvalMemo) { |
||||
List<PlateGoodsApply> dataList = new ArrayList<>(); |
||||
|
||||
BladeUser user = AuthUtil.getUser(); |
||||
ids.forEach(id -> { |
||||
PlateGoodsApply item = new PlateGoodsApply(); |
||||
item.setId(id); |
||||
item.setApprovalMan(user.getUserId()); |
||||
item.setApprovalTime(DateUtil.now()); |
||||
item.setApprovalStatus(approvalStatus); |
||||
item.setApprovalMemo(approvalMemo); |
||||
dataList.add(item); |
||||
}); |
||||
|
||||
return this.updateBatchById(dataList); |
||||
} |
||||
} |
||||
|
||||
@ -1,22 +1,77 @@ |
||||
package org.springblade.desk.order.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.desk.order.entity.PlateGoodsRecord; |
||||
import org.springblade.desk.order.entity.PlateGoodsRecordDetail; |
||||
import org.springblade.desk.order.mapper.PlateGoodsRecordMapper; |
||||
import org.springblade.desk.order.service.IPlateGoodsRecordDetailService; |
||||
import org.springblade.desk.order.service.IPlateGoodsRecordService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
*/ |
||||
@RequiredArgsConstructor |
||||
@Service |
||||
public class PlateGoodsRecordServiceImpl extends BaseServiceImpl<PlateGoodsRecordMapper, PlateGoodsRecord> implements IPlateGoodsRecordService { |
||||
|
||||
private final IPlateGoodsRecordDetailService detailService; |
||||
|
||||
@Override |
||||
public IPage<PlateGoodsRecord> selectPage(IPage<PlateGoodsRecord> page, PlateGoodsRecord entity) { |
||||
return null; |
||||
List<PlateGoodsRecord> dataList = baseMapper.selectPage(page, entity); |
||||
return page.setRecords(dataList); |
||||
} |
||||
|
||||
@Override |
||||
public boolean save(PlateGoodsRecord entity, List<PlateGoodsRecordDetail> detailList) { |
||||
if (this.save(entity)) { |
||||
for (PlateGoodsRecordDetail detail : detailList) { |
||||
detail.setPgrdId(entity.getId()); |
||||
} |
||||
detailService.saveBatch(detailList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public boolean update(PlateGoodsRecord entity, List<PlateGoodsRecordDetail> detailList) { |
||||
if (this.save(entity)) { |
||||
//TODO 先根据需求ID将原明细删除
|
||||
|
||||
// 保存新的明细
|
||||
detailService.saveBatch(detailList); |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
@Override |
||||
public boolean confirmBatch(List<Long> ids, Integer approvalStatus, String approvalMemo) { |
||||
List<PlateGoodsRecord> plateGoodsRecordList = new ArrayList<>(); |
||||
|
||||
BladeUser user = AuthUtil.getUser(); |
||||
ids.forEach(id -> { |
||||
PlateGoodsRecord plateGoodsRecord = new PlateGoodsRecord(); |
||||
plateGoodsRecord.setId(id); |
||||
plateGoodsRecord.setApprovalMan(user.getUserId()); |
||||
plateGoodsRecord.setApprovalTime(DateUtil.now()); |
||||
plateGoodsRecord.setApprovalStatus(approvalStatus); |
||||
plateGoodsRecord.setApprovalMemo(approvalMemo); |
||||
plateGoodsRecordList.add(plateGoodsRecord); |
||||
}); |
||||
|
||||
return this.updateBatchById(plateGoodsRecordList); |
||||
} |
||||
} |
||||
|
||||
Loading…
Reference in new issue