【工艺路线】列表、详情
This commit is contained in:
parent
b411ff26fb
commit
7e75008d88
|
|
@ -1,9 +1,15 @@
|
|||
package com.nflg.product.technology.api;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nflg.product.base.core.api.BaseApi;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.nflg.product.technology.pojo.query.ProcessRouteTaskQuery;
|
||||
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskVO;
|
||||
import com.nflg.product.technology.service.ProcessRouteTaskService;
|
||||
import nflg.product.common.vo.ResultVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -17,4 +23,28 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@RequestMapping("/processRouteTask")
|
||||
public class ProcessRouteTaskApi extends BaseApi {
|
||||
|
||||
@Resource
|
||||
private ProcessRouteTaskService processRouteTaskService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
*
|
||||
* @param query Query 查询实体
|
||||
* @return 所有数据
|
||||
*/
|
||||
@PostMapping("page")
|
||||
public ResultVO<IPage<ProcessRouteTaskVO>> selectAll(@RequestBody ProcessRouteTaskQuery query) {
|
||||
return ResultVO.success(processRouteTaskService.selectPageByCondition(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
* @param rowId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("detail/{rowId}")
|
||||
public ResultVO<ProcessRouteTaskVO> detail(@PathVariable Long rowId) {
|
||||
return ResultVO.success(processRouteTaskService.detail(rowId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.nflg.product.technology.mapper.master;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.nflg.product.technology.pojo.entity.MaterialMainEntity;
|
||||
import com.nflg.product.technology.pojo.vo.BaseMaterialVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* t_material_main 表数据库访问层
|
||||
* 物料主数据表
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-09 15:21:42
|
||||
*/
|
||||
public interface MaterialMainMapper extends BaseMapper<MaterialMainEntity> {
|
||||
|
||||
/**
|
||||
* 获取物料基本信息
|
||||
* @param materialNos
|
||||
* @return
|
||||
*/
|
||||
List<BaseMaterialVO> getMaterialBaseInfo(@Param("materialNos") List<String> materialNos);
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
package com.nflg.product.technology.mapper.master;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nflg.product.technology.pojo.entity.ProcessRouteTaskEntity;
|
||||
import com.nflg.product.technology.pojo.query.ProcessRouteTaskQuery;
|
||||
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
|
@ -13,4 +18,6 @@ import com.nflg.product.technology.pojo.entity.ProcessRouteTaskEntity;
|
|||
*/
|
||||
public interface ProcessRouteTaskMapper extends BaseMapper<ProcessRouteTaskEntity> {
|
||||
|
||||
IPage<ProcessRouteTaskVO> selectPageByCondition(Page<ProcessRouteTaskEntity> page, @Param("query") ProcessRouteTaskQuery query);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,395 @@
|
|||
package com.nflg.product.technology.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* t_material_main
|
||||
* 物料主数据表
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-09 15:22:20
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="com-nflg-product-bomnew-pojo-main-entity-MaterialMainEntity")
|
||||
@TableName(value = "t_material_main")
|
||||
public class MaterialMainEntity implements Serializable {
|
||||
|
||||
/**
|
||||
* 行ID 雪花
|
||||
*/
|
||||
@TableId(value = "row_id", type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "行ID 雪花")
|
||||
private Long rowId;
|
||||
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField(value = "material_no")
|
||||
@ApiModelProperty(value = "物料编码")
|
||||
private String materialNo;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField(value = "material_name")
|
||||
@ApiModelProperty(value = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 物料描述
|
||||
*/
|
||||
@TableField(value = "material_desc")
|
||||
@ApiModelProperty(value = "物料描述")
|
||||
private String materialDesc;
|
||||
|
||||
/**
|
||||
* 英文描述
|
||||
*/
|
||||
@TableField(value = "material_desc_en")
|
||||
@ApiModelProperty(value = "英文描述")
|
||||
private String materialDescEn;
|
||||
|
||||
/**
|
||||
* 物料描述(简写)
|
||||
*/
|
||||
@TableField(value = "short_material_desc")
|
||||
@ApiModelProperty(value = "物料描述(简写)")
|
||||
private String shortMaterialDesc;
|
||||
|
||||
/**
|
||||
* 物料规格
|
||||
*/
|
||||
@TableField(value = "material_specifications")
|
||||
@ApiModelProperty(value = "物料规格")
|
||||
private String materialSpecifications;
|
||||
|
||||
/**
|
||||
* 物料分类编码
|
||||
*/
|
||||
@TableField(value = "material_category_code")
|
||||
@ApiModelProperty(value = "物料分类编码")
|
||||
private String materialCategoryCode;
|
||||
|
||||
/**
|
||||
* 图号
|
||||
*/
|
||||
@TableField(value = "drawing_no")
|
||||
@ApiModelProperty(value = "图号")
|
||||
private String drawingNo;
|
||||
|
||||
/**
|
||||
* 重量-kg
|
||||
*/
|
||||
@TableField(value = "material_weight")
|
||||
@ApiModelProperty(value = "重量-kg")
|
||||
private String materialWeight;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
@TableField(value = "material_brand")
|
||||
@ApiModelProperty(value = "品牌")
|
||||
private String materialBrand;
|
||||
|
||||
/**
|
||||
* 基本计量单位
|
||||
*/
|
||||
@TableField(value = "material_unit")
|
||||
@ApiModelProperty(value = "基本计量单位")
|
||||
private String materialUnit;
|
||||
|
||||
/**
|
||||
* 辅助单位
|
||||
*/
|
||||
@TableField(value = "material_assist_unit")
|
||||
@ApiModelProperty(value = "辅助单位")
|
||||
private String materialAssistUnit;
|
||||
|
||||
/**
|
||||
* 该字段废除
|
||||
*/
|
||||
@TableField(value = "reuse_state")
|
||||
@ApiModelProperty(value = "该字段废除")
|
||||
private Integer reuseState;
|
||||
|
||||
/**
|
||||
* 预估年使用量
|
||||
*/
|
||||
@TableField(value = "use_of_year")
|
||||
@ApiModelProperty(value = "预估年使用量")
|
||||
private Integer useOfYear;
|
||||
|
||||
/**
|
||||
* 是否一次性使用物料 0:重复性使用物料;1:一次性使用物料
|
||||
*/
|
||||
@TableField(value = "reuse_of_once_state")
|
||||
@ApiModelProperty(value = "是否一次性使用物料 0:重复性使用物料;1:一次性使用物料")
|
||||
private Integer reuseOfOnceState;
|
||||
|
||||
/**
|
||||
* 是否标准件:0:否 1:是
|
||||
*/
|
||||
@TableField(value = "standard_state")
|
||||
@ApiModelProperty(value = "是否标准件:0:否 1:是")
|
||||
private Integer standardState;
|
||||
|
||||
/**
|
||||
* 物料类型:0:外购 1:自制
|
||||
*/
|
||||
@TableField(value = "material_type")
|
||||
@ApiModelProperty(value = "物料类型:0:外购 1:自制")
|
||||
private Integer materialType;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField(value = "remark")
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
@TableField(value = "material_texture")
|
||||
@ApiModelProperty(value = "材质")
|
||||
private String materialTexture;
|
||||
|
||||
/**
|
||||
* 两年出库量
|
||||
*/
|
||||
@TableField(value = "tow_year_lssl")
|
||||
@ApiModelProperty(value = "两年出库量")
|
||||
private BigDecimal towYearLssl;
|
||||
|
||||
/**
|
||||
* 四年出库量
|
||||
*/
|
||||
@TableField(value = "four_year_lssl")
|
||||
@ApiModelProperty(value = "四年出库量")
|
||||
private BigDecimal fourYearLssl;
|
||||
|
||||
/**
|
||||
* 两年出库天次
|
||||
*/
|
||||
@TableField(value = "tow_year_lssl_day")
|
||||
@ApiModelProperty(value = "两年出库天次")
|
||||
private Integer towYearLsslDay;
|
||||
|
||||
/**
|
||||
* 库存量
|
||||
*/
|
||||
@TableField(value = "material_stock")
|
||||
@ApiModelProperty(value = "库存量")
|
||||
private BigDecimal materialStock;
|
||||
|
||||
/**
|
||||
* 最近采购价格
|
||||
*/
|
||||
@TableField(value = "last_purchase_price")
|
||||
@ApiModelProperty(value = "最近采购价格")
|
||||
private BigDecimal lastPurchasePrice;
|
||||
|
||||
/**
|
||||
* 最近采购日期
|
||||
*/
|
||||
@TableField(value = "last_purchase_date")
|
||||
@ApiModelProperty(value = "最近采购日期")
|
||||
private LocalDate lastPurchaseDate;
|
||||
|
||||
/**
|
||||
* 最近出库时间
|
||||
*/
|
||||
@TableField(value = "last_out_warehouse_time")
|
||||
@ApiModelProperty(value = "最近出库时间")
|
||||
private LocalDateTime lastOutWarehouseTime;
|
||||
|
||||
/**
|
||||
* 订单保护价
|
||||
*/
|
||||
@TableField(value = "order_protect_price")
|
||||
@ApiModelProperty(value = "订单保护价")
|
||||
private BigDecimal orderProtectPrice;
|
||||
|
||||
/**
|
||||
* 配件销售价
|
||||
*/
|
||||
@TableField(value = "parts_sale_price")
|
||||
@ApiModelProperty(value = "配件销售价")
|
||||
private BigDecimal partsSalePrice;
|
||||
|
||||
/**
|
||||
* 物料状态 1:激活 2:禁止采购 3:售后专用 4:冻结 5:完全弃用
|
||||
*/
|
||||
@TableField(value = "material_state")
|
||||
@ApiModelProperty(value = "物料状态 1:激活 2:禁止采购 3:售后专用 4:冻结 5:完全弃用")
|
||||
private Integer materialState;
|
||||
|
||||
/**
|
||||
* 流程状态:0:待提交 2:已驳回 5: 变更申请中 10:OA审核中 15:已审核 100: 历史正式物料(已审核)
|
||||
*/
|
||||
@TableField(value = "process_state")
|
||||
@ApiModelProperty(value = "流程状态:0:待提交 2:已驳回 5: 变更申请中 10:OA审核中 15:已审核 100: 历史正式物料(已审核)")
|
||||
private Integer processState;
|
||||
|
||||
/**
|
||||
* 驳回人
|
||||
*/
|
||||
@TableField(value = "reject_user")
|
||||
@ApiModelProperty(value = "驳回人")
|
||||
private String rejectUser;
|
||||
|
||||
/**
|
||||
* 驳回原因
|
||||
*/
|
||||
@TableField(value = "reject_resion")
|
||||
@ApiModelProperty(value = "驳回原因")
|
||||
private String rejectResion;
|
||||
|
||||
/**
|
||||
* 使用说明
|
||||
*/
|
||||
@TableField(value = "use_remark")
|
||||
@ApiModelProperty(value = "使用说明")
|
||||
private String useRemark;
|
||||
|
||||
/**
|
||||
* 申请人(存中文名称)
|
||||
*/
|
||||
@TableField(value = "apply_user_code")
|
||||
@ApiModelProperty(value = "申请人(存中文名称)")
|
||||
private String applyUserCode;
|
||||
|
||||
/**
|
||||
* 申请部门
|
||||
*/
|
||||
@TableField(value = "apply_dept_name")
|
||||
@ApiModelProperty(value = "申请部门")
|
||||
private String applyDeptName;
|
||||
|
||||
/**
|
||||
* 变更审请人
|
||||
*/
|
||||
@TableField(value = "updated_by_user_code")
|
||||
@ApiModelProperty(value = "变更审请人")
|
||||
private String updatedByUserCode;
|
||||
|
||||
/**
|
||||
* 最近变更时间
|
||||
*/
|
||||
@TableField(value = "last_apply_time")
|
||||
@ApiModelProperty(value = "最近变更时间")
|
||||
private LocalDateTime lastApplyTime;
|
||||
|
||||
/**
|
||||
* 替代物料
|
||||
*/
|
||||
@TableField(value = "replace_material_no")
|
||||
@ApiModelProperty(value = "替代物料")
|
||||
private String replaceMaterialNo;
|
||||
|
||||
/**
|
||||
* 物料分类:0:非正式物料 1:正式物料
|
||||
*/
|
||||
@TableField(value = "material_class")
|
||||
@ApiModelProperty(value = "物料分类:0:非正式物料 1:正式物料")
|
||||
private Integer materialClass;
|
||||
|
||||
/**
|
||||
* 是否使用类别通用外形图:0=不使用、1=使用
|
||||
*/
|
||||
@TableField(value = "common_zero_file")
|
||||
@ApiModelProperty(value = "是否使用类别通用外形图:0=不使用、1=使用")
|
||||
private Integer commonZeroFile;
|
||||
|
||||
/**
|
||||
* 制作物料获取类型:1=自制、2=外协、3=采购
|
||||
*/
|
||||
@TableField(value = "material_get_type")
|
||||
@ApiModelProperty(value = "制作物料获取类型:1=自制、2=外协、3=采购")
|
||||
private Integer materialGetType;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "created_by")
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "created_time")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "updated_by")
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "updated_time")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
/**
|
||||
* 对应OA 的行ID
|
||||
*/
|
||||
@TableField(value = "oa_row_id")
|
||||
@ApiModelProperty(value = "对应OA 的行ID")
|
||||
private Long oaRowId;
|
||||
|
||||
/**
|
||||
* 采购类型
|
||||
*/
|
||||
@TableField(value = "procure_type")
|
||||
@ApiModelProperty(value = "采购类型")
|
||||
private String procureType;
|
||||
|
||||
/**
|
||||
* 项目类别(F、Q、L)
|
||||
*/
|
||||
@TableField(value = "project_type")
|
||||
@ApiModelProperty(value = "项目类别(F、Q、L)")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 冻结计算起始日期
|
||||
*/
|
||||
@TableField(value = "freeze_calc_start")
|
||||
@ApiModelProperty(value = "冻结计算起始日期")
|
||||
private LocalDate freezeCalcStart;
|
||||
|
||||
/**
|
||||
* 推荐度(0-5)
|
||||
*/
|
||||
@TableField(value = "recommend")
|
||||
@ApiModelProperty(value = "推荐度(0-5)")
|
||||
private Integer recommend;
|
||||
|
||||
/**
|
||||
* 物料分类
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private MaterialCategoryEntity materialCategory;
|
||||
|
||||
private static final long serialVersionUID = 550851863623524865L;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.nflg.product.technology.pojo.query;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProcessRouteTaskQuery {
|
||||
|
||||
private String createdTimeFrom;
|
||||
|
||||
private String createdTimeTo;
|
||||
|
||||
private String updatedTimeFrom;
|
||||
|
||||
private String updatedTimeTo;
|
||||
|
||||
private String materialNo;
|
||||
|
||||
private List<String> materialNoList;
|
||||
|
||||
private String createdBy;
|
||||
|
||||
private String updatedBy;
|
||||
|
||||
private String factory;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer usefulness;
|
||||
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "设置每页显示条数")
|
||||
private Long pageSize = 20L;
|
||||
|
||||
@ApiModelProperty(value = "当前页")
|
||||
private Long page = 1L;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.nflg.product.technology.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author 大米
|
||||
* @date 2023/11/9 15:03
|
||||
*/
|
||||
@Data
|
||||
public class BaseMaterialVO {
|
||||
|
||||
|
||||
@ApiModelProperty("物料主数据行ID")
|
||||
private Long materialRowId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
private String materialNo;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料描述")
|
||||
private String materialDesc;
|
||||
|
||||
@ApiModelProperty("物料分类编码")
|
||||
private String materialCategoryCode;
|
||||
|
||||
@ApiModelProperty("制作物料获取类型:1=自制、2=外协、3=采购")
|
||||
private Integer materialGetType;
|
||||
|
||||
@ApiModelProperty("项目类别(F、Q、L)")
|
||||
private String projectType;
|
||||
|
||||
@ApiModelProperty("采购类型")
|
||||
private String procureType;
|
||||
|
||||
@ApiModelProperty("物料状态 1:激活 2:禁止采购 3:售后专用 4:冻结 5:完全弃用")
|
||||
private Integer materialState;
|
||||
|
||||
@ApiModelProperty("图号")
|
||||
protected String drawingNo;
|
||||
|
||||
/**
|
||||
* 材料
|
||||
*/
|
||||
@ApiModelProperty(value = "材料")
|
||||
private String material;
|
||||
|
||||
@ApiModelProperty("材质")
|
||||
private String materialTexture;
|
||||
|
||||
@ApiModelProperty("物料大类别")
|
||||
private String relCategoryCode;
|
||||
@ApiModelProperty("物料分类编码名称")
|
||||
private String categoryName;
|
||||
|
||||
@ApiModelProperty("单位")
|
||||
private String materialUnit;
|
||||
@ApiModelProperty("单重")
|
||||
private BigDecimal materialWeight;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package com.nflg.product.technology.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工艺路线-组件分配
|
||||
* </p>
|
||||
*
|
||||
* @author 10001392
|
||||
* @since 2024-11-24
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProcessRouteTaskAssemblyVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long rowId;
|
||||
|
||||
// 任务清单ID
|
||||
private Long taskRowId;
|
||||
|
||||
// 虚拟装配:0=false、1=true
|
||||
private Integer virtualAssembly;
|
||||
|
||||
// PBOM父行ID
|
||||
private Long sourceRowId;
|
||||
|
||||
// 层
|
||||
private Integer level;
|
||||
|
||||
// 项目编号
|
||||
private String projectCode;
|
||||
|
||||
// 组件
|
||||
private String materialNo;
|
||||
|
||||
// 数量
|
||||
private BigDecimal num;
|
||||
|
||||
// 排序字符串
|
||||
private String sapOrderNum;
|
||||
|
||||
// 计量单位
|
||||
private String materialUnit;
|
||||
|
||||
// 项目类别
|
||||
private String projectType;
|
||||
|
||||
// 是否反冲:0=false、1=true
|
||||
private Integer recoil;
|
||||
|
||||
// 操作/活动
|
||||
private String processe;
|
||||
|
||||
// BOM表头物料
|
||||
private String parentMaterialNo;
|
||||
|
||||
// 有效起始日
|
||||
private LocalDateTime expireStartTime;
|
||||
|
||||
// 有效至
|
||||
private LocalDateTime expireEndTime;
|
||||
|
||||
// 删除标记:0=未删除、1=已删除
|
||||
private Integer delFlag;
|
||||
|
||||
// 创建人
|
||||
private String createdBy;
|
||||
|
||||
// 创建时间
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
// 更新人
|
||||
private String updatedBy;
|
||||
|
||||
// 更新时间
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
package com.nflg.product.technology.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工艺路线-工序
|
||||
* </p>
|
||||
*
|
||||
* @author 10001392
|
||||
* @since 2024-11-24
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProcessRouteTaskProcessesVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long rowId;
|
||||
|
||||
// 任务清单ID
|
||||
private Long taskRowId;
|
||||
|
||||
// 工序
|
||||
private String processe;
|
||||
|
||||
// 工作中心
|
||||
private String workCenter;
|
||||
|
||||
// 工厂编码
|
||||
private String factory;
|
||||
|
||||
// 控制码
|
||||
private String controlCode;
|
||||
|
||||
// 基本数量
|
||||
private Integer baseNum;
|
||||
|
||||
// 工序的计量单位(默认为PC,不可以编辑)
|
||||
private String materialUnit;
|
||||
|
||||
// 有效起始日
|
||||
private LocalDateTime expireStartTime;
|
||||
|
||||
// 有效至
|
||||
private LocalDateTime expireEndTime;
|
||||
|
||||
// 活动类型
|
||||
private String twoActivityType;
|
||||
|
||||
// 单位
|
||||
private String twoJobUnit;
|
||||
|
||||
// 机器(填写工时)
|
||||
private BigDecimal twoWorkHours;
|
||||
|
||||
// 活动类型
|
||||
private String oneActivityType;
|
||||
|
||||
// 单位
|
||||
private String oneJobUnit;
|
||||
|
||||
// 人工(填写工时)
|
||||
private BigDecimal oneWorkHours;
|
||||
|
||||
// 活动类型
|
||||
private String threeActivityType;
|
||||
|
||||
// 单位
|
||||
private String threeJobUnit;
|
||||
|
||||
// 固定(填写工时)
|
||||
private BigDecimal threeWorkHours;
|
||||
|
||||
// 活动类型
|
||||
private String fourActivityType;
|
||||
|
||||
// 单位
|
||||
private String fourJobUnit;
|
||||
|
||||
// 可变(填写工时)
|
||||
private BigDecimal fourWorkHours;
|
||||
|
||||
// 活动类型
|
||||
private String nonActivityType;
|
||||
|
||||
// 单位
|
||||
private String nonJobUnit;
|
||||
|
||||
// 排产(填写工时)
|
||||
private BigDecimal nonWorkHours;
|
||||
|
||||
// 删除标记:0=未删除、1=已删除
|
||||
private Integer delFlag;
|
||||
|
||||
// 创建人
|
||||
private String createdBy;
|
||||
|
||||
// 创建时间
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
// 更新人
|
||||
private String updatedBy;
|
||||
|
||||
// 更新时间
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.nflg.product.technology.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工艺路线-任务清单(抬头)
|
||||
* </p>
|
||||
*
|
||||
* @author 10001392
|
||||
* @since 2024-11-24
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProcessRouteTaskVO extends BaseMaterialVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long rowId;
|
||||
|
||||
// 工艺路线编号
|
||||
private String taskCode;
|
||||
|
||||
// 工厂编码
|
||||
private String factory;
|
||||
|
||||
// // 物料编码
|
||||
// private String materialNo;
|
||||
|
||||
// 任务清单描述
|
||||
private String description;
|
||||
|
||||
// 用途:1=生产 2=工程/设计 3=万能 4=工厂维护 5=货物接收 51=货物接收模型 53=GR外部处理 6= 货物发放 9=物料检验
|
||||
private Integer usefulness;
|
||||
|
||||
// 状态:1=生成的、2=对订单下达、3=对成本核算下达
|
||||
private Integer status;
|
||||
|
||||
// 从批量
|
||||
private String fromBatch;
|
||||
|
||||
// 到批量
|
||||
private String toBatch;
|
||||
|
||||
// 有效起始日
|
||||
private LocalDateTime expireStartTime;
|
||||
|
||||
// 有效至
|
||||
private LocalDateTime expireEndTime;
|
||||
|
||||
// 删除标记:0=未删除、1=已删除
|
||||
private Integer delFlag;
|
||||
|
||||
// 创建人
|
||||
private String createdBy;
|
||||
|
||||
// 创建时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
|
||||
private LocalDateTime createdTime;
|
||||
|
||||
// 更新人
|
||||
private String updatedBy;
|
||||
|
||||
// 更新时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT-8")
|
||||
private LocalDateTime updatedTime;
|
||||
|
||||
// 处理状态:1=修改中、2=暂存中、3=已完成
|
||||
private Integer handleState;
|
||||
|
||||
// SAP导入状态:1=已导入、2=未导入、3=异常、4=已修改(未导入)
|
||||
private Integer sapState;
|
||||
|
||||
// 物料数据 start
|
||||
// 物料数据 end
|
||||
|
||||
// 工序列表
|
||||
private List<ProcessRouteTaskProcessesVO> processesVOList;
|
||||
|
||||
// 组件分配列表
|
||||
private List<ProcessRouteTaskAssemblyVO> assemblyVOList;
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
package com.nflg.product.technology.service;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nflg.product.technology.mapper.master.MaterialMainMapper;
|
||||
import com.nflg.product.technology.pojo.entity.MaterialMainEntity;
|
||||
import com.nflg.product.technology.pojo.vo.BaseMaterialVO;
|
||||
import com.nflg.product.technology.util.ListCommonUtil;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* t_material_main 表服务实现类
|
||||
* 物料主数据表
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2023-11-09 15:21:42
|
||||
*/
|
||||
@Service
|
||||
public class MaterialMainService extends ServiceImpl<MaterialMainMapper, MaterialMainEntity> {
|
||||
/**
|
||||
* 获取物料信息
|
||||
*
|
||||
* @param materialNos
|
||||
* @return
|
||||
*/
|
||||
public List<BaseMaterialVO> getMaterialBaseInfo(@Param("materialNos") List<String> materialNos) {
|
||||
return this.getBaseMapper().getMaterialBaseInfo(materialNos);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化物料基本信息
|
||||
*
|
||||
* @param data
|
||||
* @param <T>
|
||||
*/
|
||||
public <T extends BaseMaterialVO> void intiMaterialInfo(List<T> data) {
|
||||
List<String> materialNos = data.stream().filter(u -> StrUtil.isNotBlank(u.getMaterialNo())).map(u -> u.getMaterialNo()).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
List<BaseMaterialVO> materialBaseInfos = SpringUtil.getBean(MaterialMainService.class).getMaterialBaseInfo(materialNos);
|
||||
Map<String, BaseMaterialVO> materialMp = ListCommonUtil.listToMap(materialBaseInfos, BaseMaterialVO::getMaterialNo);
|
||||
for (T t : data) {
|
||||
if (StrUtil.isNotBlank(t.getMaterialNo()) && materialMp.containsKey(t.getMaterialNo())) {
|
||||
BeanUtil.copyProperties(materialMp.get(t.getMaterialNo()), t, "material", "materialTexture");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public <T extends BaseMaterialVO> List<BaseMaterialVO> intiMaterialInfo(List<T> data, String... ignorePropertyList) {
|
||||
List<String> materialNos = data.stream().map(BaseMaterialVO::getMaterialNo).filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
List<BaseMaterialVO> materialBaseInfos = SpringUtil.getBean(MaterialMainService.class).getMaterialBaseInfo(materialNos);
|
||||
intiMaterialInfo(data, materialBaseInfos, ignorePropertyList);
|
||||
return materialBaseInfos;
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
public <T extends BaseMaterialVO> void intiMaterialInfo(List<T> data ,List<BaseMaterialVO> materialBaseInfos, String ... ignorePropertyList) {
|
||||
List<String> materialNos = data.stream().map(BaseMaterialVO::getMaterialNo).filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(materialNos)) {
|
||||
Map<String, BaseMaterialVO> materialMp = ListCommonUtil.listToMap(materialBaseInfos, BaseMaterialVO::getMaterialNo);
|
||||
for (T t : data) {
|
||||
if (StrUtil.isNotBlank(t.getMaterialNo()) && materialMp.containsKey(t.getMaterialNo())) {
|
||||
BeanUtil.copyProperties(materialMp.get(t.getMaterialNo()), t, ignorePropertyList);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +1,30 @@
|
|||
package com.nflg.product.technology.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||
import com.nflg.product.base.core.vo.PageVO;
|
||||
import com.nflg.product.technology.mapper.master.ProcessRouteTaskAssemblyMapper;
|
||||
import com.nflg.product.technology.mapper.master.ProcessRouteTaskMapper;
|
||||
import com.nflg.product.technology.mapper.master.ProcessRouteTaskProcessesMapper;
|
||||
import com.nflg.product.technology.pojo.entity.ProcessRouteTaskAssemblyEntity;
|
||||
import com.nflg.product.technology.pojo.entity.ProcessRouteTaskEntity;
|
||||
import com.nflg.product.technology.pojo.entity.ProcessRouteTaskProcessesEntity;
|
||||
import com.nflg.product.technology.pojo.query.ProcessRouteTaskQuery;
|
||||
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskAssemblyVO;
|
||||
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskProcessesVO;
|
||||
import com.nflg.product.technology.pojo.vo.ProcessRouteTaskVO;
|
||||
import nflg.product.common.constant.STATE;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 工艺路线-任务清单(抬头) 服务类
|
||||
|
|
@ -16,4 +36,49 @@ import org.springframework.stereotype.Service;
|
|||
@Service
|
||||
public class ProcessRouteTaskService extends ServiceImpl<ProcessRouteTaskMapper, ProcessRouteTaskEntity> {
|
||||
|
||||
@Resource
|
||||
private ProcessRouteTaskProcessesService processRouteTaskProcessesService;
|
||||
@Resource
|
||||
private ProcessRouteTaskAssemblyService processRouteTaskAssemblyService;
|
||||
@Resource
|
||||
private MaterialMainService materialMainService;
|
||||
@Resource
|
||||
private ProcessRouteTaskMapper processRouteTaskMapper;
|
||||
@Resource
|
||||
private ProcessRouteTaskProcessesMapper processRouteTaskProcessesMapper;
|
||||
@Resource
|
||||
private ProcessRouteTaskAssemblyMapper processRouteTaskAssemblyMapper;
|
||||
|
||||
public IPage<ProcessRouteTaskVO> selectPageByCondition(ProcessRouteTaskQuery query) {
|
||||
//设置分页
|
||||
Page<ProcessRouteTaskEntity> pageCondition = new PageVO<>(query.getPage(), query.getPageSize());
|
||||
IPage<ProcessRouteTaskVO> iPage = processRouteTaskMapper.selectPageByCondition(pageCondition, query);
|
||||
if (CollUtil.isNotEmpty(iPage.getRecords())) {
|
||||
materialMainService.intiMaterialInfo(iPage.getRecords(), "");
|
||||
}
|
||||
return iPage;
|
||||
}
|
||||
|
||||
public ProcessRouteTaskVO detail(Long rowId) {
|
||||
if (ObjectUtil.isEmpty(rowId)) {
|
||||
throw new NflgBusinessException(STATE.ParamErr, "参数ID不能为空");
|
||||
}
|
||||
ProcessRouteTaskEntity processRouteTaskEntity = processRouteTaskMapper.selectById(rowId);
|
||||
if (ObjectUtil.isEmpty(processRouteTaskEntity)) {
|
||||
return null;
|
||||
}
|
||||
ProcessRouteTaskVO processRouteTaskVO = Convert.convert(ProcessRouteTaskVO.class, processRouteTaskEntity);
|
||||
if (ObjectUtil.isNotEmpty(processRouteTaskVO)) {
|
||||
materialMainService.intiMaterialInfo(Collections.singletonList(processRouteTaskVO), "");
|
||||
}
|
||||
List<ProcessRouteTaskProcessesEntity> taskProcessesEntityList = processRouteTaskProcessesService.lambdaQuery().eq(ProcessRouteTaskProcessesEntity::getTaskRowId, rowId).list();
|
||||
if (ObjectUtil.isNotEmpty(taskProcessesEntityList)) {
|
||||
processRouteTaskVO.setProcessesVOList(Convert.toList(ProcessRouteTaskProcessesVO.class, taskProcessesEntityList));
|
||||
}
|
||||
List<ProcessRouteTaskAssemblyEntity> taskAssemblyEntityList = processRouteTaskAssemblyService.lambdaQuery().eq(ProcessRouteTaskAssemblyEntity::getTaskRowId, rowId).list();
|
||||
if (ObjectUtil.isNotEmpty(taskAssemblyEntityList)) {
|
||||
processRouteTaskVO.setAssemblyVOList(Convert.toList(ProcessRouteTaskAssemblyVO.class, taskAssemblyEntityList));
|
||||
}
|
||||
return processRouteTaskVO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,85 @@
|
|||
package com.nflg.product.technology.util;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* lsit 工具类
|
||||
*
|
||||
* @Author 大米
|
||||
* @Date 2022-11-08
|
||||
*/
|
||||
public class ListCommonUtil extends ListUtil {
|
||||
|
||||
|
||||
/**
|
||||
* list 转map
|
||||
*
|
||||
* @param list
|
||||
* @param function
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T, R> Map<R, T> listToMap(List<T> list, Function<T, R> function) {
|
||||
if (list==null || list.size() <= 0) {
|
||||
return new HashMap<R, T>(1);
|
||||
}
|
||||
return list.stream().collect(Collectors.toMap(function, Function.identity(), (k1, k2) -> k1));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* list 转map
|
||||
*
|
||||
* @param list
|
||||
* @param keyFunction
|
||||
* @param valueFunction
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T, R, R2> Map<R, R2> listToMap(List<T> list, Function<T, R> keyFunction, Function<T, R2> valueFunction) {
|
||||
if (list.size() <= 0) {
|
||||
return new HashMap<R, R2>(1);
|
||||
}
|
||||
return list.stream().collect(Collectors.toMap(keyFunction, valueFunction));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static <T, R> Map<R, List<T>> listGroupMap(List<T> list, Function<T, R> function) {
|
||||
if (list.size() <= 0) {
|
||||
return new HashMap<R, List<T>>(1);
|
||||
}
|
||||
return list.stream().collect(Collectors.groupingBy(function));
|
||||
}
|
||||
|
||||
/**
|
||||
* 去重
|
||||
* @param list
|
||||
* @param identityFunc
|
||||
* @return
|
||||
* @param <T>
|
||||
* @param <R>
|
||||
*/
|
||||
public static <T,R> List<T> toDistinct(List<T> list, Function<T, R> identityFunc){
|
||||
List<T> result = new ArrayList<>();
|
||||
Map<R,String> fidler=new HashMap<>();
|
||||
list.forEach(k->{
|
||||
if(!fidler.containsKey(identityFunc.apply(k))){
|
||||
result.add(k);
|
||||
fidler.put(identityFunc.apply(k),"1");
|
||||
}
|
||||
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nflg.product.bomnew.mapper.master.MaterialMainMapper">
|
||||
<resultMap id="BaseResultMap" type="com.nflg.product.technology.pojo.entity.MaterialMainEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table t_material_main -->
|
||||
<id column="row_id" property="rowId" jdbcType="BIGINT"/>
|
||||
<result column="material_no" property="materialNo" jdbcType="VARCHAR"/>
|
||||
<result column="material_name" property="materialName" jdbcType="VARCHAR"/>
|
||||
<result column="material_desc" property="materialDesc" jdbcType="VARCHAR"/>
|
||||
<result column="short_material_desc" property="shortMaterialDesc" jdbcType="VARCHAR"/>
|
||||
<result column="material_specifications" property="materialSpecifications" jdbcType="VARCHAR"/>
|
||||
<result column="material_category_code" property="materialCategoryCode" jdbcType="VARCHAR"/>
|
||||
<result column="drawing_no" property="drawingNo" jdbcType="VARCHAR"/>
|
||||
<result column="material_weight" property="materialWeight" jdbcType="VARCHAR"/>
|
||||
<result column="material_brand" property="materialBrand" jdbcType="VARCHAR"/>
|
||||
<result column="material_unit" property="materialUnit" jdbcType="VARCHAR"/>
|
||||
<result column="material_assist_unit" property="materialAssistUnit" jdbcType="VARCHAR"/>
|
||||
<result column="reuse_state" property="reuseState" jdbcType="INTEGER"/>
|
||||
<result column="use_of_year" property="useOfYear" jdbcType="INTEGER"/>
|
||||
<result column="reuse_of_once_state" property="reuseOfOnceState" jdbcType="INTEGER"/>
|
||||
<result column="standard_state" property="standardState" jdbcType="INTEGER"/>
|
||||
<result column="material_type" property="materialType" jdbcType="INTEGER"/>
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR"/>
|
||||
<result column="material_texture" property="materialTexture" jdbcType="VARCHAR"/>
|
||||
<result column="tow_year_lssl" property="towYearLssl" jdbcType="DECIMAL"/>
|
||||
<result column="four_year_lssl" property="fourYearLssl" jdbcType="DECIMAL"/>
|
||||
<result column="tow_year_lssl_day" property="towYearLsslDay" jdbcType="INTEGER"/>
|
||||
<result column="material_stock" property="materialStock" jdbcType="DECIMAL"/>
|
||||
<result column="last_purchase_price" property="lastPurchasePrice" jdbcType="DECIMAL"/>
|
||||
<result column="last_purchase_date" property="lastPurchaseDate" jdbcType="DATE"/>
|
||||
<result column="last_out_warehouse_time" property="lastOutWarehouseTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="order_protect_price" property="orderProtectPrice" jdbcType="DECIMAL"/>
|
||||
<result column="parts_sale_price" property="partsSalePrice" jdbcType="DECIMAL"/>
|
||||
<result column="material_state" property="materialState" jdbcType="INTEGER"/>
|
||||
<result column="process_state" property="processState" jdbcType="INTEGER"/>
|
||||
<result column="reject_user" property="rejectUser" jdbcType="VARCHAR"/>
|
||||
<result column="reject_resion" property="rejectResion" jdbcType="VARCHAR"/>
|
||||
<result column="use_remark" property="useRemark" jdbcType="VARCHAR"/>
|
||||
<result column="apply_user_code" property="applyUserCode" jdbcType="VARCHAR"/>
|
||||
<result column="apply_dept_name" property="applyDeptName" jdbcType="VARCHAR"/>
|
||||
<result column="updated_by_user_code" property="updatedByUserCode" jdbcType="VARCHAR"/>
|
||||
<result column="last_apply_time" property="lastApplyTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="replace_material_no" property="replaceMaterialNo" jdbcType="VARCHAR"/>
|
||||
<result column="material_class" property="materialClass" jdbcType="INTEGER"/>
|
||||
<result column="common_zero_file" property="commonZeroFile" jdbcType="INTEGER"/>
|
||||
<result column="material_get_type" property="materialGetType" jdbcType="INTEGER"/>
|
||||
<result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
|
||||
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR"/>
|
||||
<result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="oa_row_id" property="oaRowId" jdbcType="BIGINT"/>
|
||||
<result column="procure_type" property="procureType" jdbcType="VARCHAR"/>
|
||||
<result column="project_type" property="projectType" jdbcType="VARCHAR"/>
|
||||
<result column="freeze_calc_start" property="freezeCalcStart" jdbcType="DATE"/>
|
||||
<result column="recommend" property="recommend" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
row_id, material_no, material_name, material_desc, short_material_desc, material_specifications,
|
||||
material_category_code, drawing_no, material_weight, material_brand, material_unit, material_assist_unit,
|
||||
reuse_state, use_of_year, reuse_of_once_state, standard_state, material_type, remark, material_texture,
|
||||
tow_year_lssl, four_year_lssl, tow_year_lssl_day, material_stock, last_purchase_price, last_purchase_date,
|
||||
last_out_warehouse_time, order_protect_price, parts_sale_price, material_state, process_state, reject_user,
|
||||
reject_resion, use_remark, apply_user_code, apply_dept_name, updated_by_user_code, last_apply_time,
|
||||
replace_material_no, material_class, common_zero_file, material_get_type, created_by, created_time, updated_by,
|
||||
updated_time, oa_row_id, procure_type, project_type, freeze_calc_start, recommend
|
||||
</sql>
|
||||
|
||||
<select id="getMaterialBaseInfo" resultType="com.nflg.product.technology.pojo.vo.BaseMaterialVO">
|
||||
select a.row_id as materialRowId, material_no, material_name, material_desc, procure_type, project_type, material_state,drawing_no,a.material_category_code ,material_get_type,drawing_no
|
||||
,material_texture as material ,material_texture ,material_weight,b.rel_category_code,b.category_name,material_unit
|
||||
from t_material_main a join t_material_category b on a.material_category_code=b.category_code
|
||||
where material_no in
|
||||
<foreach collection="materialNos" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -2,4 +2,55 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.nflg.product.technology.mapper.master.ProcessRouteTaskMapper">
|
||||
|
||||
<sql id="base_column_list">
|
||||
row_id,task_code, factory, material_no, description, usefulness, status, from_batch,
|
||||
to_batch, expire_start_time, expire_end_time, del_flag, created_by, created_time, updated_by,
|
||||
updated_time, handle_status, sap_state
|
||||
</sql>
|
||||
|
||||
<select id="selectPageByCondition" resultType="com.nflg.product.technology.pojo.vo.ProcessRouteTaskVO">
|
||||
select
|
||||
<include refid="base_column_list"/>
|
||||
from t_process_route_task
|
||||
<include refid="where_whr"/>
|
||||
</select>
|
||||
|
||||
<sql id="where_whr">
|
||||
<where>
|
||||
<if test="query.materialNoList != null and query.materialNoList.size > 0">
|
||||
AND material_no IN
|
||||
<foreach collection="query.materialNoList" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="query.materialNo != null and query.materialNo != ''">
|
||||
AND material_no = #{query.material_no}
|
||||
</if>
|
||||
<if test="query.factory != null and query.factory != ''">
|
||||
AND factory = #{query.factory}
|
||||
</if>
|
||||
<if test="query.createdTimeFrom != null and query.createdTimeFrom != ''">
|
||||
AND created_time <![CDATA[ >= ]]> #{query.createdTimeFrom}
|
||||
</if>
|
||||
<if test="query.createdTimeTo != null and query.createdTimeTo != ''">
|
||||
AND created_time <![CDATA[ <= ]]> #{query.createdTimeTo}
|
||||
</if>
|
||||
<if test="query.createdBy != null and query.createdBy != ''">
|
||||
AND created_by LIKE concat('%', #{query.createdBy}, '%')
|
||||
</if>
|
||||
<if test="query.updatedTimeFrom != null and query.updatedTimeFrom != ''">
|
||||
AND updated_time <![CDATA[ >= ]]> #{query.updatedTimeFrom}
|
||||
</if>
|
||||
<if test="query.updatedTimeTo != null and query.updatedTimeTo != ''">
|
||||
AND updated_time <![CDATA[ <= ]]> #{query.updatedTimeTo}
|
||||
</if>
|
||||
<if test="query.updatedBy != null and query.updatedBy != ''">
|
||||
AND updated_by LIKE concat('%', #{query.updatedBy}, '%')
|
||||
</if>
|
||||
<if test="query.delFlag != null">
|
||||
AND del_flag = #{delFlag}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue