Procházet zdrojové kódy

完成工装管理和原材料管理功能模块

oyq28 před 4 roky
rodič
revize
7ea79336bd
15 změnil soubory, kde provedl 839 přidání a 5 odebrání
  1. 2 2
      imcs-admin-boot/imcs-authority-biz/src/main/java/com/github/zuihou/authority/service/auth/impl/MenuServiceImpl.java
  2. 28 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/dao/MToolClampMapper.java
  3. 54 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/MToolClampService.java
  4. 74 0
      imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/MToolClampServiceImpl.java
  5. 40 0
      imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/MToolClampMapper.xml
  6. 5 1
      imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/MToolMeterialMapper.xml
  7. 105 0
      imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionReadyCenter/MToolClampController.java
  8. 99 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampPageDTO.java
  9. 99 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampSaveDTO.java
  10. 104 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampUpdateDTO.java
  11. 12 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolMeterialPageDTO.java
  12. 12 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolMeterialSaveDTO.java
  13. 12 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolMeterialUpdateDTO.java
  14. 169 0
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/MToolClamp.java
  15. 24 2
      imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/MToolMeterial.java

+ 2 - 2
imcs-admin-boot/imcs-authority-biz/src/main/java/com/github/zuihou/authority/service/auth/impl/MenuServiceImpl.java

@@ -138,11 +138,11 @@ public class MenuServiceImpl extends SuperCacheServiceImpl<MenuMapper, Menu> imp
         menu.setIsEnable(Convert.toBool(menu.getIsEnable(), true));
         menu.setIsPublic(Convert.toBool(menu.getIsPublic(), false));
         menu.setParentId(Convert.toLong(menu.getParentId(), DEF_PARENT_ID));
-        save(menu);
+        boolean bool = save(menu);
 
         if (menu.getIsPublic()) {
             cacheChannel.evict(CacheKey.USER_MENU);
         }
-        return true;
+        return bool;
     }
 }

+ 28 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/dao/MToolClampMapper.java

@@ -0,0 +1,28 @@
+package com.github.zuihou.business.productionReadyCenter.dao;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.github.zuihou.base.mapper.SuperMapper;
+import com.github.zuihou.business.productionReadyCenter.entity.MToolClamp;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+/**
+ * <p>
+ * Mapper 接口
+ * 工装夹具
+ * </p>
+ *
+ * @author imcs
+ * @date 2020-11-19
+ */
+@Repository
+public interface MToolClampMapper extends SuperMapper<MToolClamp> {
+
+    /**
+     * 分页
+     */
+    IPage<MToolClamp> pageList(IPage page, @Param(Constants.WRAPPER) Wrapper<MToolClamp> queryWrapper);
+
+}

+ 54 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/MToolClampService.java

@@ -0,0 +1,54 @@
+package com.github.zuihou.business.productionReadyCenter.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.service.SuperService;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampSaveDTO;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampUpdateDTO;
+import com.github.zuihou.business.productionReadyCenter.entity.MToolClamp;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+
+/**
+ * <p>
+ * 业务接口
+ * 工装夹具
+ * </p>
+ *
+ * @author imcs
+ * @date 2020-11-19
+ */
+public interface MToolClampService extends SuperService<MToolClamp> {
+
+    /**
+     * 分页
+     */
+    IPage<MToolClamp> pageList(IPage page, LbqWrapper<MToolClamp> wrapper);
+    /**
+     * 检测 工装夹具是否存在
+     *
+     * @param
+     * @return
+     */
+    boolean check(MToolClampSaveDTO model);
+
+    /**
+     * 保存
+     *
+     * @param data
+     * @return
+     */
+    MToolClamp save(MToolClampSaveDTO data);
+
+    /**
+     * 修改
+     */
+    MToolClamp update(MToolClampUpdateDTO data);
+
+    /**
+     * 删除租户数据
+     *
+     * @param
+     * @return
+     */
+    Boolean delete(MToolClamp model);
+
+}

+ 74 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/MToolClampServiceImpl.java

@@ -0,0 +1,74 @@
+package com.github.zuihou.business.productionReadyCenter.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.service.SuperServiceImpl;
+import com.github.zuihou.business.productionReadyCenter.dao.MToolClampMapper;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampSaveDTO;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampUpdateDTO;
+import com.github.zuihou.business.productionReadyCenter.entity.MToolClamp;
+import com.github.zuihou.business.productionReadyCenter.service.MToolClampService;
+import com.github.zuihou.common.constant.CodeRuleModule;
+import com.github.zuihou.database.mybatis.conditions.Wraps;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.injection.annonation.InjectionResult;
+import com.github.zuihou.tenant.service.CodeRuleService;
+import com.github.zuihou.utils.BeanPlusUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * <p>
+ * 业务实现类
+ * 工装夹具
+ * </p>
+ *
+ * @author imcs
+ * @date 2020-11-19
+ */
+@Slf4j
+@Service
+public class MToolClampServiceImpl extends SuperServiceImpl<MToolClampMapper, MToolClamp> implements MToolClampService {
+
+    @Autowired
+    private CodeRuleService codeRuleService;
+
+    @Override
+    // 启用属性自动注入
+    @InjectionResult
+    public IPage<MToolClamp> pageList(IPage page, LbqWrapper<MToolClamp> wrapper) {
+        return baseMapper.pageList(page, wrapper);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public MToolClamp save(MToolClampSaveDTO data) {
+        //验证名称是否重复
+        //isFalse(check(data), "编码重复,请重新输入");
+        MToolClamp module = BeanPlusUtil.toBean(data, MToolClamp.class);
+        String no = codeRuleService.getBillCode(CodeRuleModule.CODE_RULE_METERIAL);
+        module.setNo(no);
+        save(module);
+        return module;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public MToolClamp update(MToolClampUpdateDTO data) {
+        MToolClamp module = BeanPlusUtil.toBean(data, MToolClamp.class);
+        updateById(module);
+        return module;
+    }
+
+    @Override
+    public boolean check(MToolClampSaveDTO model) {
+        return super.count(Wraps.<MToolClamp>lbQ().eq(MToolClamp::getNo, model.getNo())) > 0;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(MToolClamp model) {
+        return removeById(model);
+    }
+}

+ 40 - 0
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/MToolClampMapper.xml

@@ -0,0 +1,40 @@
+<?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.github.zuihou.business.productionReadyCenter.dao.MToolClampMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.github.zuihou.business.productionReadyCenter.entity.MToolClamp">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="create_user" jdbcType="BIGINT" property="createUser"/>
+        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="update_user" jdbcType="BIGINT" property="updateUser"/>
+        <result column="no" jdbcType="VARCHAR" property="no"/>
+        <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="model" jdbcType="VARCHAR" property="model"/>
+        <result column="category" jdbcType="VARCHAR" property="category"/>
+        <result column="brand" jdbcType="VARCHAR" property="brand"/>
+        <result column="map_no" jdbcType="VARCHAR" property="mapNo"/>
+        <result column="period" jdbcType="INTEGER" property="period"/>
+        <result column="expiry_date" jdbcType="INTEGER" property="expiryDate"/>
+        <result column="num" jdbcType="INTEGER" property="num"/>
+        <result column="join_date" jdbcType="VARCHAR" property="joinDate"/>
+        <result column="material_type" jdbcType="VARCHAR" property="materialType"/>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id,create_time,create_user,update_time,update_user,join_date,
+        no, name, status, model, category, brand,map_no,period,expiry_date,num,material_type
+    </sql>
+
+    <!-- 分页 -->
+    <select id="pageList" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from imcs_m_frock_clamp s ${ew.customSqlSegment}
+    </select>
+
+
+</mapper>

+ 5 - 1
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/MToolMeterialMapper.xml

@@ -15,12 +15,16 @@
         <result column="model" jdbcType="VARCHAR" property="model"/>
         <result column="category" jdbcType="VARCHAR" property="category"/>
         <result column="brand" jdbcType="VARCHAR" property="brand"/>
+        <result column="brand" jdbcType="VARCHAR" property="brand"/>
+        <result column="heat_no" jdbcType="VARCHAR" property="heatNo"/>
+        <result column="material_no" jdbcType="VARCHAR" property="materialNo"/>
+        <result column="join_date" jdbcType="VARCHAR" property="joinDate"/>
         <result column="material_type" jdbcType="VARCHAR" property="materialType"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,create_time,create_user,update_time,update_user,
+        id,create_time,create_user,update_time,update_user,heat_no,material_no,join_date,
         no, name, status, model, category, brand,specification,material_type
     </sql>
 

+ 105 - 0
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionReadyCenter/MToolClampController.java

@@ -0,0 +1,105 @@
+package com.github.zuihou.business.controller.productionReadyCenter;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.zuihou.base.R;
+import com.github.zuihou.base.controller.SuperController;
+import com.github.zuihou.base.request.PageParams;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampPageDTO;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampSaveDTO;
+import com.github.zuihou.business.productionReadyCenter.dto.MToolClampUpdateDTO;
+import com.github.zuihou.business.productionReadyCenter.entity.MToolClamp;
+import com.github.zuihou.business.productionReadyCenter.service.MToolClampService;
+import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
+import com.github.zuihou.log.annotation.SysLog;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+
+/**
+ * <p>
+ * 前端控制器
+ * 工装夹具
+ * </p>
+ *
+ * @author imcs
+ * @date 2020-11-19
+ */
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/mToolClamp")
+@Api(value = "MToolClamp", tags = "工装夹具")
+@SysLog(enabled = true)
+public class MToolClampController extends SuperController<MToolClampService, Long, MToolClamp, MToolClampPageDTO, MToolClampSaveDTO, MToolClampUpdateDTO> {
+
+    @Override
+    public void query(PageParams<MToolClampPageDTO> params, IPage<MToolClamp> page, Long defSize) {
+
+        MToolClampPageDTO data = params.getModel();
+        QueryWrap<MToolClamp> wrap = handlerWrapper(null, params);
+        LbqWrapper<MToolClamp> wrapper = wrap.lambda();
+
+        MToolClamp module = BeanUtil.toBean(data, MToolClamp.class);
+        wrapper.like(MToolClamp::getName, module.getName())
+                .eq(MToolClamp::getStatus, module.getStatus())
+                .eq(MToolClamp::getBrand, module.getBrand())
+                .eq(MToolClamp::getCategory, module.getCategory() )
+                .like(MToolClamp::getModel,module.getModel())
+                .orderByDesc(MToolClamp::getCreateTime);
+        IPage<MToolClamp> list= baseService.pageList(page, wrapper);
+        //取出分页里面得数据
+        List<MToolClamp> l = list.getRecords();
+        //取出IDList
+        List<Long> idList = l.stream().map(p -> p.getId()).collect(Collectors.toList());
+    }
+
+    @ApiOperation(value = "查询所有工装夹具", notes = "查询所有工装夹具")
+    @PostMapping("/all")
+    public R<List<MToolClamp>> list(@ApiParam(name="工装夹具对象",value="传入json格式",required = true)
+                                 @RequestBody(required = true) MToolClamp bean) {
+        return success(baseService.list());
+    }
+
+    @Override
+    public R<MToolClamp> handlerSave(MToolClampSaveDTO model) {
+        // 设置未同步
+        model.setSynFlag(0);
+        MToolClamp mToolClamp = baseService.save(model);
+        return success(mToolClamp);
+    }
+
+    @ApiOperation(value = "修改工装夹具", notes = "修改工装夹具")
+    @PostMapping("/update")
+    public R<MToolClamp> update(MToolClampUpdateDTO model) {
+        // 设置未同步
+        model.setSynFlag(0);
+        MToolClamp mToolClamp = baseService.update(model);
+        return success(mToolClamp);
+    }
+
+    @ApiOperation(value = "检测工装夹具是否存在", notes = "检测工装夹具是否存在")
+    @PostMapping("/check/")
+    public R<Boolean> check(MToolClampSaveDTO model) {
+        return success(baseService.check(model));
+    }
+
+
+    @ApiOperation(value = "删除工装夹具", notes = "删除工装夹具")
+    @PostMapping("/delete")
+    public R<Boolean> delete(MToolClamp model) {
+        // 这个操作相当的危险,请谨慎操作!!!
+        return success(baseService.delete(model));
+    }
+}

+ 99 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampPageDTO.java

@@ -0,0 +1,99 @@
+package com.github.zuihou.business.productionReadyCenter.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.github.zuihou.model.RemoteData;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotEmpty;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 实体类
+ * 工装夹具
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-19
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "MToolClampPageDTO", description = "工装夹具")
+public class MToolClampPageDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    @ApiModelProperty(value = "编号")
+    @Length(max = 256, message = "编号长度不能超过256")
+    private String no;
+    /**
+     * 模型名称
+     */
+    @ApiModelProperty(value = "模型名称")
+    @NotEmpty(message = "模型名称不能为空")
+    @Length(max = 128, message = "模型名称长度不能超过128")
+    private String name;
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+    /**
+     * 型号
+     */
+    @ApiModelProperty(value = "型号")
+    @Length(max = 128, message = "型号长度不能超过128")
+    private String model;
+    /**
+     * 分类
+     */
+    @ApiModelProperty(value = "分类")
+    @Length(max = 50, message = "分类长度不能超过50")
+    private RemoteData<String, String> category;
+    /**
+     * 品牌
+     */
+    @ApiModelProperty(value = "品牌")
+    @Length(max = 255, message = "品牌长度不能超过255")
+    private RemoteData<String, String> brand;
+
+    @ApiModelProperty(value = "图号")
+    @Length(max = 255, message = "图号长度不能超过255")
+    private String mapNo;
+
+    @ApiModelProperty(value = "有效期(月)")
+    private Integer expiryDate;
+
+    @ApiModelProperty(value = "周期(月)")
+    private Integer period;
+
+    @ApiModelProperty(value = "数量")
+    private Integer num;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    private String joinDate;
+
+    /**
+     * 物料类型
+     */
+    @ApiModelProperty(value = "物料类型")
+    private RemoteData<String, String> materialType;
+
+    @ApiModelProperty(value = "同步状态 0:未同步 1:已同步")
+    private Integer synFlag;
+
+}

+ 99 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampSaveDTO.java

@@ -0,0 +1,99 @@
+package com.github.zuihou.business.productionReadyCenter.dto;
+
+import com.github.zuihou.model.RemoteData;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotEmpty;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ * 实体类
+ * 工具原材料
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-19
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "MToolClampSaveDTO", description = "工装夹具")
+public class MToolClampSaveDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    @ApiModelProperty(value = "编号")
+    @Length(max = 256, message = "编号长度不能超过256")
+    private String no;
+    /**
+     * 模型名称
+     */
+    @ApiModelProperty(value = "模型名称")
+    @NotEmpty(message = "模型名称不能为空")
+    @Length(max = 128, message = "模型名称长度不能超过128")
+    private String name;
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+    /**
+     * 型号
+     */
+    @ApiModelProperty(value = "型号")
+    @Length(max = 128, message = "型号长度不能超过128")
+    private String model;
+    /**
+     * 分类
+     */
+    @ApiModelProperty(value = "分类")
+    @Length(max = 50, message = "分类长度不能超过50")
+    private RemoteData<String, String> category;
+    /**
+     * 品牌
+     */
+    @ApiModelProperty(value = "品牌")
+    @Length(max = 255, message = "品牌长度不能超过255")
+    private RemoteData<String, String> brand;
+
+    /**
+     * 物料类型(10-原料 20-成品)
+     */
+    @ApiModelProperty(value = "物料类型(10-原料 20-成品)")
+    private RemoteData<String, String> materialType;
+
+    @ApiModelProperty(value = "图号")
+    @Length(max = 255, message = "图号长度不能超过255")
+    private String mapNo;
+
+    @ApiModelProperty(value = "有效期(月)")
+    private Integer expiryDate;
+
+    @ApiModelProperty(value = "周期(月)")
+    private Integer period;
+
+    @ApiModelProperty(value = "数量")
+    private Integer num;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过255")
+    private String joinDate;
+
+    @ApiModelProperty(value = "同步状态 0:未同步 1:已同步")
+    private Integer synFlag;
+
+}

+ 104 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampUpdateDTO.java

@@ -0,0 +1,104 @@
+package com.github.zuihou.business.productionReadyCenter.dto;
+
+import com.github.zuihou.base.entity.SuperEntity;
+import com.github.zuihou.model.RemoteData;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * <p>
+ * 实体类
+ * 工具原材料
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-19
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@ApiModel(value = "MToolClampUpdateDTO", description = "工装夹具")
+public class MToolClampUpdateDTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @NotNull(message = "id不能为空", groups = SuperEntity.Update.class)
+    private Long id;
+
+    /**
+     * 编号
+     */
+    @ApiModelProperty(value = "编号")
+    @Length(max = 256, message = "编号长度不能超过256")
+    private String no;
+    /**
+     * 模型名称
+     */
+    @ApiModelProperty(value = "模型名称")
+    @NotEmpty(message = "模型名称不能为空")
+    @Length(max = 128, message = "模型名称长度不能超过128")
+    private String name;
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    private String status;
+    /**
+     * 型号
+     */
+    @ApiModelProperty(value = "型号")
+    @Length(max = 128, message = "型号长度不能超过128")
+    private String model;
+    /**
+     * 分类
+     */
+    @ApiModelProperty(value = "分类")
+    @Length(max = 50, message = "分类长度不能超过50")
+    private RemoteData<String, String> category;
+    /**
+     * 品牌
+     */
+    @ApiModelProperty(value = "品牌")
+    @Length(max = 255, message = "品牌长度不能超过255")
+    private RemoteData<String, String> brand;
+
+    @ApiModelProperty(value = "图号")
+    @Length(max = 255, message = "图号长度不能超过255")
+    private String mapNo;
+
+    @ApiModelProperty(value = "有效期(月)")
+    private Integer expiryDate;
+
+    @ApiModelProperty(value = "周期(月)")
+    private Integer period;
+
+    @ApiModelProperty(value = "数量")
+    private Integer num;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    private String joinDate;
+
+    /**
+     * 物料类型(10-原料 20-成品)
+     */
+    @ApiModelProperty(value = "物料类型(10-原料 20-成品)")
+    private RemoteData<String, String> materialType;
+
+    @ApiModelProperty(value = "同步状态 0:未同步 1:已同步")
+    private Integer synFlag;
+}

+ 12 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolMeterialPageDTO.java

@@ -86,6 +86,18 @@ public class MToolMeterialPageDTO implements Serializable {
     @Length(max = 255, message = "品牌长度不能超过255")
     private RemoteData<String, String> brand;
 
+    @ApiModelProperty(value = "原炉批号")
+    @Length(max = 255, message = "原炉批号不能超过255")
+    private String heatNo;
+
+    @ApiModelProperty(value = "材料编号")
+    @Length(max = 255, message = "材料编号不能超过255")
+    private String materialNo;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    private String joinDate;
+
     /**
      * 规格
      */

+ 12 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolMeterialSaveDTO.java

@@ -107,6 +107,18 @@ public class MToolMeterialSaveDTO implements Serializable {
     @ApiModelProperty(value = "物料类型(10-原料 20-成品)")
     private RemoteData<String, String> materialType;
 
+    @ApiModelProperty(value = "原炉批号")
+    @Length(max = 255, message = "原炉批号不能超过255")
+    private String heatNo;
+
+    @ApiModelProperty(value = "材料编号")
+    @Length(max = 255, message = "材料编号不能超过255")
+    private String materialNo;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    private String joinDate;
+
 
     /**
      * 工具原材料规格

+ 12 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolMeterialUpdateDTO.java

@@ -87,6 +87,18 @@ public class MToolMeterialUpdateDTO implements Serializable {
     @Length(max = 255, message = "品牌长度不能超过255")
     private RemoteData<String, String> brand;
 
+    @ApiModelProperty(value = "原炉批号")
+    @Length(max = 255, message = "原炉批号不能超过255")
+    private String heatNo;
+
+    @ApiModelProperty(value = "材料编号")
+    @Length(max = 255, message = "材料编号不能超过255")
+    private String materialNo;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    private String joinDate;
+
     @ApiModelProperty(value = "监控方式(1-无监控2-监控寿命3-监控使用次数)")
     private Float monitorType;
 

+ 169 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/MToolClamp.java

@@ -0,0 +1,169 @@
+package com.github.zuihou.business.productionReadyCenter.entity;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.zuihou.base.entity.Entity;
+import com.github.zuihou.common.constant.DictionaryType;
+import com.github.zuihou.injection.annonation.InjectionField;
+import com.github.zuihou.model.RemoteData;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotEmpty;
+import java.time.LocalDateTime;
+import java.util.List;
+
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+import static com.github.zuihou.common.constant.InjectionFieldConstants.DICTIONARY_ITEM_CLASS;
+import static com.github.zuihou.common.constant.InjectionFieldConstants.DICTIONARY_ITEM_METHOD;
+
+/**
+ * <p>
+ * 实体类
+ * 工装夹具
+ * </p>
+ *
+ * @author imcs
+ * @since 2020-11-19
+ */
+@Data
+@NoArgsConstructor
+@ToString(callSuper = true)
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("imcs_m_frock_clamp")
+@ApiModel(value = "MToolClamp", description = "工装夹具")
+@AllArgsConstructor
+public class MToolClamp extends Entity<Long> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    @ApiModelProperty(value = "物料编号")
+    @Length(max = 256, message = "物料编号长度不能超过256")
+    @TableField(value = "no", condition = LIKE)
+    @Excel(name = "物料编号")
+    private String no;
+
+    /**
+     * 模型名称
+     */
+    @ApiModelProperty(value = "物料名称")
+    @NotEmpty(message = "物料名称不能为空")
+    @Length(max = 128, message = "物料名称长度不能超过128")
+    @TableField(value = "name", condition = LIKE)
+    @Excel(name = "物料名称")
+    private String name;
+
+    /**
+     * 状态(1-启用0-停用)
+     */
+    @ApiModelProperty(value = "状态(1-启用0-停用)")
+    @Length(max = 4, message = "状态(1-启用0-停用)长度不能超过4")
+    @TableField(value = "status", condition = LIKE)
+    @Excel(name = "状态(1-启用0-停用)")
+    private String status;
+
+    /**
+     * 型号
+     */
+    @ApiModelProperty(value = "规格型号")
+    @Length(max = 128, message = "规格型号长度不能超过128")
+    @TableField(value = "model", condition = LIKE)
+    @Excel(name = "规格型号")
+    private String model;
+
+    @ApiModelProperty(value = "有效期(月)")
+    @TableField(value = "expiry_date", condition = LIKE)
+    private Integer expiryDate;
+
+    @ApiModelProperty(value = "周期(月)")
+    @TableField(value = "period", condition = LIKE)
+    private Integer period;
+
+    @ApiModelProperty(value = "数量")
+    @TableField(value = "num", condition = LIKE)
+    private Integer num;
+
+    /**
+     * 分类
+     */
+    @ApiModelProperty(value = "分类")
+    @Length(max = 50, message = "分类长度不能超过50")
+    @InjectionField(api = DICTIONARY_ITEM_CLASS, method = DICTIONARY_ITEM_METHOD, dictType = DictionaryType.METERIAL_CATEGORY)
+    @TableField(value = "category", condition = LIKE)
+    @Excel(name = "分类")
+    private RemoteData<String, String> category;
+
+    /**
+     * 品牌
+     */
+    @ApiModelProperty(value = "生产分厂/制造商")
+    @Length(max = 255, message = "生产分厂/制造商长度不能超过255")
+    @InjectionField(api = DICTIONARY_ITEM_CLASS, method = DICTIONARY_ITEM_METHOD, dictType = DictionaryType.METERIAL_BRAND)
+    @TableField(value = "brand", condition = LIKE)
+    @Excel(name = "生产分厂/制造商")
+    private RemoteData<String, String> brand;
+
+    @ApiModelProperty(value = "图号")
+    @Length(max = 255, message = "图号不能超过255")
+    @TableField(value = "map_no", condition = LIKE)
+    @Excel(name = "图号")
+    private String mapNo;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    @TableField(value = "join_date", condition = LIKE)
+    @Excel(name = "入场日期")
+    private String joinDate;
+
+    /**
+     * 物料类型
+     */
+    @ApiModelProperty(value = "物料类型")
+    @Length(max = 4, message = "物料类型长度不能超过4")
+    @InjectionField(api = DICTIONARY_ITEM_CLASS, method = DICTIONARY_ITEM_METHOD, dictType = DictionaryType.MATERIAL_TYPE)
+    @TableField(value = "material_type", condition = LIKE)
+    @Excel(name = "物料类型")
+    private RemoteData<String, String> materialType;
+
+    /**
+     * 同步状态 0:未同步 1:已同步
+     */
+    @ApiModelProperty(value = "同步状态 0:未同步 1:已同步")
+    @Length(max = 1, message = "同步状态 0:未同步 1:已同步 长度不能超过1")
+    @TableField(value = "syn_flag")
+    private int synFlag;
+
+
+    @Builder
+    public MToolClamp(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser,
+                      String no, String name, String status, String model, RemoteData<String, String> category, String mapNo, int period,int expiryDate,
+                      int num, String joinDate, RemoteData<String, String> brand, RemoteData<String, String> materialType,int synFlag) {
+        this.id = id;
+        this.createTime = createTime;
+        this.createUser = createUser;
+        this.updateTime = updateTime;
+        this.updateUser = updateUser;
+        this.no = no;
+        this.name = name;
+        this.status = status;
+        this.model = model;
+        this.category = category;
+        this.brand = brand;
+        this.mapNo = mapNo;
+        this.period = period;
+        this.expiryDate = expiryDate;
+        this.joinDate = joinDate;
+        this.materialType = materialType;
+        this.num = num;
+        this.synFlag = synFlag;
+    }
+
+}

+ 24 - 2
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/MToolMeterial.java

@@ -134,6 +134,25 @@ public class MToolMeterial extends Entity<Long> {
     @Excel(name = "规格")
     private String specification;
 
+
+    @ApiModelProperty(value = "原炉批号")
+    @Length(max = 255, message = "原炉批号不能超过128")
+    @TableField(value = "heat_no", condition = LIKE)
+    @Excel(name = "原炉批号")
+    private String heatNo;
+
+    @ApiModelProperty(value = "材料编号")
+    @Length(max = 255, message = "材料编号不能超过128")
+    @TableField(value = "material_no", condition = LIKE)
+    @Excel(name = "材料编号")
+    private String materialNo;
+
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    @TableField(value = "join_date", condition = LIKE)
+    @Excel(name = "入场日期")
+    private String joinDate;
+
     /**
      * 物料类型(10-原料 20-成品)
      */
@@ -159,8 +178,8 @@ public class MToolMeterial extends Entity<Long> {
 
     @Builder
     public MToolMeterial(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser,
-                    String no, String name, String status, String model, RemoteData<String, String> category,
-                         RemoteData<String, String> brand,String specification,RemoteData<String, String> materialType) {
+                    String no, String name, String status, String model, RemoteData<String, String> category,String heatNo,String materialNo,
+                         String joinDate,RemoteData<String, String> brand,String specification,RemoteData<String, String> materialType) {
         this.id = id;
         this.createTime = createTime;
         this.createUser = createUser;
@@ -172,6 +191,9 @@ public class MToolMeterial extends Entity<Long> {
         this.model = model;
         this.category = category;
         this.brand = brand;
+        this.heatNo = heatNo;
+        this.materialNo = materialNo;
+        this.joinDate = joinDate;
         this.specification = specification;
         this.materialType = materialType;
     }