添加根据设备号查询生产日志,生命周期,和相关信息;限制上传文档类型
| | |
| | | String selectMaxCode(); |
| | | |
| | | boolean exists(String name, Long id); |
| | | |
| | | PltProduct selectByCode(String productCode); |
| | | } |
| | |
| | | import com.dy.pmsGlobal.pojoSta.StaWipSnEx; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author User |
| | | * @description 针对表【sta_wip_sn_ex(设备关联表)】的数据库操作Mapper |
| | |
| | | |
| | | int updateByPrimaryKey(StaWipSnEx record); |
| | | |
| | | List<StaWipSnEx> selectByDeviceNo(String deviceNo); |
| | | } |
| | |
| | | |
| | | @Value("${dy.webFile.fmUrl}") |
| | | private String fmUrl ; |
| | | //支持的文件类型 |
| | | @Value("${dy.webFile.supportedFileTypes}") |
| | | private String supportedFileTypes ; |
| | | |
| | | /** |
| | | * 上传照片图片文件 (当前只对png jpg格式图片支持缩略图) |
| | |
| | | String[] fileNameGrp = fileOp.splitFileName(file) ; |
| | | if(fileNameGrp != null && fileNameGrp[0] != null && fileNameGrp[1] != null){ |
| | | if(!fileNameGrp[1].trim().equals("")){ |
| | | String fileExtName = fileNameGrp[1]; |
| | | if(!supportedFileTypes.contains(fileExtName)){ |
| | | return BaseResponseUtils.buildError("请上传Word,Excel,PowerPoint,PDF类型文档"); |
| | | } |
| | | FileRestVo frVo = fileOp.saveFile(file, |
| | | fmUrl, |
| | | FileConstant.fileRequestMapping, |
| | |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotBlank; |
| | |
| | | */ |
| | | public String memo; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | public String planName; |
| | | @TableField(exist = false) |
| | | public String stationName; |
| | | @TableField(exist = false) |
| | | public String updateUserName; |
| | | @TableField(exist = false) |
| | | public String assistantNames; |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotBlank; |
| | |
| | | */ |
| | | public String memo; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | public String planName; |
| | | @TableField(exist = false) |
| | | public String stationName; |
| | | @TableField(exist = false) |
| | | public String updateUserName; |
| | | @TableField(exist = false) |
| | | public String assistantNames; |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import jakarta.validation.constraints.NotBlank; |
| | |
| | | */ |
| | | public String memo; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | public String planName; |
| | | @TableField(exist = false) |
| | | public String stationName; |
| | | @TableField(exist = false) |
| | | public String updateUserName; |
| | | @TableField(exist = false) |
| | | public String assistantNames; |
| | | } |
| | |
| | | photoZipWidth: 400 #缩略图尺寸 |
| | | webFile: |
| | | fmUrl: http://127.0.0.1:${pms.other.webPort}/other # fm的web上下文 URL |
| | | supportedFileTypes: docx,xlsx,pdf |
| | | sv1: |
| | | id: dyFile1 |
| | | absolutePath: E:/java/nginx-1.24.0/html/webfiles/ |
| | |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | <select id="selectNamesByAssistants" parameterType="java.lang.String" resultType="java.lang.String"> |
| | | SELECT GROUP_CONCAT(name) AS assistantNames FROM ba_user WHERE id IN |
| | | <if test="assistants != null"> |
| | | <foreach collection="assistants.split(',')" item="item" separator="," open="(" close=")"> |
| | | #{item,jdbcType=BIGINT} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | |
| | | and id != #{id} |
| | | </if> |
| | | </select> |
| | | <select id="selectByCode" resultType="com.dy.pmsGlobal.pojoPlt.PltProduct"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from plt_product p |
| | | where p.deleted!=1 and p.code = #{code} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result property="outTime" column="out_time" jdbcType="TIMESTAMP"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife" extends="BaseResultMap"> |
| | | <result property="planName" column="plan_name" jdbcType="VARCHAR"/> |
| | | <result property="stationName" column="station_name" jdbcType="VARCHAR"/> |
| | | <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> |
| | | <association property="assistantNames" jdbcType="VARCHAR" column="assistants" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNamesByAssistants" fetchType="eager" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | |
| | | updated_by,in_time,out_time, |
| | | memo |
| | | </sql> |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | | sta_device_last t |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | |
| | | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife" extends="BaseResultMap"> |
| | | <result property="planName" column="plan_name" jdbcType="VARCHAR"/> |
| | | <result property="stationName" column="station_name" jdbcType="VARCHAR"/> |
| | | <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> |
| | | <association property="assistantNames" jdbcType="VARCHAR" column="assistants" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNamesByAssistants" fetchType="eager" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_device_life |
| | | where equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | order by id desc |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | | sta_device_life t |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from sta_device_life |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | <result property="updatedBy" column="updated_by" jdbcType="BIGINT"/> |
| | | <result property="memo" column="memo" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | <resultMap id="joinResultMap" type="com.dy.pmsGlobal.pojoSta.StaDeviceLife" extends="BaseResultMap"> |
| | | <result property="planName" column="plan_name" jdbcType="VARCHAR"/> |
| | | <result property="stationName" column="station_name" jdbcType="VARCHAR"/> |
| | | <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/> |
| | | <association property="assistantNames" jdbcType="VARCHAR" column="assistants" |
| | | select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNamesByAssistants" fetchType="eager" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,equip_no,work_id, |
| | |
| | | out_time,updated_by,memo |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_device_production_log |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | <select id="selectByEquipNo" parameterType="java.lang.String" resultMap="joinResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_device_production_log |
| | | where equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | order by id desc |
| | | t.* ,p.`name` plan_name,s.`name` station_name,u.`name` update_user_name |
| | | FROM |
| | | sta_device_last t |
| | | left join pr_assembly_plan p on t.plan_id=p.id |
| | | left join plt_station s on s.id = t.station_id |
| | | left JOIN ba_user u on u.id=t.updated_by |
| | | where t.equip_no = #{equipNo,jdbcType=VARCHAR} |
| | | ORDER BY t.id DESC |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | |
| | | from sta_wip_sn_ex |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectByDeviceNo" resultType="com.dy.pmsGlobal.pojoSta.StaWipSnEx"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from sta_wip_sn_ex |
| | | where device_no = #{deviceNo,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from sta_wip_sn_ex |
| | |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems; |
| | | import com.dy.pmsGlobal.pojoPr.PrProductionNode; |
| | | import com.dy.pmsGlobal.pojoSta.StaDeviceLife; |
| | | import com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog; |
| | | import jakarta.validation.Valid; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | *记录组装各步骤 |
| | |
| | | return BaseResponseUtils.buildSuccess(true); |
| | | } |
| | | } |
| | | |
| | | @GetMapping(path = "queryByDeviceNo") |
| | | public BaseResponse<Map<String,String>> queryByDeviceNo(String deviceNo) { |
| | | log.info("AssemblyStepCtrl.queryByDeviceNo():"+deviceNo); |
| | | Map<String,String> result = sv.queryByDeviceNo(deviceNo); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | |
| | | @GetMapping(path = "queryLifeByDeviceNo") |
| | | public BaseResponse<?> queryLifeByDeviceNo(String deviceNo) { |
| | | log.info("AssemblyStepCtrl.queryLifeByDeviceNo():"+deviceNo); |
| | | List<StaDeviceLife> result = sv.queryLifeByDeviceNo(deviceNo); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | |
| | | @GetMapping(path = "queryLogByDeviceNo") |
| | | public BaseResponse<?> queryLogByDeviceNo(String deviceNo) { |
| | | log.info("AssemblyStepCtrl.queryLogByDeviceNo():"+deviceNo); |
| | | List<StaDeviceProductionLog> result = sv.queryLogByDeviceNo(deviceNo); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | } |
| | |
| | | FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash); |
| | | return fileRestVo.fileWebUrl + file.filePath; |
| | | } |
| | | |
| | | public Map<String,String> queryByDeviceNo(String deviceNo) { |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("deviceNo", deviceNo); |
| | | map.put("proName", "-"); |
| | | map.put("proType", "-"); |
| | | |
| | | PltProduct product = productDao.selectByCode(deviceNo.substring(3,6)); |
| | | if(product != null){ |
| | | map.put("proName", product.getName()); |
| | | map.put("proType", product.getType()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | public List<StaDeviceLife> queryLifeByDeviceNo(String deviceNo) { |
| | | return deviceLifeDao.selectByEquipNo(deviceNo); |
| | | } |
| | | |
| | | public List<StaDeviceProductionLog> queryLogByDeviceNo(String devoiceNo) { |
| | | return deviceProductionLogDao.selectByEquipNo(devoiceNo); |
| | | } |
| | | } |