原始BOM列表
This commit is contained in:
parent
2b6cb45fcd
commit
f95a3de394
|
|
@ -106,6 +106,13 @@ public class BomNewOriginalChildEntity implements Serializable {
|
||||||
@ApiModelProperty("创建人")
|
@ApiModelProperty("创建人")
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理状态:1=待处理、2=已处理
|
||||||
|
*/
|
||||||
|
@TableField(value = "edit_status")
|
||||||
|
@ApiModelProperty(value = "处理状态:1=待处理、2=已处理")
|
||||||
|
private Integer editStatus;
|
||||||
|
|
||||||
public BigDecimal getTotalWeight() {
|
public BigDecimal getTotalWeight() {
|
||||||
return NumberUtil.mul(this.getUnitWeight(), this.num);
|
return NumberUtil.mul(this.getUnitWeight(), this.num);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.nflg.product.bomnew.pojo.vo;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author 大米
|
* @author 大米
|
||||||
|
|
@ -11,6 +13,10 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
public class BaseMaterialVO {
|
public class BaseMaterialVO {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("物料主数据行ID")
|
||||||
|
private List materialRowId;
|
||||||
|
|
||||||
@ApiModelProperty("物料编码")
|
@ApiModelProperty("物料编码")
|
||||||
private String materialNo;
|
private String materialNo;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nflg.product.bomnew.pojo.vo;
|
package com.nflg.product.bomnew.pojo.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
@ -170,5 +171,7 @@ public class BomOriginalListVO extends BaseMaterialVO {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,10 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
|
||||||
* @return 原始BOM列表
|
* @return 原始BOM列表
|
||||||
*/
|
*/
|
||||||
public Page<BomOriginalListVO> getOriginalBomListPage(OriginalBomQuery query) {
|
public Page<BomOriginalListVO> getOriginalBomListPage(OriginalBomQuery query) {
|
||||||
return this.getBaseMapper().getOriginalBomListPage(new Page<>(query.getPage(), query.getPageSize()), query,SessionUtil.getUserCode());
|
Page<BomOriginalListVO> result = this.getBaseMapper().getOriginalBomListPage(new Page<>(query.getPage(), query.getPageSize()), query, SessionUtil.getUserCode());
|
||||||
|
|
||||||
|
materialMainService.intiMaterialInfo(result.getRecords());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -124,6 +127,7 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<BomOriginalListVO> getChild(Long rowId) {
|
public List<BomOriginalListVO> getChild(Long rowId) {
|
||||||
|
BomOriginalPlmParentEntity parent = originalPlmParentService.getBaseMapper().selectById(rowId);
|
||||||
List<BomOriginalListVO> parentChild = this.getBaseMapper().getParentChild(rowId);
|
List<BomOriginalListVO> parentChild = this.getBaseMapper().getParentChild(rowId);
|
||||||
materialMainService.intiMaterialInfo(parentChild);
|
materialMainService.intiMaterialInfo(parentChild);
|
||||||
if (CollUtil.isNotEmpty(parentChild)) {
|
if (CollUtil.isNotEmpty(parentChild)) {
|
||||||
|
|
@ -136,7 +140,6 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
|
||||||
BomNewOriginalParentEntity parentEntity = bomListMap.get(child.getDrawingNo());
|
BomNewOriginalParentEntity parentEntity = bomListMap.get(child.getDrawingNo());
|
||||||
child.setCurrentVersion(parentEntity.getCurrentVersion());
|
child.setCurrentVersion(parentEntity.getCurrentVersion());
|
||||||
child.setStatus(parentEntity.getStatus());
|
child.setStatus(parentEntity.getStatus());
|
||||||
child.setEditStatus(parentEntity.getEditStatus());
|
|
||||||
child.setDeviseName(parentEntity.getDeviseName());
|
child.setDeviseName(parentEntity.getDeviseName());
|
||||||
child.setDeviseUserCode(parentEntity.getDeviseUserCode());
|
child.setDeviseUserCode(parentEntity.getDeviseUserCode());
|
||||||
child.setCreatedBy(parentEntity.getCreatedBy());
|
child.setCreatedBy(parentEntity.getCreatedBy());
|
||||||
|
|
@ -149,10 +152,11 @@ public class BomNewOriginalParentService extends ServiceImpl<BomNewOriginalParen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { //无BOM-版本时 确定版本号
|
else { //无BOM-版本时 确定版本号
|
||||||
|
child.setStatus(OriginalStatusEnum.UN_CONVERT.getValue());
|
||||||
if( MaterialshouldBomExistUtil.checkShouldBomExist(child)){
|
if( MaterialshouldBomExistUtil.checkShouldBomExist(child)){
|
||||||
child.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
child.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||||
child.setStatus(OriginalStatusEnum.UN_CONVERT.getValue());
|
child.setStatus(OriginalStatusEnum.UN_CONVERT.getValue());
|
||||||
child.setEditStatus(OriginalEditStatusEnum.HANDLER_CREATED.getValue());
|
// child.setEditStatus(OriginalEditStatusEnum.HANDLER_CREATED.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,12 @@
|
||||||
<result column="total_weight" property="totalWeight" jdbcType="DECIMAL"/>
|
<result column="total_weight" property="totalWeight" jdbcType="DECIMAL"/>
|
||||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||||
<result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
|
<result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
|
||||||
|
<result column="edit_status" property="editStatus" jdbcType="INTEGER"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
row_id, parent_row_id, order_number, drawing_no, material_no, material_name, material_desc, unit_weight, num, total_weight ,remark,created_by </sql>
|
row_id, parent_row_id, order_number, drawing_no, material_no, material_name, material_desc, unit_weight, num, total_weight ,remark,created_by ,edit_status </sql>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="getMaterialBaseInfo" resultType="com.nflg.product.bomnew.pojo.vo.BaseMaterialVO">
|
<select id="getMaterialBaseInfo" resultType="com.nflg.product.bomnew.pojo.vo.BaseMaterialVO">
|
||||||
select material_no, material_name, material_desc, procure_type, project_type, material_state,drawing_no,material_category_code ,material_get_type,drawing_no
|
select row_id as materialRowId, material_no, material_name, material_desc, procure_type, project_type, material_state,drawing_no,material_category_code ,material_get_type,drawing_no
|
||||||
from t_material_main
|
from t_material_main
|
||||||
where material_no in
|
where material_no in
|
||||||
<foreach collection="materialNos" item="item" open="(" close=")" separator=",">
|
<foreach collection="materialNos" item="item" open="(" close=")" separator=",">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue