Merge remote-tracking branch 'origin/master'
| | |
| | | "avatar": "", |
| | | "version": "4.9.4", |
| | | "createdTime": "2025-3-10 16:38:19", |
| | | "updatedTime": "2025-7-23 19:33:38", |
| | | "updatedTime": "2025-7-23 11:43:01", |
| | | "dbConns": [], |
| | | "profile": { |
| | | "default": { |
| | |
| | | "id": "6BEE092E-65D4-4D44-916B-EDB48C4BFBCB" |
| | | }, |
| | | { |
| | | "defKey": "order_num", |
| | | "defName": "å·¥åå·", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6", |
| | | "id": "2DF6DEC7-CE4E-4F1A-8F92-D175CB25C833" |
| | | }, |
| | | { |
| | | "defKey": "maintenance_date", |
| | | "defName": "ä¿å
»æ¥æ", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098", |
| | | "extProps": {}, |
| | | "domain": "7CFFA0D3-6A93-4DDC-BC10-DF21211064DC", |
| | | "id": "AE0B0F0C-CC47-422E-B517-CC3C2992D44B" |
| | | }, |
| | | { |
| | | "defKey": "equipment_id", |
| | | "defName": "设å¤ID", |
| | | "comment": "", |
| | |
| | | }, |
| | | { |
| | | "defKey": "operate_time", |
| | | "defName": "ä¿å
»æ¥æ", |
| | | "defName": "ä¿å
»æ¶é´", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | |
| | | "id": "4C11A4C0-29C2-423B-972B-C080B6023536" |
| | | }, |
| | | { |
| | | "defKey": "approved_rejected", |
| | | "defName": "确认类å", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "6F7C1C5C-D159-41E6-BF9D-54DEEFA79AFF", |
| | | "id": "869FCDB4-D5FF-4D44-B0D1-2E0DDF707052" |
| | | }, |
| | | { |
| | | "defKey": "confirm_time", |
| | | "defName": "ç¡®è®¤æ¥æ", |
| | | "comment": "", |
| | |
| | | "extProps": {}, |
| | | "domain": "BE09D493-E183-402D-ACC4-EEA21EB35B8E", |
| | | "id": "624246E9-5FFE-49D3-B975-4439FF9DA03B" |
| | | }, |
| | | { |
| | | "defKey": "remark", |
| | | "defName": "夿³¨", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", |
| | | "id": "FBF88752-FD0D-4697-A427-85AB377753B3" |
| | | } |
| | | ], |
| | | "correlations": [], |
| | |
| | | "baseType": "89D69E81-EA34-42EE-9FA2-93B8BD27E098" |
| | | }, |
| | | { |
| | | "defKey": "order_id", |
| | | "defName": "å·¥åid", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "16120F75-6AA7-4483-868D-F07F511BB081", |
| | | "id": "7EBCA911-19F6-4317-A7F3-3B2901ADBF63" |
| | | }, |
| | | { |
| | | "defKey": "spare_code", |
| | | "defName": "å¤ä»¶åºå·", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "1D764C4A-6F9F-421E-B11A-6F3E23B51811", |
| | | "extProps": {}, |
| | | "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", |
| | | "id": "590E5C5B-22E6-42AC-9905-BC67F51B3137" |
| | | }, |
| | | { |
| | | "defKey": "spare_name", |
| | | "defName": "å¤ä»¶åç§°", |
| | | "comment": "", |
| | |
| | | "id": "7E7714A5-B442-4842-8E65-6179F3F43740" |
| | | }, |
| | | { |
| | | "defKey": "remark", |
| | | "defName": "夿³¨", |
| | | "comment": "", |
| | | "type": "NVARCHAR", |
| | | "len": 255, |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "", |
| | | "id": "5175E822-55EE-4354-AED8-3A08F23BDAAF" |
| | | }, |
| | | { |
| | | "defKey": "create_by", |
| | | "defName": "å建人", |
| | | "comment": "", |
| | |
| | | "extProps": {}, |
| | | "domain": "6BC8F04B-6CFA-4995-98D3-318F5CDD774E", |
| | | "id": "F888AE02-055A-458A-98FD-CB22C3EA539B" |
| | | }, |
| | | { |
| | | "defKey": "equipment_id", |
| | | "defName": "设å¤id", |
| | | "comment": "", |
| | | "type": "", |
| | | "len": "", |
| | | "scale": "", |
| | | "primaryKey": false, |
| | | "notNull": false, |
| | | "autoIncrement": false, |
| | | "defaultValue": "", |
| | | "hideInGraph": false, |
| | | "refDict": "", |
| | | "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", |
| | | "extProps": {}, |
| | | "domain": "54611CCC-CA4B-42E1-9F32-4944C85B85A6", |
| | | "id": "CCCA9FE5-4BB7-4C86-B3E4-45AE86A15C3F" |
| | | }, |
| | | { |
| | | "defKey": "order_id", |
| | |
| | | "dbConn": [ |
| | | { |
| | | "defKey": "949F6F53-7669-4EC7-923F-649A7D4D8273", |
| | | "defName": "430", |
| | | "defName": "hangyu", |
| | | "type": "BFC87171-C74F-494A-B7C2-76B9C55FACC9", |
| | | "properties": { |
| | | "driver_class_name": "com.microsoft.sqlserver.jdbc.SQLServerDriver", |
| | | "url": "jdbc:sqlserver://127.0.0.1:1433;DatabaseName=LXZN_TEST_430_NEW", |
| | | "password": "", |
| | | "url": "jdbc:sqlserver://192.168.1.118:1433;DatabaseName=LXZN_TEST_HANGYU", |
| | | "password": "123", |
| | | "username": "sa", |
| | | "customer_driver": "" |
| | | } |
| | |
| | | String THIRD_MAINTENANCE_CODE_RULE = "ThirdMaintenanceCodeRule"; |
| | | //ä¸ä¿åæ´ç¼ç è§å |
| | | String THIRD_MAINTENANCE_CHANGE_CODE_RULE = "ThirdMaintenanceChangeCodeRule"; |
| | | //ç空çå¤ççç¼ç è§å |
| | | String THIRD_MAINTENANCE_FURNACE_CODE_RULE = "ThirdMaintenanceFurnaceCodeRule"; |
| | | //设å¤ååºå½è¿ |
| | | String LEAN_OUT_CODE_RULE = "EquipmentLeanOutCodeRule"; |
| | | //设å¤å°åå¯å° |
| | |
| | | THIRD_MAINTENANCE_HANDOVER, //ä¸ä¿ç§»äº¤å |
| | | THIRD_MAINTENANCE_ACCEPTANCE, //ä¸ä¿éªæ¶å |
| | | THIRD_MAINTENANCE_CHANGE, //ä¸ä¿åæ´å |
| | | THIRD_MAINTENANCE_FURNACE, //ç空çå¤ççæ´ä½æ§è½æ£æµè¡¨ |
| | | TECHNICAL_STATUS_EVALUATION, //ææ¯ç¶æé´å®è¡¨ |
| | | TECHNICAL_STATUS_EVALUATION_SAFETY_CHECK, //设å¤å®å
¨è£
ç½®æ£æ¥å |
| | | TECHNICAL_STATUS_EVALUATION_OTHER_CHECK, //å
¶ä»æ£æ¥é¡¹ç® |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.constant; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | @Getter |
| | | public enum ThirdMaintenanceFurnaceStatusEnum { |
| | | WAIT_MAINTENANCE, //å¾
ä¿å
» |
| | | UNDER_MAINTENANCE, //ä¿å
»ä¸ |
| | | WAIT_CONFIRM, //å¾
确认 |
| | | COMPLETE, //已宿 |
| | | ABOLISH, //å·²ä½åº |
| | | EXPIRED; //å·²è¿æ |
| | | } |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecg.common.system.base.entity.JeecgEntity; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | |
| | | @Excel(name = "å 餿 è®°", width = 15) |
| | | @ApiModelProperty(value = "å 餿 è®°") |
| | | private Integer delFlag; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /** |
| | | * 设å¤ID |
| | | */ |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /** |
| | | * ä¸ä¿å·¥åID |
| | | */ |
| | |
| | | @Excel(name = "å»¶è¿ä¿å
»æ¥æ", width = 20, format = "yyyy-MM-dd") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date deferredMaintenanceDate; |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String deferredMaintenanceDate; |
| | | /** |
| | | * 主管é¢å¯¼ç¾å |
| | | */ |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | public class EamThirdMaintenanceFurnace extends JeecgEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -5799611070364065336L; |
| | | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /** |
| | | * å 餿 è®° |
| | | */ |
| | |
| | | @Excel(name = "设å¤ID", width = 15) |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | private String equipmentId; |
| | | /** |
| | | * å·¥åå· |
| | | */ |
| | | @Excel(name = "å·¥åå·", width = 15) |
| | | @ApiModelProperty(value = "å·¥åå·") |
| | | private String orderNum; |
| | | /** |
| | | * 计åä¿å
»æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "计åä¿å
»æ¥æ;æå70天çæå·¥å") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | /** |
| | | * å缩空æ°åå(MPa) |
| | | */ |
| | |
| | | */ |
| | | @Excel(name = "ä¿å
»äºº", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»äºº") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String operator; |
| | | /** |
| | | * ä¿å
»æ¥æ |
| | | * ä¿å
»æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "ä¿å
»æ¥æ") |
| | | @Excel(name = "ä¿å
»æ¥æ", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "ä¿å
»æ¶é´") |
| | | @Excel(name = "ä¿å
»æ¶é´", width = 20, format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date operateTime; |
| | |
| | | */ |
| | | @Excel(name = "ä¿å
»ç¶æ;å¾
æäº¤ãå¾
确认ã已宿", width = 15) |
| | | @ApiModelProperty(value = "ä¿å
»ç¶æ;å¾
æäº¤ãå¾
确认ã已宿") |
| | | @Dict(dicCode = "third_maintenance_furnace_status") |
| | | private String maintenanceStatus; |
| | | /** |
| | | * è½å¦æ»¡è¶³å 工鿱;æ¯å¦ |
| | |
| | | */ |
| | | @Excel(name = "确认人", width = 15) |
| | | @ApiModelProperty(value = "确认人") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String confirmUser; |
| | | /** 确认类å 1 éè¿ 2 驳å */ |
| | | @ApiModelProperty(value = "确认类å") |
| | | private String confirmDealType; |
| | | /** |
| | | * ç¡®è®¤æ¥æ |
| | | */ |
| | |
| | | @Excel(name = "HFç¼ç ", width = 15) |
| | | @ApiModelProperty(value = "HFç¼ç ") |
| | | private String hfCode; |
| | | //å表å±ç¤º |
| | | @TableField(exist = false) |
| | | private String equipmentCode; |
| | | @TableField(exist = false) |
| | | private String equipmentName; |
| | | @TableField(exist = false) |
| | | private String equipmentModel; |
| | | } |
| | |
| | | package org.jeecg.modules.eam.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | @ApiModelProperty(value = "计åä¿å
»æ¥æ;æå70天çæå·¥å") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String maintenanceDate; |
| | | /** |
| | | * éå®å·¥åæ¥æ |
| | | */ |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecg.common.system.base.entity.JeecgEntity; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | |
| | |
| | | private static final long serialVersionUID = -164548817301978100L; |
| | | |
| | | /** |
| | | * ä¸ä¿å·¥åID |
| | | */ |
| | | @Excel(name = "ä¸ä¿å·¥åID", width = 15) |
| | | @ApiModelProperty(value = "ä¸ä¿å·¥åID") |
| | | private String orderId; |
| | | /** |
| | | * å¤ä»¶åºå· |
| | | */ |
| | | @Excel(name = "å¤ä»¶åºå·", width = 15) |
| | | @ApiModelProperty(value = "å¤ä»¶åºå·") |
| | | private Integer spareCode; |
| | | /** |
| | | * å¤ä»¶åç§° |
| | | */ |
| | | @Excel(name = "å¤ä»¶åç§°", width = 15) |
| | |
| | | translateDictTextUtils.translateField("equipmentManagerSignature", entity.getEquipmentManagerSignature(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("departManagerSignature", entity.getDepartManagerSignature(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("productionSupportSignature", entity.getProductionSupportSignature(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("factoryOrgCode", entity.getFactoryOrgCode(), item, "eam_base_factory,factory_name,org_code"); |
| | | return Result.OK(item); |
| | | } catch (JsonProcessingException e) { |
| | | return Result.error("æ°æ®è½¬è¯å¤±è´¥ï¼"); |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.parser.Feature; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.common.util.TranslateDictTextUtils; |
| | | import org.jeecg.modules.eam.constant.BusinessCodeConst; |
| | | import org.jeecg.modules.eam.constant.OrderCreationMethodEnum; |
| | | import org.jeecg.modules.eam.constant.ThirdMaintenanceFurnaceStatusEnum; |
| | | import org.jeecg.modules.eam.constant.ThirdMaintenanceStatusEnum; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceFurnace; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceFurnaceQuery; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceFurnaceRequest; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceRequest; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceFurnaceService; |
| | | import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | /** |
| | | * @Description: ç空çå¤ççä¸ä¿ |
| | | * @Author: jeecg-boot |
| | | * @Date: 2025-07-11 |
| | | * @Date: 2025-07-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags="ç空çå¤ççä¸ä¿") |
| | | @Api(tags = "ç空çå¤ççä¸ä¿") |
| | | @RestController |
| | | @RequestMapping("/eam/eamThirdMaintenanceFurnace") |
| | | public class EamThirdMaintenanceFurnaceController extends JeecgController<EamThirdMaintenanceFurnace, IEamThirdMaintenanceFurnaceService> { |
| | | |
| | | @Resource |
| | | private IEamThirdMaintenanceFurnaceService eamThirdMaintenanceFurnaceService; |
| | | @Resource |
| | | private ISysBusinessCodeRuleService businessCodeRuleService; |
| | | @Resource |
| | | private IEamThirdMaintenanceFurnaceService eamThirdMaintenanceFurnaceService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param eamThirdMaintenanceFurnace |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-å页å表æ¥è¯¢") |
| | | @ApiOperation(value="ç空çå¤ççä¸ä¿-å页å表æ¥è¯¢", notes="ç空çå¤ççä¸ä¿-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace, |
| | | @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
| | | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | QueryWrapper<EamThirdMaintenanceFurnace> queryWrapper = QueryGenerator.initQueryWrapper(eamThirdMaintenanceFurnace, req.getParameterMap()); |
| | | Page<EamThirdMaintenanceFurnace> page = new Page<EamThirdMaintenanceFurnace>(pageNo, pageSize); |
| | | IPage<EamThirdMaintenanceFurnace> pageList = eamThirdMaintenanceFurnaceService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param eamThirdMaintenanceFurnace |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-æ·»å ") |
| | | @ApiOperation(value="ç空çå¤ççä¸ä¿-æ·»å ", notes="ç空çå¤ççä¸ä¿-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace) { |
| | | eamThirdMaintenanceFurnaceService.save(eamThirdMaintenanceFurnace); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param eamThirdMaintenanceFurnace |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-ç¼è¾") |
| | | @ApiOperation(value="ç空çå¤ççä¸ä¿-ç¼è¾", notes="ç空çå¤ççä¸ä¿-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace) { |
| | | eamThirdMaintenanceFurnaceService.updateById(eamThirdMaintenanceFurnace); |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idå é¤ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-éè¿idå é¤") |
| | | @ApiOperation(value="ç空çå¤ççä¸ä¿-éè¿idå é¤", notes="ç空çå¤ççä¸ä¿-éè¿idå é¤") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<?> delete(@RequestParam(name="id",required=true) String id) { |
| | | eamThirdMaintenanceFurnaceService.removeById(id); |
| | | return Result.OK("å 餿å!"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-æ¹éå é¤") |
| | | @ApiOperation(value="ç空çå¤ççä¸ä¿-æ¹éå é¤", notes="ç空çå¤ççä¸ä¿-æ¹éå é¤") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | this.eamThirdMaintenanceFurnaceService.removeByIds(Arrays.asList(ids.split(","))); |
| | | return Result.OK("æ¹éå 餿åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value="ç空çå¤ççä¸ä¿-éè¿idæ¥è¯¢", notes="ç空çå¤ççä¸ä¿-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
| | | EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace = eamThirdMaintenanceFurnaceService.getById(id); |
| | | return Result.OK(eamThirdMaintenanceFurnace); |
| | | } |
| | | private ObjectMapper objectMapper; |
| | | @Resource |
| | | private TranslateDictTextUtils translateDictTextUtils; |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamThirdMaintenanceFurnace |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace) { |
| | | return super.exportXls(request, eamThirdMaintenanceFurnace, EamThirdMaintenanceFurnace.class, "ç空çå¤ççä¸ä¿"); |
| | | } |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * |
| | | * @param query |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param req |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-å页å表æ¥è¯¢") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-å页å表æ¥è¯¢", notes = "ç空çå¤ççä¸ä¿-å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/list") |
| | | public Result<?> queryPageList(EamThirdMaintenanceFurnaceQuery query, |
| | | @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
| | | HttpServletRequest req) { |
| | | Page<EamThirdMaintenanceFurnace> page = new Page<EamThirdMaintenanceFurnace>(pageNo, pageSize); |
| | | IPage<EamThirdMaintenanceFurnace> pageList = eamThirdMaintenanceFurnaceService.queryPageList(page, query); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamThirdMaintenanceFurnace.class); |
| | | } |
| | | /** |
| | | * æ·»å |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-æ·»å ") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-æ·»å ", notes = "ç空çå¤ççä¸ä¿-æ·»å ") |
| | | @PostMapping(value = "/add") |
| | | public Result<?> add(@RequestBody EamThirdMaintenanceFurnaceRequest request) { |
| | | String codeSeq = businessCodeRuleService.generateBusinessCodeSeq(BusinessCodeConst.THIRD_MAINTENANCE_FURNACE_CODE_RULE); |
| | | request.setOrderNum(codeSeq); |
| | | return eamThirdMaintenanceFurnaceService.addThirdMaintenanceFurnace(request); |
| | | } |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-ç¼è¾") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-ç¼è¾", notes = "ç空çå¤ççä¸ä¿-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamThirdMaintenanceFurnaceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("æ·»å ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | boolean b = eamThirdMaintenanceFurnaceService.editMaintenance(request); |
| | | if (!b) { |
| | | return Result.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | | /** |
| | | * ç空çå¤ççä¸ä¿ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-ä½åº") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-ä½åº", notes = "ç空çå¤ççä¸ä¿-ä½åº") |
| | | @GetMapping(value = "/abolish") |
| | | public Result<String> abolish(@RequestParam(name = "id", required = true) String id) { |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceService.getById(id); |
| | | if (entity == null) { |
| | | return Result.error("è¦ä½åºçæ°æ®ä¸åå¨ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!ThirdMaintenanceFurnaceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | return Result.error("è¯¥ç¶æçæ°æ®ä¸å
许è¿è¡ä½åºï¼"); |
| | | } |
| | | entity.setMaintenanceStatus(ThirdMaintenanceFurnaceStatusEnum.ABOLISH.name()); |
| | | eamThirdMaintenanceFurnaceService.updateById(entity); |
| | | return Result.OK("ä½åºæå"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éä½åº |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-æ¹éä½åº") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-æ¹éä½åº", notes = "ç空çå¤ççä¸ä¿-æ¹éä½åº") |
| | | @DeleteMapping(value = "/abolishBatch") |
| | | public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceService.getById(id); |
| | | if (entity != null && ThirdMaintenanceFurnaceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | entity.setMaintenanceStatus(ThirdMaintenanceFurnaceStatusEnum.ABOLISH.name()); |
| | | eamThirdMaintenanceFurnaceService.updateById(entity); |
| | | i.getAndIncrement(); |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éä½åºæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¥è¯¢ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-éè¿idæ¥è¯¢") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-éè¿idæ¥è¯¢", notes = "ç空çå¤ççä¸ä¿-éè¿idæ¥è¯¢") |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace = eamThirdMaintenanceFurnaceService.getById(id); |
| | | if (eamThirdMaintenanceFurnace == null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | try { |
| | | String json = objectMapper.writeValueAsString(eamThirdMaintenanceFurnace); |
| | | JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); |
| | | translateDictTextUtils.translateField("createBy", eamThirdMaintenanceFurnace.getCreateBy(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("operator", eamThirdMaintenanceFurnace.getOperator(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("confirmUser", eamThirdMaintenanceFurnace.getConfirmUser(), item, "sys_user,realname,username"); |
| | | translateDictTextUtils.translateField("maintenanceStatus", eamThirdMaintenanceFurnace.getMaintenanceStatus(), item, "third_maintenance_furnace_status"); |
| | | return Result.OK(item); |
| | | } catch (JsonProcessingException e) { |
| | | return Result.error("æ°æ®è½¬è¯å¤±è´¥ï¼"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éè¿idæ¹éé¢å |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-æ¹éé¢å") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-æ¹éé¢å", notes = "ç空çå¤ççä¸ä¿-æ¹éé¢å") |
| | | @DeleteMapping(value = "/collectBatch") |
| | | public Result<?> collectBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | AtomicInteger i = new AtomicInteger(); |
| | | list.forEach(id -> { |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceService.getById(id); |
| | | if (entity != null && ThirdMaintenanceFurnaceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | boolean b = eamThirdMaintenanceFurnaceService.collect(id); |
| | | if (b) { |
| | | i.getAndIncrement(); |
| | | } |
| | | } |
| | | }); |
| | | return Result.OK("æ¹éé¢åæå " + i.get() + " æ¡å·¥åï¼"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿idé¢å |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ç空çå¤ççä¸ä¿-é¢å") |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-é¢å", notes = "ç空çå¤ççä¸ä¿-é¢å") |
| | | @GetMapping(value = "/collect") |
| | | public Result<?> collect(@RequestParam(name = "id", required = true) String id) { |
| | | boolean b = eamThirdMaintenanceFurnaceService.collect(id); |
| | | if (!b) { |
| | | Result.OK("é¢å失败!"); |
| | | } |
| | | return Result.OK("é¢åæå!"); |
| | | } |
| | | |
| | | /** |
| | | * æçå¾
åï¼å®¡æ¹å¨ä½ |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "ç空çå¤ççä¸ä¿-æ§è¡æä½", notes = "ç空çå¤ççä¸ä¿-æ§è¡æä½") |
| | | @PutMapping(value = "/approval") |
| | | public Result<?> approval(@RequestBody EamThirdMaintenanceFurnaceRequest request) { |
| | | if (request == null) { |
| | | return Result.error("审æ¹ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | // æ£æ¥è¯·æ±åæ° |
| | | if (StrUtil.isBlank(request.getTaskId()) || StrUtil.isBlank(request.getDataId()) || StrUtil.isBlank(request.getInstanceId())) { |
| | | return Result.error("审æ¹ä»»å¡é误æä¸åå¨ï¼"); |
| | | } |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceService.approval(request); |
| | | if (entity == null) { |
| | | return Result.error("æä½å¤±è´¥ï¼"); |
| | | } |
| | | return Result.ok("æä½æåï¼"); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éä½åº", notes = "å¨ä¿å·¥å-æ¹éä½åº") |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-æ¹éä½åº") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-æ¹éä½åº", notes = "设å¤ä¸çº§ä¿å
»-æ¹éä½åº") |
| | | @DeleteMapping(value = "/abolishBatch") |
| | | public Result<?> abolishBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @ApiOperation(value = "å¨ä¿å·¥å-æ¹éé¢å", notes = "å¨ä¿å·¥å-æ¹éé¢å") |
| | | @AutoLog(value = "设å¤ä¸çº§ä¿å
»-æ¹éé¢å") |
| | | @ApiOperation(value = "设å¤ä¸çº§ä¿å
»-æ¹éé¢å", notes = "设å¤ä¸çº§ä¿å
»-æ¹éé¢å") |
| | | @DeleteMapping(value = "/collectBatch") |
| | | public Result<?> collectBatch(@RequestParam(name = "ids", required = true) String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | |
| | | package org.jeecg.modules.eam.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.system.query.QueryGenerator; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceSpare; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceSpareService; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Description: ä¸ä¿å¤ä»¶æç» |
| | |
| | | Page<EamThirdMaintenanceSpare> page = new Page<EamThirdMaintenanceSpare>(pageNo, pageSize); |
| | | IPage<EamThirdMaintenanceSpare> pageList = eamThirdMaintenanceSpareService.page(page, queryWrapper); |
| | | return Result.OK(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 䏿¬¡å è½½ |
| | | * |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "å¨ä¿å·¥åæç»-ä¸å页å表æ¥è¯¢", notes = "å¨ä¿å·¥åæç»-ä¸å页å表æ¥è¯¢") |
| | | @GetMapping(value = "/queryList") |
| | | public Result<?> queryList(@RequestParam("orderId") String orderId) { |
| | | LambdaQueryWrapper<EamThirdMaintenanceSpare> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamThirdMaintenanceSpare::getOrderId, orderId); |
| | | queryWrapper.orderByAsc(EamThirdMaintenanceSpare::getSpareCode); |
| | | List<EamThirdMaintenanceSpare> list = eamThirdMaintenanceSpareService.list(queryWrapper); |
| | | return Result.OK(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | EamThirdMaintenanceSpare eamThirdMaintenanceSpare = eamThirdMaintenanceSpareService.getById(id); |
| | | return Result.OK(eamThirdMaintenanceSpare); |
| | | } |
| | | |
| | | /** |
| | | * 导åºexcel |
| | | * |
| | | * @param request |
| | | * @param eamThirdMaintenanceSpare |
| | | */ |
| | | @RequestMapping(value = "/exportXls") |
| | | public ModelAndView exportXls(HttpServletRequest request, EamThirdMaintenanceSpare eamThirdMaintenanceSpare) { |
| | | return super.exportXls(request, eamThirdMaintenanceSpare, EamThirdMaintenanceSpare.class, "ä¸ä¿å¤ä»¶æç»"); |
| | | } |
| | | |
| | | /** |
| | | * éè¿excel导å
¥æ°æ® |
| | | * |
| | | * @param request |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
| | | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
| | | return super.importExcel(request, response, EamThirdMaintenanceSpare.class); |
| | | } |
| | | |
| | | } |
| | |
| | | package org.jeecg.modules.eam.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceFurnace; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public interface EamThirdMaintenanceFurnaceMapper extends BaseMapper<EamThirdMaintenanceFurnace> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param queryWrapper |
| | | * @return |
| | | */ |
| | | IPage<EamThirdMaintenanceFurnace> queryPageList(Page<EamThirdMaintenanceFurnace> page, @Param(Constants.WRAPPER) QueryWrapper<EamThirdMaintenanceFurnace> queryWrapper); |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.eam.mapper.EamThirdMaintenanceFurnaceMapper"> |
| | | |
| | | <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamThirdMaintenanceFurnace"> |
| | | select tmf.*, e.equipment_code, e.equipment_name, e.equipment_model |
| | | from eam_third_maintenance_furnace tmf |
| | | inner join eam_equipment e |
| | | on tmf.equipment_id = e.id |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-24 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class EamThirdMaintenanceFurnaceQuery { |
| | | private String orderNum; |
| | | private String equipmentId; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDateBegin; |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDateEnd; |
| | | private String maintenanceStatus; |
| | | |
| | | private String column; |
| | | private String order; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package org.jeecg.modules.eam.request; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: Lius |
| | | * @CreateTime: 2025-07-24 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | public class EamThirdMaintenanceFurnaceRequest extends FlowTaskVo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 3599956173993730625L; |
| | | |
| | | /**主é®*/ |
| | | @ApiModelProperty(value = "主é®") |
| | | private String id; |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | /** |
| | | * å·¥åå· |
| | | */ |
| | | @ApiModelProperty(value = "å·¥åå·") |
| | | private String orderNum; |
| | | /** |
| | | * 设å¤ID |
| | | */ |
| | | @ApiModelProperty(value = "设å¤ID") |
| | | @Dict(dictTable = "eam_equipment", dicCode = "equipment_code", dicText = "id") |
| | | private String equipmentId; |
| | | /** |
| | | * 计åä¿å
»æ¥æ |
| | | */ |
| | | @ApiModelProperty(value = "计åä¿å
»æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | /** |
| | | * å缩空æ°åå(MPa) |
| | | */ |
| | | @ApiModelProperty(value = "å缩空æ°åå(MPa)") |
| | | private String compressedAirPressureValue; |
| | | /** |
| | | * æéç空(Pa) |
| | | */ |
| | | @ApiModelProperty(value = "æéç空(Pa)") |
| | | private String ultimateVacuumValue; |
| | | /** |
| | | * æ³æ¼ç(Pa/h) |
| | | */ |
| | | @ApiModelProperty(value = "æ³æ¼ç(Pa/h)") |
| | | private String leakRate; |
| | | /** |
| | | * ååå¤ç |
| | | */ |
| | | @ApiModelProperty(value = "ååå¤ç") |
| | | private String purificationTreatment; |
| | | /** |
| | | * çæ¸©ååæ§æ£æµ |
| | | */ |
| | | @ApiModelProperty(value = "çæ¸©ååæ§æ£æµ") |
| | | private String furnaceTemperatureUniformityTesting; |
| | | /** |
| | | * å çåçæµè¯ |
| | | */ |
| | | @ApiModelProperty(value = "å çåçæµè¯") |
| | | private String heatingPowerTest; |
| | | /** |
| | | * ä¿å
»äºº |
| | | */ |
| | | @ApiModelProperty(value = "ä¿å
»äºº") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String operator; |
| | | /** |
| | | * ä¿å
»æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "ä¿å
»æ¶é´") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date operateTime; |
| | | /** |
| | | * ä¿å
»ç¶æ;å¾
æäº¤ãå¾
确认ã已宿 |
| | | */ |
| | | @ApiModelProperty(value = "ä¿å
»ç¶æ;å¾
æäº¤ãå¾
确认ã已宿") |
| | | private String maintenanceStatus; |
| | | /** |
| | | * è½å¦æ»¡è¶³å 工鿱;æ¯å¦ |
| | | */ |
| | | @ApiModelProperty(value = "è½å¦æ»¡è¶³å 工鿱;æ¯å¦") |
| | | @Dict(dicCode = "yn") |
| | | private String processingRequirementsFlag; |
| | | /** |
| | | * 确认人 |
| | | */ |
| | | @ApiModelProperty(value = "确认人") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String confirmUser; |
| | | /** 确认类å 1 éè¿ 2 驳å */ |
| | | @ApiModelProperty(value = "确认类å") |
| | | @Dict(dicCode = "approved_rejected") |
| | | private String confirmDealType; |
| | | |
| | | } |
| | |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceOrderDetail; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceSpare; |
| | | import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | @ApiModelProperty(value = "ä¿å
»æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date maintenanceDate; |
| | | private String maintenanceDate; |
| | | /** |
| | | * 维修人 |
| | | */ |
| | |
| | | */ |
| | | @ApiModelProperty(value = "å é¤ ä¿å
»é¡¹æç»") |
| | | private List<EamThirdMaintenanceOrderDetail> removeDetailList; |
| | | /** |
| | | * å¤ä»¶æç» |
| | | */ |
| | | @ApiModelProperty(value = "å¤ä»¶ä½¿ç¨æç»") |
| | | private List<EamThirdMaintenanceSpare> tableSpareList; |
| | | |
| | | /** |
| | | * æä½äººç¾å |
| | |
| | | package org.jeecg.modules.eam.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceFurnace; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceFurnaceQuery; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceFurnaceRequest; |
| | | |
| | | /** |
| | | * @Description: ç空çå¤ççä¸ä¿ |
| | |
| | | */ |
| | | public interface IEamThirdMaintenanceFurnaceService extends IService<EamThirdMaintenanceFurnace> { |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param page |
| | | * @param query |
| | | * @return |
| | | */ |
| | | IPage<EamThirdMaintenanceFurnace> queryPageList(Page<EamThirdMaintenanceFurnace> page, EamThirdMaintenanceFurnaceQuery query); |
| | | |
| | | /** |
| | | * æ°å¢çå¤ççä¿å
Ȍᴌ |
| | | * @param eamThirdMaintenanceFurnaceRequest |
| | | * @return |
| | | */ |
| | | Result<?> addThirdMaintenanceFurnace(EamThirdMaintenanceFurnaceRequest eamThirdMaintenanceFurnaceRequest); |
| | | |
| | | /** |
| | | * é¢åå·¥å |
| | | * @param id |
| | | * @return |
| | | */ |
| | | boolean collect(String id); |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * @param request |
| | | * @return |
| | | */ |
| | | boolean editMaintenance(EamThirdMaintenanceFurnaceRequest request); |
| | | |
| | | /** |
| | | * å®¡æ¹æµç¨ |
| | | * @param request |
| | | * @return |
| | | */ |
| | | EamThirdMaintenanceFurnace approval(EamThirdMaintenanceFurnaceRequest request); |
| | | } |
| | |
| | | weekInspectionDetailList.forEach(weekInspectionDetail -> { |
| | | weekInspectionDetail.setEquipmentId(eamInspectionOrderRequest.getEquipmentId()); |
| | | weekInspectionDetail.setStandardId(eamInspectionOrderRequest.getStandardId()); |
| | | // TODO å¨ç¹æ£æ¥æ |
| | | weekInspectionDetail.setPlanInspectionDate(eamInspectionOrderRequest.getInspectionDate()); |
| | | }); |
| | | eamWeekInspectionDetailService.saveBatch(weekInspectionDetailList); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.ibatis.type.JdbcType; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.task.api.Task; |
| | |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceOrderService; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.sql.Timestamp; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * @Date: 2025-07-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class EamThirdMaintenanceChangeServiceImpl extends ServiceImpl<EamThirdMaintenanceChangeMapper, EamThirdMaintenanceChange> implements IEamThirdMaintenanceChangeService { |
| | | @Service("IEamThirdMaintenanceChangeService") |
| | | public class EamThirdMaintenanceChangeServiceImpl extends ServiceImpl<EamThirdMaintenanceChangeMapper, EamThirdMaintenanceChange> implements IEamThirdMaintenanceChangeService, FlowCallBackServiceI { |
| | | |
| | | @Resource |
| | | private EamThirdMaintenanceChangeMapper eamThirdMaintenanceChangeMapper; |
| | |
| | | request.setApplicant(sysUser.getUsername()); |
| | | request.setApplyDate(new Date()); |
| | | request.setFactoryOrgCode(equipment.getFactoryOrgCode()); |
| | | request.setEquipmentId(equipment.getId()); |
| | | // ä¸ä¿åæ´å·¥åHF |
| | | EamBaseHFCode eamBaseHFCode = hfCodeService.selectByCategory(HfTemplateCategoryEnum.THIRD_MAINTENANCE_CHANGE.name()); |
| | | if (eamBaseHFCode == null) { |
| | |
| | | } |
| | | entity.setApplyReasonType(request.getApplyReasonType()); |
| | | entity.setApplyReason(request.getApplyReason()); |
| | | entity.setRemark(request.getRemark()); |
| | | entity.setApplyCategory(request.getApplyCategory()); |
| | | if ("SCRAPPED".equals(request.getApplyCategory())) { |
| | | // ç´æ¥è®¾ä¸º null |
| | | entity.setDeferredMaintenanceDate(null); |
| | | } else { |
| | | entity.setDeferredMaintenanceDate(request.getDeferredMaintenanceDate()); |
| | | } |
| | | this.getBaseMapper().updateById(entity); |
| | | return true; |
| | | } |
| | |
| | | if(BusinessCodeConst.APPROVED.equals(request.getProductionSupportSignatureResult())) { |
| | | //éè¿ |
| | | entity.setChangeStatus(ThirdMaintenanceChangeStatusEnum.COMPLETED.name()); |
| | | order.setMaintenanceStatus(ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name()); |
| | | order.setMaintenanceDate(entity.getDeferredMaintenanceDate()); |
| | | if ("SCRAPPED".equals(request.getApplyCategory())) { |
| | | order.setMaintenanceDate(null); |
| | | order.setMaintenanceStatus(ThirdMaintenanceStatusEnum.ABOLISH.name()); |
| | | } else { |
| | | order.setMaintenanceDate(entity.getDeferredMaintenanceDate()); |
| | | order.setMaintenanceStatus(ThirdMaintenanceStatusEnum.WAIT_MAINTENANCE.name()); |
| | | } |
| | | thirdMaintenanceOrderService.updateById(order); |
| | | }else { |
| | | //驳å |
| | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void afterFlowHandle(FlowMyBusiness business) { |
| | | business.getTaskNameId();//æ¥ä¸æ¥å®¡æ¹çèç¹ |
| | | business.getValues();//åç«¯ä¼ è¿æ¥çåæ° |
| | | business.getActStatus(); |
| | | } |
| | | |
| | | @Override |
| | | public Object getBusinessDataById(String dataId) { |
| | | return this.getById(dataId); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) { |
| | | //ä¸å¡æ¯å¦å¹²é¢æµç¨ï¼ä¸å¡å¹²é¢ï¼æµç¨å¹²é¢ï¼æå®äººåè¿è¡å¤ç |
| | | //è·åä¸ä¸æ¥å¤ç人 |
| | | Object object = values.get("NextAssignee"); |
| | | return (List<String>) object; |
| | | } |
| | | } |
| | |
| | | package org.jeecg.modules.eam.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.task.api.Task; |
| | | import org.jeecg.common.api.vo.Result; |
| | | import org.jeecg.common.constant.CommonConstant; |
| | | import org.jeecg.common.constant.DataBaseConstant; |
| | | import org.jeecg.common.exception.JeecgBootException; |
| | | import org.jeecg.common.system.vo.LoginUser; |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.eam.aspect.annotation.EquipmentHistoryLog; |
| | | import org.jeecg.modules.eam.constant.*; |
| | | import org.jeecg.modules.eam.entity.EamBaseHFCode; |
| | | import org.jeecg.modules.eam.entity.EamEquipment; |
| | | import org.jeecg.modules.eam.entity.EamThirdMaintenanceFurnace; |
| | | import org.jeecg.modules.eam.mapper.EamThirdMaintenanceFurnaceMapper; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceFurnaceQuery; |
| | | import org.jeecg.modules.eam.request.EamThirdMaintenanceFurnaceRequest; |
| | | import org.jeecg.modules.eam.service.IEamBaseHFCodeService; |
| | | import org.jeecg.modules.eam.service.IEamEquipmentService; |
| | | import org.jeecg.modules.eam.service.IEamThirdMaintenanceFurnaceService; |
| | | import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness; |
| | | import org.jeecg.modules.flowable.apithird.business.service.IFlowMyBusinessService; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI; |
| | | import org.jeecg.modules.flowable.apithird.service.FlowCommonService; |
| | | import org.jeecg.modules.flowable.service.IFlowDefinitionService; |
| | | import org.jeecg.modules.flowable.service.IFlowTaskService; |
| | | import org.jeecg.modules.system.entity.BaseFactory; |
| | | import org.jeecg.modules.system.entity.BaseFactoryUser; |
| | | import org.jeecg.modules.system.service.IBaseFactoryService; |
| | | import org.jeecg.modules.system.service.IBaseFactoryUserService; |
| | | import org.jeecg.modules.system.service.ISysUserService; |
| | | import org.jeecg.modules.system.vo.UserSelector; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description: ç空çå¤ççä¸ä¿ |
| | |
| | | * @Date: 2025-07-11 |
| | | * @Version: V1.0 |
| | | */ |
| | | @Service |
| | | public class EamThirdMaintenanceFurnaceServiceImpl extends ServiceImpl<EamThirdMaintenanceFurnaceMapper, EamThirdMaintenanceFurnace> implements IEamThirdMaintenanceFurnaceService { |
| | | @Service("IEamThirdMaintenanceFurnaceService") |
| | | public class EamThirdMaintenanceFurnaceServiceImpl extends ServiceImpl<EamThirdMaintenanceFurnaceMapper, EamThirdMaintenanceFurnace> implements IEamThirdMaintenanceFurnaceService, FlowCallBackServiceI { |
| | | |
| | | @Resource |
| | | private EamThirdMaintenanceFurnaceMapper eamThirdMaintenanceFurnaceMapper; |
| | | @Resource |
| | | private IBaseFactoryUserService baseFactoryUserService; |
| | | @Resource |
| | | private IBaseFactoryService baseFactoryService; |
| | | @Resource |
| | | private IEamBaseHFCodeService eamBaseHFCodeService; |
| | | @Resource |
| | | private IEamEquipmentService eamEquipmentService; |
| | | @Resource |
| | | private FlowCommonService flowCommonService; |
| | | @Resource |
| | | private IFlowDefinitionService flowDefinitionService; |
| | | @Resource |
| | | private IFlowMyBusinessService flowMyBusinessService; |
| | | @Resource |
| | | private TaskService taskService; |
| | | @Resource |
| | | private IFlowTaskService flowTaskService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | | * @param page |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<EamThirdMaintenanceFurnace> queryPageList(Page<EamThirdMaintenanceFurnace> page, EamThirdMaintenanceFurnaceQuery query) { |
| | | QueryWrapper<EamThirdMaintenanceFurnace> queryWrapper = new QueryWrapper<>(); |
| | | //ç¨æ·æ°æ®æé |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser == null) { |
| | | return page; |
| | | } |
| | | if (StringUtils.isNotBlank(sysUser.getEquipmentIds())) { |
| | | //éæ©äºè®¾å¤ï¼æ ¹æ®è®¾å¤idè¿æ»¤è®¾å¤ |
| | | List<String> equipArr = Arrays.asList(sysUser.getEquipmentIds().split(",")); |
| | | queryWrapper.in("e.equipment_code", equipArr); |
| | | } else { |
| | | //没æéæ©è®¾å¤ï¼æ ¹æ®ä¸å¿è¿æ»¤è®¾å¤ |
| | | List<BaseFactoryUser> baseFactoryUserList = baseFactoryUserService. |
| | | list(new LambdaQueryWrapper<BaseFactoryUser>().eq(BaseFactoryUser::getUserId, sysUser.getId())); |
| | | if (!CollectionUtils.isEmpty(baseFactoryUserList)) { |
| | | Set<String> factoryIds = baseFactoryUserList.stream().map(BaseFactoryUser::getFactoryId).collect(Collectors.toSet()); |
| | | Set<String> factoryCode = baseFactoryService.listByIds(factoryIds).stream().map(BaseFactory::getOrgCode).collect(Collectors.toSet()); |
| | | queryWrapper.in("e.factory_org_code", factoryCode); |
| | | } else { |
| | | return page; |
| | | } |
| | | } |
| | | //æ¥è¯¢æ¡ä»¶è¿æ»¤ |
| | | if (query != null) { |
| | | if (StringUtils.isNotBlank(query.getEquipmentId())) { |
| | | queryWrapper.eq("e.equipment_id", query.getEquipmentId()); |
| | | } |
| | | if (StringUtils.isNotBlank(query.getMaintenanceStatus())) { |
| | | queryWrapper.eq("tmf.maintenance_status", query.getMaintenanceStatus()); |
| | | } |
| | | if (query.getMaintenanceDateBegin() != null && query.getMaintenanceDateEnd() != null) { |
| | | queryWrapper.between("tmf.maintenance_date", query.getMaintenanceDateBegin(), query.getMaintenanceDateEnd()); |
| | | } |
| | | //æåº |
| | | if (StringUtils.isNotBlank(query.getColumn()) && StringUtils.isNotBlank(query.getOrder())) { |
| | | String column = query.getColumn(); |
| | | if (column.endsWith(CommonConstant.DICT_TEXT_SUFFIX)) { |
| | | column = column.substring(0, column.lastIndexOf(CommonConstant.DICT_TEXT_SUFFIX)); |
| | | } |
| | | if (DataBaseConstant.SQL_ASC.equalsIgnoreCase(query.getOrder())) { |
| | | queryWrapper.orderByAsc("tmf." + oConvertUtils.camelToUnderline(column)); |
| | | } else { |
| | | queryWrapper.orderByDesc("tmf." + oConvertUtils.camelToUnderline(column)); |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc("tmf.create_time"); |
| | | } |
| | | } |
| | | return eamThirdMaintenanceFurnaceMapper.queryPageList(page, queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Result<?> addThirdMaintenanceFurnace(EamThirdMaintenanceFurnaceRequest eamThirdMaintenanceFurnaceRequest) { |
| | | List<EamThirdMaintenanceFurnace> eamThirdMaintenanceFurnaces = eamThirdMaintenanceFurnaceMapper.selectList(new LambdaQueryWrapper<EamThirdMaintenanceFurnace>().eq(EamThirdMaintenanceFurnace::getEquipmentId, eamThirdMaintenanceFurnaceRequest.getEquipmentId()).eq(EamThirdMaintenanceFurnace::getMaintenanceDate, eamThirdMaintenanceFurnaceRequest.getMaintenanceDate()).ne(EamThirdMaintenanceFurnace::getMaintenanceStatus, ThirdMaintenanceFurnaceStatusEnum.ABOLISH.name())); |
| | | if (CollectionUtils.isNotEmpty(eamThirdMaintenanceFurnaces)) { |
| | | return Result.error("æ·»å 失败,ç³»ç»å·²åå¨å½åæ¥æå·¥åï¼"); |
| | | } |
| | | EamThirdMaintenanceFurnace eamThirdMaintenanceFurnace = new EamThirdMaintenanceFurnace(); |
| | | BeanUtils.copyProperties(eamThirdMaintenanceFurnaceRequest, eamThirdMaintenanceFurnace); |
| | | //ä¿®æ¹ç¶æ |
| | | eamThirdMaintenanceFurnace.setMaintenanceStatus(ThirdMaintenanceFurnaceStatusEnum.WAIT_MAINTENANCE.name()); |
| | | eamThirdMaintenanceFurnace.setDelFlag(CommonConstant.DEL_FLAG_0); |
| | | //HFç å¤ç |
| | | EamBaseHFCode eamBaseHFCode = eamBaseHFCodeService.selectByCategory(HfTemplateCategoryEnum.THIRD_MAINTENANCE_FURNACE.name()); |
| | | if (eamBaseHFCode == null) { |
| | | return Result.error("æ·»å 失败,æªé
ç½®ç空çå¤ççæ£éªè¡¨HFç¼ç ï¼"); |
| | | } |
| | | eamThirdMaintenanceFurnace.setHfCode(eamBaseHFCode.getHfCode()); |
| | | save(eamThirdMaintenanceFurnace); |
| | | return Result.OK("æ·»å æåï¼"); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean collect(String id) { |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceMapper.selectById(id); |
| | | if (entity == null) { |
| | | throw new JeecgBootException("è¦é¢åçå·¥åä¸åå¨ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!ThirdMaintenanceFurnaceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | throw new JeecgBootException("该工åå·²è¿è¡è¿é¢åï¼"); |
| | | } |
| | | EamEquipment equipment = eamEquipmentService.getById(entity.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | | } |
| | | LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (sysUser == null || !BusinessCodeConst.PCR0002.equals(sysUser.getPost())) { |
| | | throw new JeecgBootException("䏿¯ç»´ä¿®å·¥ï¼æ æ³é¢åæ¤å·¥åï¼"); |
| | | } |
| | | entity.setOperator(sysUser.getUsername()); |
| | | entity.setMaintenanceStatus(ThirdMaintenanceFurnaceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | eamThirdMaintenanceFurnaceMapper.updateById(entity); |
| | | // å¯å¨æµç¨ |
| | | flowCommonService.initActBusiness("å·¥åå·:" + entity.getOrderNum() + ";设å¤ç¼å·: " + equipment.getEquipmentCode(), |
| | | entity.getId(), "IEamThirdMaintenanceFurnaceService", "third_maintenance_furnace_process", null); |
| | | Map<String, Object> variables = new HashMap<>(); |
| | | variables.put("dataId", entity.getId()); |
| | | if (StrUtil.isEmpty(entity.getRemark())) { |
| | | variables.put("organization", "æ°å¢çå¤ççä¸ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | variables.put("comment", "æ°å¢çå¤ççä¸ä¿å·¥åé»è®¤å¯å¨æµç¨"); |
| | | } else { |
| | | variables.put("organization", entity.getRemark()); |
| | | variables.put("comment", entity.getRemark()); |
| | | } |
| | | variables.put("proofreading", true); |
| | | // 设置ä¸ä¸æ¥å¤ç人 |
| | | List<String> usernames = new ArrayList<>(); |
| | | usernames.add(entity.getOperator()); |
| | | variables.put("NextAssignee", usernames); |
| | | Result result = flowDefinitionService.startProcessInstanceByKey("third_maintenance_furnace_process", variables); |
| | | // if (result != null) { |
| | | // //æ´æ°è®¾å¤ä¿å
»ç¶æ |
| | | // eamEquipmentExtendService.updateEquipmentMaintenanceStatus(entity.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_THIRD_MAINTENANCE.name()); |
| | | // return result.isSuccess(); |
| | | // } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean editMaintenance(EamThirdMaintenanceFurnaceRequest request) { |
| | | EamEquipment equipment = eamEquipmentService.getById(request.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼æ·»å 失败ï¼"); |
| | | } |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceMapper.selectById(request.getId()); |
| | | if (entity == null) { |
| | | throw new JeecgBootException("ç¼è¾çæ°æ®å·²å é¤ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if (!ThirdMaintenanceFurnaceStatusEnum.WAIT_MAINTENANCE.name().equals(entity.getMaintenanceStatus())) { |
| | | throw new JeecgBootException("åªæå¾
ä¿å
»ç¶æçæ°æ®æå¯ç¼è¾ï¼"); |
| | | } |
| | | entity.setMaintenanceDate(request.getMaintenanceDate()); |
| | | entity.setRemark(request.getRemark()); |
| | | eamThirdMaintenanceFurnaceMapper.updateById(entity); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @EquipmentHistoryLog(operationTag = EquipmentOperationTagEnum.THIRD_MAINTENANCE, businessTable = "eam_third_maintenance_furnace") |
| | | public EamThirdMaintenanceFurnace approval(EamThirdMaintenanceFurnaceRequest request) { |
| | | EamThirdMaintenanceFurnace entity = eamThirdMaintenanceFurnaceMapper.selectById(request.getId()); |
| | | if (entity == null) { |
| | | throw new JeecgBootException("å¾
å¤ççæ°æ®å·²å é¤ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | // è·åå½åç»å½ç¨æ· |
| | | LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
| | | if (user == null || StrUtil.isBlank(user.getId())) { |
| | | throw new JeecgBootException("æªè·åå°ç»å½ç¨æ·ï¼è¯·éæ°ç»å½ååè¯ï¼"); |
| | | } |
| | | request.setAssignee(user.getUsername()); |
| | | // è·åæµç¨ä¸å¡è®°å½ |
| | | FlowMyBusiness flowMyBusiness = flowMyBusinessService.getFlowMyBusiness(request.getInstanceId(), request.getTaskId()); |
| | | if (flowMyBusiness == null) { |
| | | throw new JeecgBootException("æµç¨å®ä¾ä¸åå¨ï¼è¯·å·æ°åéè¯ï¼"); |
| | | } |
| | | |
| | | if (!isUserAuthorized(flowMyBusiness, user)) { |
| | | throw new JeecgBootException("ç¨æ·æ ææä½æ¤ä»»å¡ï¼è¯·å·æ°åéè¯ï¼"); |
| | | } |
| | | // 认é¢ä»»å¡ |
| | | if (!claimTask(flowMyBusiness.getTaskId(), user)) { |
| | | throw new JeecgBootException("ä»»å¡ä¸åå¨ã已宿æå·²è¢«ä»äººè®¤é¢ï¼"); |
| | | } |
| | | EamEquipment equipment = eamEquipmentService.getById(entity.getEquipmentId()); |
| | | if (equipment == null) { |
| | | throw new JeecgBootException("设å¤ä¸åå¨ï¼è¯·æ£æ¥ï¼"); |
| | | } |
| | | // 设置æµç¨åé |
| | | setupProcessVariables(request, entity, user, equipment); |
| | | |
| | | // 宿æµç¨ä»»å¡ |
| | | Result result = flowTaskService.complete(request); |
| | | |
| | | // æ ¹æ®ä»»å¡å®æç»ææ´æ°å·¥åç¶æ |
| | | updateOrderStatus(result, request, entity, user); |
| | | |
| | | //æ´æ°å·¥åä¿¡æ¯ |
| | | eamThirdMaintenanceFurnaceMapper.updateById(entity); |
| | | return entity; |
| | | } |
| | | |
| | | /** |
| | | * 设置æµç¨åé |
| | | */ |
| | | private void setupProcessVariables(EamThirdMaintenanceFurnaceRequest request, EamThirdMaintenanceFurnace entity, LoginUser user, EamEquipment equipment) { |
| | | //æµç¨åé |
| | | Map<String, Object> values = new HashMap<>(); |
| | | List<String> userApprovalList; |
| | | List<UserSelector> userSelectors; |
| | | if (ThirdMaintenanceFurnaceStatusEnum.UNDER_MAINTENANCE.name().equals(entity.getMaintenanceStatus()) && user.getUsername().equals(entity.getOperator())) { |
| | | // ä¿å
»äººä¿å
ȍȾ |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", "ä¿å
»äººä¿å
ȍȾ"); |
| | | values.put("comment", "ä¿å
»äººä¿å
ȍȾ"); |
| | | // è·åä¸ä¸æ¥æ§è¡äºº |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | | if (CollectionUtil.isEmpty(userSelectors)) { |
| | | throw new JeecgBootException("è®¾å¤æªåé
ç»ç»´ä¿®ç»é¿ï¼æ æ³è¿å
¥ä¸çº§å®¡æ¹ï¼"); |
| | | } |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | request.setComment("ä¿å
»äººä¿å
ȍȾ"); |
| | | } else { |
| | | // ç»´ä¿®ç»é¿ç¡®è®¤ |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", "ç»´ä¿®ç»é¿ç¡®è®¤ç»æ"); |
| | | values.put("comment", "ç»´ä¿®ç»é¿ç¡®è®¤ç»æ"); |
| | | request.setComment("ç»´ä¿®ç»é¿ç¡®è®¤ç»æ"); |
| | | } |
| | | request.setValues(values); |
| | | } |
| | | |
| | | /** |
| | | * æ´æ°å·¥åç¶æ |
| | | */ |
| | | private void updateOrderStatus(Result result, EamThirdMaintenanceFurnaceRequest request, EamThirdMaintenanceFurnace entity, LoginUser user) { |
| | | if (result.isSuccess()) { |
| | | if (ThirdMaintenanceFurnaceStatusEnum.UNDER_MAINTENANCE.name().equals(entity.getMaintenanceStatus()) && user.getUsername().equals(entity.getOperator())) { |
| | | //维修工ä¿å
»å®æ |
| | | entity.setMaintenanceStatus(ThirdMaintenanceFurnaceStatusEnum.WAIT_CONFIRM.name()); |
| | | entity.setOperateTime(new Date()); |
| | | entity.setCompressedAirPressureValue(request.getCompressedAirPressureValue()); |
| | | entity.setUltimateVacuumValue(request.getUltimateVacuumValue()); |
| | | entity.setLeakRate(request.getLeakRate()); |
| | | entity.setPurificationTreatment(request.getPurificationTreatment()); |
| | | entity.setFurnaceTemperatureUniformityTesting(request.getFurnaceTemperatureUniformityTesting()); |
| | | entity.setHeatingPowerTest(request.getHeatingPowerTest()); |
| | | entity.setProcessingRequirementsFlag(request.getProcessingRequirementsFlag()); |
| | | } else { |
| | | //ç»´ä¿®ç»é¿ç¡®è®¤å®æ |
| | | entity.setMaintenanceStatus(ThirdMaintenanceFurnaceStatusEnum.COMPLETE.name()); |
| | | entity.setConfirmUser(user.getUsername()); |
| | | entity.setConfirmTime(new Date()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private boolean isUserAuthorized(FlowMyBusiness flowMyBusiness, LoginUser user) { |
| | | List<String> todoUsers = JSON.parseArray(flowMyBusiness.getTodoUsers(), String.class); |
| | | return todoUsers != null && todoUsers.contains(user.getUsername()); |
| | | } |
| | | |
| | | private boolean claimTask(String taskId, LoginUser user) { |
| | | Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
| | | if (task == null) { |
| | | return false; |
| | | } |
| | | if (task.getAssignee() != null && !task.getAssignee().equals(user.getUsername())) { |
| | | return false; |
| | | } |
| | | taskService.claim(taskId, user.getUsername()); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void afterFlowHandle(FlowMyBusiness business) { |
| | | business.getTaskNameId();//æ¥ä¸æ¥å®¡æ¹çèç¹ |
| | | business.getValues();//åç«¯ä¼ è¿æ¥çåæ° |
| | | business.getActStatus(); |
| | | } |
| | | |
| | | @Override |
| | | public Object getBusinessDataById(String dataId) { |
| | | return this.getById(dataId); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> flowValuesOfTask(String taskNameId, Map<String, Object> values) { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> flowCandidateUsernamesOfTask(String taskNameId, Map<String, Object> values) { |
| | | //ä¸å¡æ¯å¦å¹²é¢æµç¨ï¼ä¸å¡å¹²é¢ï¼æµç¨å¹²é¢ï¼æå®äººåè¿è¡å¤ç |
| | | //è·åä¸ä¸æ¥å¤ç人 |
| | | Object object = values.get("NextAssignee"); |
| | | return (List<String>) object; |
| | | } |
| | | } |
| | |
| | | private IEamBaseHFCodeService eamBaseHFCodeService; |
| | | @Resource |
| | | private IEamThirdMaintenanceOrderDetailService eamThirdMaintenanceOrderDetailService; |
| | | @Resource |
| | | private IEamThirdMaintenanceSpareService eamThirdMaintenanceSpareService; |
| | | |
| | | @Override |
| | | public IPage<EamThirdMaintenanceOrder> queryPageList(Page<EamThirdMaintenanceOrder> page, EamThirdMaintenanceQuery query) { |
| | |
| | | // ä¸ä¿æç»å¤ç |
| | | eamThirdMaintenanceOrderDetailService.remove(new LambdaQueryWrapper<EamThirdMaintenanceOrderDetail>().eq(EamThirdMaintenanceOrderDetail::getOrderId, order.getId())); |
| | | eamThirdMaintenanceOrderDetailService.saveBatch(request.getTableDetailList()); |
| | | // ä¸ä¿å¤ä»¶æç»å¤ç |
| | | if (request.getTableSpareList() != null && !request.getTableSpareList().isEmpty()) { |
| | | List<EamThirdMaintenanceSpare> tableSpareList = request.getTableSpareList(); |
| | | tableSpareList.forEach(eamThirdMaintenanceSpare -> { |
| | | eamThirdMaintenanceSpare.setOrderId(request.getId()); |
| | | }); |
| | | eamThirdMaintenanceSpareService.saveBatch(tableSpareList); |
| | | } |
| | | break; |
| | | case UNDER_FIRST_ACCEPTANCE: |
| | | // ç¬¬ä¸æ¬¡éªæ¶ç»æ |