forked from I3-YF/i3plus-mes-yfai
BOM生效
parent
d607f51cc3
commit
f5eb7928c8
@ -0,0 +1,13 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.api.busi.jx;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBomPendingPart;
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
|
public interface IJxBomPendingPartService {
|
||||||
|
|
||||||
|
@ApiOperation("按条件分页查询待BOM生效成品")
|
||||||
|
ListPager<MesBomPendingPart> queryBomPendingPartByPager(MesBomPendingPart bomPendingPart, Pager pager);
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package cn.estsh.i3plus.ext.mes.apiservice.controller.busi.jx;
|
package cn.estsh.i3plus.ext.mes.apiservice.controller.base.jx;
|
||||||
|
|
||||||
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxBadnessClassifyService;
|
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxBadnessClassifyService;
|
||||||
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBadnessClassify;
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBadnessClassify;
|
@ -1,4 +1,4 @@
|
|||||||
package cn.estsh.i3plus.ext.mes.apiservice.controller.busi.jx;
|
package cn.estsh.i3plus.ext.mes.apiservice.controller.base.jx;
|
||||||
|
|
||||||
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxBadnessClassifyDetailService;
|
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxBadnessClassifyDetailService;
|
||||||
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBadnessClassifyDetail;
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBadnessClassifyDetail;
|
@ -1,4 +1,4 @@
|
|||||||
package cn.estsh.i3plus.ext.mes.apiservice.controller.busi.jx;
|
package cn.estsh.i3plus.ext.mes.apiservice.controller.base.jx;
|
||||||
|
|
||||||
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxBadnessTypeService;
|
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxBadnessTypeService;
|
||||||
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBadnessType;
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBadnessType;
|
@ -1,4 +1,4 @@
|
|||||||
package cn.estsh.i3plus.ext.mes.apiservice.controller.busi.jx;
|
package cn.estsh.i3plus.ext.mes.apiservice.controller.base.jx;
|
||||||
|
|
||||||
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxOqcProjectService;
|
import cn.estsh.i3plus.ext.mes.api.base.jx.IJxOqcProjectService;
|
||||||
import cn.estsh.i3plus.ext.mes.pojo.bean.MesOqcRuleNoteDetail;
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesOqcRuleNoteDetail;
|
@ -0,0 +1,34 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.busi.jx;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.api.busi.jx.IJxBomPendingPartService;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBomPendingPart;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pojo.repository.MesBomPendingPartRepository;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pojo.sqlpack.MesExtHqlPack;
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
|
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @PROJECT_NAME: i3plus-mes-panasonic-jx
|
||||||
|
* @DESCRIPTION:
|
||||||
|
* @USER: xinwang.yi
|
||||||
|
* @DATE: 2023-11-20 10:55
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class JxBomPendingPartService implements IJxBomPendingPartService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MesBomPendingPartRepository bomPendingPartRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ListPager<MesBomPendingPart> queryBomPendingPartByPager(MesBomPendingPart bomPendingPart, Pager pager) {
|
||||||
|
DdlPackBean hqlPack = MesExtHqlPack.getBomPendingPart(bomPendingPart);
|
||||||
|
int count = bomPendingPartRepository.findByHqlWhereCount(hqlPack);
|
||||||
|
pager = PagerHelper.getPager(pager, count);
|
||||||
|
hqlPack.setOrderByStr(bomPendingPart.orderBy());
|
||||||
|
return new ListPager(bomPendingPartRepository.findByHqlWherePage(hqlPack, pager), pager);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pojo.bean;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.hibernate.annotations.ColumnDefault;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Index;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: xiangming.liao
|
||||||
|
* @Date: 2021/01/14 20:03
|
||||||
|
* @Modify:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Entity
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Table(name = "MES_BOM_PENDING_PART", indexes = {
|
||||||
|
@Index(columnList = "SYSTEM_SYNC_STATUS"),
|
||||||
|
@Index(columnList = "PART_NO"),
|
||||||
|
@Index(columnList = "ITEM_PART_NO"),
|
||||||
|
@Index(columnList = "PART_NO,IS_TOOK_EFFECT"),
|
||||||
|
@Index(columnList = "IS_REMIND,IS_TOOK_EFFECT")
|
||||||
|
})
|
||||||
|
@Api("MES_BOM待生效成品表")
|
||||||
|
public class MesBomPendingPart extends BaseBean implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5035017176127870246L;
|
||||||
|
|
||||||
|
@Column(name = "PART_NO")
|
||||||
|
@ApiParam("父零件号")
|
||||||
|
private String partNo;
|
||||||
|
|
||||||
|
@Column(name = "PART_NAME")
|
||||||
|
@ApiParam("父零件名称")
|
||||||
|
private String partName;
|
||||||
|
|
||||||
|
@Column(name = "UNIT")
|
||||||
|
@ApiParam("单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@Column(name = "QTY" )
|
||||||
|
@ColumnDefault("0")
|
||||||
|
@ApiParam(value = "数量",example = "0")
|
||||||
|
private Double qty;
|
||||||
|
|
||||||
|
@Column(name = "ITEM_PART_NO")
|
||||||
|
@ApiParam("子零件编码")
|
||||||
|
private String itemPartNo;
|
||||||
|
|
||||||
|
@Column(name = "ITEM_PART_NAME")
|
||||||
|
@ApiParam("子零件名称")
|
||||||
|
private String itemPartName;
|
||||||
|
|
||||||
|
@Column(name = "ITEM_UNIT")
|
||||||
|
@ApiParam("子零件单位")
|
||||||
|
private String itemUnit;
|
||||||
|
|
||||||
|
@Column(name = "ITEM_QTY")
|
||||||
|
@ColumnDefault("0")
|
||||||
|
@ApiParam(value = "子零件数量",example = "0")
|
||||||
|
private Double itemQty;
|
||||||
|
|
||||||
|
@Column(name = "BOM_VERSION")
|
||||||
|
@ApiParam("BOM版本")
|
||||||
|
private String bomVersion;
|
||||||
|
|
||||||
|
@Column(name = "EFF_START_TIME")
|
||||||
|
@ApiParam("生效时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String effStartTime;
|
||||||
|
|
||||||
|
@Column(name = "EFF_END_TIME")
|
||||||
|
@ApiParam("失效时间")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private String effEndTime;
|
||||||
|
|
||||||
|
@Column(name = "IS_REMIND")
|
||||||
|
@ApiParam("是否已提醒")
|
||||||
|
@ColumnDefault("2")
|
||||||
|
@AnnoOutputColumn(refClass = MesExtEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description")
|
||||||
|
private Integer isReminded;
|
||||||
|
|
||||||
|
@Column(name = "IS_TOOK_EFFECT")
|
||||||
|
@ApiParam("是否已生效")
|
||||||
|
@ColumnDefault("2")
|
||||||
|
@AnnoOutputColumn(refClass = MesExtEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description")
|
||||||
|
private Integer isTookEffect;
|
||||||
|
|
||||||
|
@Column(name = "SYSTEM_SYNC_STATUS")
|
||||||
|
@ColumnDefault("2")
|
||||||
|
@ApiParam(value = "系统同步标志")
|
||||||
|
public Integer systemSyncStatus = 2;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pojo.repository;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pojo.bean.MesBomPendingPart;
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xinwang.yi
|
||||||
|
* @version 1.0
|
||||||
|
* @date 2023/11/16 9:17
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public interface MesBomPendingPartRepository extends BaseRepository<MesBomPendingPart, Long> {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue