包装组零件规则基础数据主、明细

tags/yfai-mes-ext-v2.3
pzj 8 months ago
parent 6d2a8087e9
commit e130754448

@ -0,0 +1,13 @@
package cn.estsh.i3plus.ext.mes.api.base;
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageRuleDetail;
/**
* @Description :
* @Reference :
* @Author : PZJ
* @CreateDate : 2024/9/25 9:48
* @Modify:
**/
public interface IMesPartPackageRuleDetailService extends IBaseMesService<MesPartPackageRuleDetail>{
}

@ -0,0 +1,13 @@
package cn.estsh.i3plus.ext.mes.api.base;
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageRule;
/**
* @Description :
* @Reference :
* @Author : PZJ
* @CreateDate : 2024/9/25 9:36
* @Modify:
**/
public interface IMesPartPackageRuleService extends IBaseMesService<MesPartPackageRule>{
}

@ -0,0 +1,20 @@
package cn.estsh.i3plus.ext.mes.apiservice.controller.base;
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageRule;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description :
* @Reference :
* @Author : PZJ
* @CreateDate : 2024/9/25 9:35
* @Modify:
**/
@Api("包装组零件规则")
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesPartPackageRule")
public class MesPartPackageRuleController extends BaseMesController<MesPartPackageRule>{
}

@ -0,0 +1,20 @@
package cn.estsh.i3plus.ext.mes.apiservice.controller.base;
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageRuleDetail;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description :
* @Reference :
* @Author : PZJ
* @CreateDate : 2024/9/25 9:47
* @Modify:
**/
@Api("包装组零件规则明细")
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesPartPackageRuleDetail")
public class MesPartPackageRuleDetailController extends BaseMesController<MesPartPackageRuleDetail>{
}

@ -0,0 +1,38 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.api.base.IMesPartPackageRuleDetailService;
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageRuleDetail;
import cn.estsh.impp.framework.boot.util.ValidatorBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @Description :
* @Reference :
* @Author : PZJ
* @CreateDate : 2024/9/25 9:51
* @Modify:
**/
@Service
@Slf4j
public class MesPartPackageRuleDetailServiceImpl extends BaseMesService<MesPartPackageRuleDetail> implements IMesPartPackageRuleDetailService {
@Override
protected void setPackQueryBean(MesPartPackageRuleDetail bean, DdlPackBean packBean) {
DdlPreparedPack.getNumEqualPack(bean.getPid(), "pid", packBean);
}
@Override
protected void onInsertBean(MesPartPackageRuleDetail item) {
ValidatorBean.checkNotNull(item.getPartNo(),"零件号为空");
}
@Override
protected void onUpdateBean(MesPartPackageRuleDetail item) {
ValidatorBean.checkNotNull(item.getId(),"id不能为空");
ValidatorBean.checkNotNull(item.getPartNo(),"零件号为空");
}
}

@ -0,0 +1,30 @@
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base;
import cn.estsh.i3plus.ext.mes.api.base.IMesPartPackageRuleService;
import cn.estsh.i3plus.pojo.mes.bean.MesPartPackageRule;
import cn.estsh.impp.framework.boot.util.ValidatorBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @Description :
* @Reference :
* @Author : PZJ
* @CreateDate : 2024/9/25 9:37
* @Modify:
**/
@Service
@Slf4j
public class MesPartPackageRuleServiceImpl extends BaseMesService<MesPartPackageRule> implements IMesPartPackageRuleService {
@Override
protected void onInsertBean(MesPartPackageRule item) {
ValidatorBean.checkNotNull(item.getPackagePartNo(),"包覆零件号为空");
}
@Override
protected void onUpdateBean(MesPartPackageRule item) {
ValidatorBean.checkNotNull(item.getId(),"id不能为空");
ValidatorBean.checkNotNull(item.getPackagePartNo(),"包覆零件号为空");
}
}
Loading…
Cancel
Save