| | |
| | | "name": "430设å¤ç®¡çæ°æ®åºè®¾è®¡", |
| | | "describe": "æè¿°è®¾å¤ç®¡çæ°æ®åºè®¾è®¡ææ¡£", |
| | | "avatar": "", |
| | | "version": "4.9.2", |
| | | "version": "4.9.4", |
| | | "createdTime": "2025-3-10 16:38:19", |
| | | "updatedTime": "2025-7-14 11:25:39", |
| | | "updatedTime": "2025-7-15 10:15:51", |
| | | "dbConns": [], |
| | | "profile": { |
| | | "default": { |
| | |
| | | "extProps": {}, |
| | | "domain": "9092C4E0-1A54-4859-ABBB-5B62DBC27573", |
| | | "id": "AD503E36-C231-4D72-8643-AE270605278C" |
| | | }, |
| | | { |
| | | "defKey": "true_heat_treatment", |
| | | "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": "50146CF4-21BF-4B90-A7EA-C4DB721CBBFC" |
| | | } |
| | | ], |
| | | "correlations": [], |
| | |
| | | DEPART_MANAGER_SIGNING, //é¨é¨é¢å¯¼ç¾åä¸ |
| | | PRODUCTION_SUPPORT_SIGNING, //ä¿éé¨é¢å¯¼ç¾åä¸ |
| | | ABOLISH, //å·²ä½åº |
| | | REJECTED, //已驳å |
| | | COMPLETED, //已宿 |
| | | ; |
| | | |
| | |
| | | private String equipmentSpecification; |
| | | |
| | | /** |
| | | * ç空çå¤çç |
| | | */ |
| | | @Excel(name = "ç空çå¤çç", width = 15, orderNum = "35") |
| | | @ApiModelProperty(value = "ç空çå¤çç") |
| | | @Dict(dicCode = "yn") |
| | | private String trueHeatTreatment; |
| | | |
| | | /** |
| | | * æ»åç(KW) |
| | | */ |
| | | @Excel(name = "æ»åç(KW)", width = 15, orderNum = "35") |
| | | @Excel(name = "æ»åç(KW)", width = 15, orderNum = "36") |
| | | @ApiModelProperty(value = "æ»åç") |
| | | private String equipmentPower; |
| | | |
| | | /** |
| | | * è´¨ä¿å¼å§æ¥æ |
| | | */ |
| | | @Excel(name = "è´¨ä¿å¼å§æ¥æ", width = 25, format = "yyyy/MM/dd", orderNum = "36") |
| | | @Excel(name = "è´¨ä¿å¼å§æ¥æ", width = 25, format = "yyyy/MM/dd", orderNum = "37") |
| | | @ApiModelProperty(value = "è´¨ä¿å¼å§æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | /** |
| | | * è´¨ä¿ç»ææ¥æ |
| | | */ |
| | | @Excel(name = "è´¨ä¿ç»ææ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "37") |
| | | @Excel(name = "è´¨ä¿ç»ææ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "38") |
| | | @ApiModelProperty(value = "è´¨ä¿ç»ææ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | /** |
| | | * èµäº§ç¶æ |
| | | */ |
| | | @Excel(name = "èµäº§ç¶æ", width = 15, orderNum = "38",dicCode = "asset_status") |
| | | @Excel(name = "èµäº§ç¶æ", width = 15, orderNum = "39",dicCode = "asset_status") |
| | | @ApiModelProperty(value = "èµäº§ç¶æ") |
| | | @Dict(dicCode = "asset_status") |
| | | private String assetStatus; |
| | | |
| | | /**ææ°äºä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ°äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "39") |
| | | @Excel(name = "ææ°äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "40") |
| | | @ApiModelProperty(value = "ææ°äºä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**䏿¬¡äºä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "䏿¬¡äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "40") |
| | | @Excel(name = "䏿¬¡äºä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "41") |
| | | @ApiModelProperty(value = "䏿¬¡äºä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**æ¬æ¬¡ä¸ä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "æ¬æ¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd",orderNum = "41") |
| | | @Excel(name = "æ¬æ¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd",orderNum = "42") |
| | | @ApiModelProperty(value = "æ¬æ¬¡ä¸ä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**䏿¬¡ä¸ä¿æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "䏿¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "42") |
| | | @Excel(name = "䏿¬¡ä¸ä¿æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "43") |
| | | @ApiModelProperty(value = "䏿¬¡ä¸ä¿æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | |
| | | /**ä¸ä¿å¨æ(å¹´)*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ä¸ä¿å¨æ(å¹´)", width = 15, orderNum = "43") |
| | | @Excel(name = "ä¸ä¿å¨æ(å¹´)", width = 15, orderNum = "44") |
| | | @ApiModelProperty(value = "ä¸ä¿å¨æ(å¹´)") |
| | | private Integer thirdMaintenancePeriod; |
| | | |
| | | /**ææ°ææ¯ç¶æé´å®æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ°ææ¯ç¶æé´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "44") |
| | | @Excel(name = "ææ°ææ¯ç¶æé´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "45") |
| | | @ApiModelProperty(value = "ææ°ææ¯ç¶æé´å®æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private java.util.Date latestTechnologyCheck; |
| | | /**ææ¯ç¶æä¸æ¬¡é´å®æ¥æ*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "45") |
| | | @Excel(name = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ", width = 15, format = "yyyy/MM/dd", orderNum = "46") |
| | | @ApiModelProperty(value = "ææ¯ç¶æä¸æ¬¡é´å®æ¥æ") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private java.util.Date nextTechnologyCheck; |
| | | /**ææ¯é´å®å¨æ(å¹´)*/ |
| | | @TableField(exist = false) |
| | | @Excel(name = "ææ¯é´å®å¨æ(å¹´)", width = 15, orderNum = "46") |
| | | @Excel(name = "ææ¯é´å®å¨æ(å¹´)", width = 15, orderNum = "47") |
| | | @ApiModelProperty(value = "ææ¯é´å®å¨æ(å¹´)") |
| | | private Integer technologyCheckPeriod; |
| | | |
| | | /** |
| | | * æ¯å¦ä¸»è®¾å¤ |
| | | */ |
| | | @Excel(name = "æ¯å¦ä¸»è®¾å¤", width = 15, dicCode = "yn", orderNum = "47") |
| | | @Excel(name = "æ¯å¦ä¸»è®¾å¤", width = 15, dicCode = "yn", orderNum = "48") |
| | | @ApiModelProperty(value = "æ¯å¦ä¸»è®¾å¤") |
| | | @Dict(dicCode = "yn") |
| | | private String masterFlag; |
| | |
| | | /** |
| | | * æ¯å¦æå·¥èºåæ° |
| | | */ |
| | | @Excel(name = "ææ å·¥èºåæ°", width = 15, dicCode = "yn", orderNum = "48") |
| | | @Excel(name = "ææ å·¥èºåæ°", width = 15, dicCode = "yn", orderNum = "49") |
| | | @ApiModelProperty(value = "æ¯å¦æå·¥èºåæ°") |
| | | @Dict(dicCode = "yn") |
| | | private String processParametersFlag; |
| | | /** |
| | | * æ¯å¦æç²¾åº¦åæ° |
| | | */ |
| | | @Excel(name = "ææ ç²¾åº¦åæ°", width = 15, dicCode = "yn", orderNum = "49") |
| | | @Excel(name = "ææ ç²¾åº¦åæ°", width = 15, dicCode = "yn", orderNum = "50") |
| | | @ApiModelProperty(value = "æ¯å¦æç²¾åº¦åæ°") |
| | | @Dict(dicCode = "yn") |
| | | private String precisionParametersFlag; |
| | |
| | | /** |
| | | * 夿³¨ |
| | | */ |
| | | @Excel(name = "夿³¨", width = 50, orderNum = "50") |
| | | @Excel(name = "夿³¨", width = 50, orderNum = "51") |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | |
| | | @ApiModelProperty(value = "管çå确认") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String manageUser; |
| | | /** |
| | | * 管çåç¡®è®¤ç»æ |
| | | */ |
| | | @ApiModelProperty(value = "管çåç¡®è®¤ç»æ") |
| | | @Dict(dicCode = "approve_reject") |
| | | private String manageUserResult; |
| | | /** é®é¢æè¿°;é»è®¤ æ */ |
| | | @ApiModelProperty(name = "é®é¢æè¿°",notes = "é»è®¤ æ ") |
| | | private String problemDescription ; |
| | |
| | | @ApiModelProperty(name = "管çå确认æ¶é´",notes = "") |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date confirmTime ; |
| | | private Date confirmTime; |
| | | /** æ£æ¥äººç¡®è®¤ */ |
| | | @ApiModelProperty(name = "æ£æ¥äººç¡®è®¤",notes = "") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String inspector; |
| | | /** |
| | | * æ£æ¥äººç¡®è®¤ç»æ |
| | | */ |
| | | @ApiModelProperty(name = "æ£æ¥äººç¡®è®¤ç»æ",notes = "") |
| | | @Dict(dicCode = "approve_reject") |
| | | private String inspectorResult; |
| | | /** æ£æ¥äººæè§ */ |
| | | @ApiModelProperty(name = "æ£æ¥äººæè§",notes = "") |
| | | private String inspectConfirmComment; |
| | |
| | | /** |
| | | * ç¼è¾ |
| | | * |
| | | * @param eamTechnicalStatusEvaluationOrderChange |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @AutoLog(value = "ææ¯ç¶æé´å®å·¥ååæ´-ç¼è¾") |
| | | @ApiOperation(value="ææ¯ç¶æé´å®å·¥ååæ´-ç¼è¾", notes="ææ¯ç¶æé´å®å·¥ååæ´-ç¼è¾") |
| | | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
| | | public Result<?> edit(@RequestBody EamTechnicalStatusEvaluationOrderChange eamTechnicalStatusEvaluationOrderChange) { |
| | | eamTechnicalStatusEvaluationOrderChangeService.updateById(eamTechnicalStatusEvaluationOrderChange); |
| | | public Result<?> edit(@RequestBody EamTechnicalStatusEvaluationOrderChange request) { |
| | | if (request == null) { |
| | | return Result.error("ç¼è¾ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | boolean b = eamTechnicalStatusEvaluationOrderChangeService.editTechnicalStatusEvaluationOrderChange(request); |
| | | if (!b) { |
| | | return Result.error("ç¼è¾å¤±è´¥ï¼"); |
| | | } |
| | | return Result.OK("ç¼è¾æå!"); |
| | | } |
| | | |
| | |
| | | |
| | | 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.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.api.vo.Result; |
| | | import org.jeecg.common.aspect.annotation.AutoLog; |
| | | import org.jeecg.common.system.base.controller.JeecgController; |
| | | import org.jeecg.common.util.TranslateDictTextUtils; |
| | | import org.jeecg.modules.eam.entity.EamTechnicalStatusEvaluationOrder; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderQuery; |
| | | import org.jeecg.modules.eam.request.EamTechnicalStatusEvaluationOrderRequest; |
| | |
| | | public class EamTechnicalStatusEvaluationOrderController extends JeecgController<EamTechnicalStatusEvaluationOrder, IEamTechnicalStatusEvaluationOrderService> { |
| | | @Autowired |
| | | private IEamTechnicalStatusEvaluationOrderService eamTechnicalStatusEvaluationOrderService; |
| | | @Autowired |
| | | private ObjectMapper objectMapper; |
| | | @Autowired |
| | | private TranslateDictTextUtils translateDictTextUtils; |
| | | |
| | | /** |
| | | * å页å表æ¥è¯¢ |
| | |
| | | if (request == null) { |
| | | return Result.error("审æ¹ç对象ä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | if(CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | return Result.error("æ£æ¥æç»ä¿¡æ¯ä¸ºç©ºï¼"); |
| | | } |
| | | // æ£æ¥è¯·æ±åæ° |
| | | if (StrUtil.isBlank(request.getTaskId()) || StrUtil.isBlank(request.getDataId()) || StrUtil.isBlank(request.getInstanceId())) { |
| | | return Result.error("审æ¹ä»»å¡é误æä¸åå¨ï¼"); |
| | |
| | | @GetMapping(value = "/queryById") |
| | | public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
| | | EamTechnicalStatusEvaluationOrder eamTechnicalStatusEvaluationOrder = eamTechnicalStatusEvaluationOrderService.getById(id); |
| | | return Result.OK(eamTechnicalStatusEvaluationOrder); |
| | | if (eamTechnicalStatusEvaluationOrder == null) { |
| | | return Result.error("æªæ¾å°å¯¹åºæ°æ®"); |
| | | } |
| | | try { |
| | | String json = objectMapper.writeValueAsString(eamTechnicalStatusEvaluationOrder); |
| | | JSONObject item = JSONObject.parseObject(json, Feature.OrderedField); |
| | | translateDictTextUtils.translateField("evaluator", eamTechnicalStatusEvaluationOrder.getEvaluator(), item, "sys_user,realname,username"); |
| | | return Result.OK(item); |
| | | } catch (JsonProcessingException e) { |
| | | return Result.error("æ°æ®è½¬è¯å¤±è´¥ï¼"); |
| | | } |
| | | } |
| | | } |
| | |
| | | private Date actualEndTime; |
| | | /**é¢å人*/ |
| | | @ApiModelProperty(value = "é¢å人") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String evaluator; |
| | | /**é´å®ç¶æ;å¾
é´å®ãé´å®ä¸ã维修室主任ç¾åãå·¥èºäººåç¾åã使ç¨å使æ¯ä¸»ç®¡ç¾åãè®¾å¤æ£éªåç¾åã已宿ãå·²éå®ãåæ´ä¸ãå·²è¿æ*/ |
| | | @ApiModelProperty(value = "é´å®ç¶æ;å¾
é´å®ãé´å®ä¸ã维修室主任ç¾åãå·¥èºäººåç¾åã使ç¨å使æ¯ä¸»ç®¡ç¾åãè®¾å¤æ£éªåç¾åã已宿ãå·²éå®ãåæ´ä¸ãå·²è¿æ") |
| | |
| | | private String otherCheckCompleted; |
| | | /**å®å
¨è£
ç½®æ£æ¥ç¡®è®¤äºº*/ |
| | | @ApiModelProperty(value = "å®å
¨è£
ç½®æ£æ¥ç¡®è®¤äºº") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String safetyCheckConfirm; |
| | | /**å®å
¨è£
ç½®æ£æ¥ç¡®è®¤æ¶é´*/ |
| | | @ApiModelProperty(value = "å®å
¨è£
ç½®æ£æ¥ç¡®è®¤æ¶é´") |
| | |
| | | private String safetyCheckConfirmComment; |
| | | /**设å¤ç²¾åº¦æ£æ¥ç¡®è®¤äºº*/ |
| | | @ApiModelProperty(value = "设å¤ç²¾åº¦æ£æ¥ç¡®è®¤äºº") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String precisionCheckConfirm; |
| | | /**设å¤ç²¾åº¦æ£æ¥ç¡®è®¤æ¶é´*/ |
| | | @ApiModelProperty(value = "设å¤ç²¾åº¦æ£æ¥ç¡®è®¤æ¶é´") |
| | |
| | | private String precisionCheckConfirmComment; |
| | | /**å
¶ä»æ£æ¥ç¡®è®¤äºº*/ |
| | | @ApiModelProperty(value = "å
¶ä»æ£æ¥ç¡®è®¤äºº") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String otherCheckConfirm; |
| | | /**å
¶ä»æ£æ¥ç¡®è®¤æ¶é´*/ |
| | | @ApiModelProperty(value = "å
¶ä»æ£æ¥ç¡®è®¤æ¶é´") |
| | |
| | | private String otherCheckResult; |
| | | /**维修人ç¾å*/ |
| | | @ApiModelProperty(value = "维修人ç¾å") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String repairerSignature; |
| | | /**维修人ç¾åæ¶é´*/ |
| | | @ApiModelProperty(value = "维修人ç¾åæ¶é´") |
| | |
| | | private Date repairerSignatureTime; |
| | | /**维修室主任ç¾å*/ |
| | | @ApiModelProperty(value = "维修室主任ç¾å") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String repairManagerSignature; |
| | | /**维修室主任ç¾åæ¶é´*/ |
| | | @ApiModelProperty(value = "维修室主任ç¾åæ¶é´") |
| | |
| | | private String sampleCheckResult; |
| | | /**å·¥èºåç¾å*/ |
| | | @ApiModelProperty(value = "å·¥èºåç¾å") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String processTechnicianSignature; |
| | | /**å·¥èºåç¾åæ¶é´*/ |
| | | @ApiModelProperty(value = "å·¥èºåç¾åæ¶é´") |
| | |
| | | private String processTechnicianComment; |
| | | /**使ç¨å使æ¯ä¸»ç®¡ç¾å*/ |
| | | @ApiModelProperty(value = "使ç¨å使æ¯ä¸»ç®¡ç¾å") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String departTechnicalLeaderSignature; |
| | | /**使ç¨å使æ¯ä¸»ç®¡ç¾åæ¶é´*/ |
| | | @ApiModelProperty(value = "使ç¨å使æ¯ä¸»ç®¡ç¾åæ¶é´") |
| | |
| | | private String evaluationReason; |
| | | /**è®¾å¤æ£æ¥äººç¾å*/ |
| | | @ApiModelProperty(value = "è®¾å¤æ£æ¥äººç¾å") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | @Dict(dictTable = "sys_user", dicCode = "username", dicText = "realname") |
| | | private String inspectorSignature; |
| | | /**è®¾å¤æ£æ¥äººç¾åæ¶é´*/ |
| | | @ApiModelProperty(value = "è®¾å¤æ£æ¥äººç¾åæ¶é´") |
| | |
| | | import lombok.experimental.Accessors; |
| | | import org.jeecg.common.api.vo.FileUploadResult; |
| | | import org.jeecg.common.aspect.annotation.Dict; |
| | | import org.jeecg.modules.eam.entity.EamInspectionOrderDetail; |
| | | import org.jeecg.modules.eam.entity.EamSecondMaintenanceOrderDetail; |
| | | import org.jeecg.modules.eam.entity.EamWeekInspectionDetail; |
| | | import org.jeecg.modules.flowable.domain.vo.FlowTaskVo; |
| | | import org.jeecgframework.poi.excel.annotation.Excel; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | @ApiModelProperty(value = "管çå确认") |
| | | @Dict(dicCode = "sys_user, realname, username") |
| | | private String manageUser; |
| | | /** |
| | | * 管çåç¡®è®¤ç»æ |
| | | */ |
| | | @ApiModelProperty(value = "管çåç¡®è®¤ç»æ") |
| | | @Dict(dicCode = "approve_reject") |
| | | private String manageUserResult; |
| | | /** é®é¢æè¿°;é»è®¤ æ */ |
| | | @ApiModelProperty(name = "é®é¢æè¿°",notes = "é»è®¤ æ ") |
| | | private String problemDescription ; |
| | |
| | | /** æ£æ¥äººç¡®è®¤ */ |
| | | @ApiModelProperty(name = "æ£æ¥äººç¡®è®¤",notes = "") |
| | | private String inspector; |
| | | /** |
| | | * æ£æ¥äººç¡®è®¤ç»æ |
| | | */ |
| | | @ApiModelProperty(name = "æ£æ¥äººç¡®è®¤ç»æ",notes = "") |
| | | @Dict(dicCode = "approve_reject") |
| | | private String inspectorResult; |
| | | /** æ£æ¥äººæè§ */ |
| | | @ApiModelProperty(name = "æ£æ¥äººæè§",notes = "") |
| | | private String inspectConfirmComment; |
| | |
| | | @Excel(name = "夿³¨", width = 15) |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | /**å表 维修工æç»*/ |
| | | @ApiModelProperty(value = "å表 维修工æç»") |
| | | private List<EamSecondMaintenanceOrderDetail> repairmanDetailList;; |
| | | |
| | | /**å表 æä½å·¥æç»*/ |
| | | @ApiModelProperty(value = "å表 维修工æç»") |
| | | private List<EamSecondMaintenanceOrderDetail> operatorDetailList;; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | boolean addTechnicalStatusEvaluationOrderChange(EamTechnicalStatusEvaluationOrderChange request); |
| | | |
| | | /** |
| | | * ç¼è¾ |
| | | * @param request |
| | | * @return |
| | | */ |
| | | boolean editTechnicalStatusEvaluationOrderChange(EamTechnicalStatusEvaluationOrderChange request); |
| | | } |
| | |
| | | |
| | | // 触åä¿å
»æµç¨ |
| | | SysParams sysParams = sysParamsService.getSysPramBySettingKey("maintenance_import_type"); |
| | | if (sysParams != null && sysParams.getSettingValue().equals("1")) { |
| | | eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name()); |
| | | eamMaintenanceStandardMapper.updateById(eamMaintenanceStandard); |
| | | if (sysParams != null) { |
| | | if (sysParams.getSettingValue().equals("1")){ |
| | | eamMaintenanceStandard.setStandardStatus(MaintenanceStandardStatusEnum.WAIT_SUBMIT.name()); |
| | | eamMaintenanceStandardMapper.updateById(eamMaintenanceStandard); |
| | | } |
| | | } else { |
| | | return Result.error("æªæ¾å°ä¿å
»æµç¨å¯¼å
¥ç¸å
³é
ç½®,请è系管çå"); |
| | | } |
| | |
| | | throw new JeecgBootException("䏿¯æä½å·¥ï¼æ æ³é¢åæ¤å·¥åï¼"); |
| | | } |
| | | } |
| | | List<String> usernames = new ArrayList<>(); |
| | | if (sysUser != null) { |
| | | entity.setOperator(sysUser.getUsername()); |
| | | } |
| | | if (BusinessCodeConst.PCR0001.equals(sysUser.getPost())) { |
| | | entity.setOperator(sysUser.getUsername()); |
| | | }else if (BusinessCodeConst.PCR0002.equals(sysUser.getPost())) { |
| | | entity.setRepairman(sysUser.getUsername()); |
| | | if (BusinessCodeConst.PCR0001.equals(sysUser.getPost())) { |
| | | entity.setOperator(sysUser.getUsername()); |
| | | usernames.add(entity.getOperator()); |
| | | } |
| | | if (BusinessCodeConst.PCR0002.equals(sysUser.getPost())) { |
| | | entity.setRepairman(sysUser.getUsername()); |
| | | usernames.add(entity.getRepairman()); |
| | | } |
| | | } |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.UNDER_MAINTENANCE.name()); |
| | | entity.setActualStartTime(new Date()); |
| | |
| | | variables.put("comment", entity.getRemark()); |
| | | } |
| | | variables.put("proofreading", true); |
| | | List<String> usernames = new ArrayList<>(); |
| | | usernames.add(entity.getOperator()); |
| | | if (sysUser != null) { |
| | | if (BusinessCodeConst.PCR0001.equals(sysUser.getPost())) { |
| | | variables.put("operator_task", usernames); |
| | |
| | | } |
| | | if (BusinessCodeConst.PCR0001.equals(user.getPost())) { |
| | | entity.setOperator(user.getUsername()); |
| | | values.put("organization", "äºä¿æä½å·¥æ§è¡ç»æ"); |
| | | values.put("comment", "äºä¿æä½å·¥æ§è¡ç»æ"); |
| | | //å¤ç对åºè¯¦æ
|
| | | if (CollectionUtils.isNotEmpty(request.getOperatorDetailList())){ |
| | | //å é¤åææ°æ® |
| | | List<EamSecondMaintenanceOrderDetail> addList = new ArrayList<>(); |
| | | //å
å é¤åæ |
| | | LambdaQueryWrapper<EamSecondMaintenanceOrderDetail> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamSecondMaintenanceOrderDetail::getOrderId, entity.getId()); |
| | | queryWrapper.eq(EamSecondMaintenanceOrderDetail::getItemCategory,EamMaintenanceStandardDetailCategory.OPERATOR_MAINTENANCE.name()); |
| | | secondMaintenanceOrderDetailService.remove(queryWrapper); |
| | | request.getOperatorDetailList().forEach(tableDetail -> { |
| | | EamSecondMaintenanceOrderDetail eamMaintenanceStandardDetail=new EamSecondMaintenanceOrderDetail(); |
| | | BeanUtils.copyProperties(tableDetail, eamMaintenanceStandardDetail); |
| | | eamMaintenanceStandardDetail.setOrderId(entity.getId()); |
| | | addList.add(eamMaintenanceStandardDetail); |
| | | }); |
| | | secondMaintenanceOrderDetailService.saveBatch(addList); |
| | | } |
| | | }else if (BusinessCodeConst.PCR0002.equals(user.getPost())) { |
| | | entity.setRepairman(user.getUsername()); |
| | | values.put("organization", "äºä¿ç»´ä¿®å·¥æ§è¡ç»æ"); |
| | | values.put("comment", "äºä¿ç»´ä¿®å·¥æ§è¡ç»æ"); |
| | | //å¤ç对åºè¯¦æ
|
| | | if (CollectionUtils.isNotEmpty(request.getRepairmanDetailList())){ |
| | | //å é¤åææ°æ® |
| | | List<EamSecondMaintenanceOrderDetail> addList = new ArrayList<>(); |
| | | //å
å é¤åæ |
| | | LambdaQueryWrapper<EamSecondMaintenanceOrderDetail> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(EamSecondMaintenanceOrderDetail::getOrderId, entity.getId()); |
| | | queryWrapper.eq(EamSecondMaintenanceOrderDetail::getItemCategory,EamMaintenanceStandardDetailCategory.REPAIRER_MAINTENANCE.name()); |
| | | secondMaintenanceOrderDetailService.remove(queryWrapper); |
| | | request.getRepairmanDetailList().forEach(tableDetail -> { |
| | | EamSecondMaintenanceOrderDetail eamMaintenanceStandardDetail=new EamSecondMaintenanceOrderDetail(); |
| | | BeanUtils.copyProperties(tableDetail, eamMaintenanceStandardDetail); |
| | | eamMaintenanceStandardDetail.setOrderId(entity.getId()); |
| | | addList.add(eamMaintenanceStandardDetail); |
| | | }); |
| | | secondMaintenanceOrderDetailService.saveBatch(addList); |
| | | } |
| | | } |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization", "ä¸ä¿æ§è¡ç»æ"); |
| | | values.put("comment", "ä¸ä¿æ§è¡ç»æ"); |
| | | break; |
| | | case WAIT_ADMIN_CONFIRM: |
| | | //管çå确认 |
| | |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization",request.getComment()); |
| | | values.put("comment", request.getComment()); |
| | | values.put("manageUserResult",request.getManageUserResult()); |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.WAIT_INSPECTOR_CONFIRM.name()); |
| | | entity.setManageUser(user.getUsername()); |
| | | entity.setProblemDescription(request.getProblemDescription()); |
| | | entity.setManageUserResult(request.getManageUserResult()); |
| | | entity.setDealDescription(request.getComment()); |
| | | entity.setConfirmTime(new Date()); |
| | | } |
| | |
| | | values.put("dataId", entity.getId()); |
| | | values.put("organization",request.getComment()); |
| | | values.put("comment", request.getComment()); |
| | | values.put("inspectorResult",request.getInspectorResult()); |
| | | entity.setMaintenanceStatus(SecondMaintenanceStatusEnum.COMPLETE.name()); |
| | | entity.setInspector(user.getUsername()); |
| | | entity.setInspectorResult(request.getInspectorResult()); |
| | | entity.setInspectConfirmComment(request.getInspectConfirmComment()); |
| | | entity.setInspectConfirmTime(new Date()); |
| | | break; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean editTechnicalStatusEvaluationOrderChange(EamTechnicalStatusEvaluationOrderChange request) { |
| | | EamTechnicalStatusEvaluationOrderChange entity = this.getBaseMapper().selectById(request.getId()); |
| | | if(entity == null) { |
| | | throw new JeecgBootException("ç¼è¾çæ°æ®å·²å é¤ï¼è¯·å·æ°éè¯ï¼"); |
| | | } |
| | | if(!TechnicalStatusEvaluationOrderChangeStatusEnum.WAIT_SUBMIT.name().equals(entity.getChangeStatus())) { |
| | | throw new JeecgBootException("åªæå¾
æäº¤ç¶ææå¯ç¼è¾ï¼"); |
| | | } |
| | | entity.setApplyReason(request.getApplyReason()); |
| | | entity.setDeferredEvaluationDate(request.getDeferredEvaluationDate()); |
| | | this.getBaseMapper().updateById(entity); |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public void afterFlowHandle(FlowMyBusiness business) { |
| | | business.getTaskNameId();//æ¥ä¸æ¥å®¡æ¹çèç¹ |
| | | business.getValues();//åç«¯ä¼ è¿æ¥çåæ° |
| | |
| | | List<UserSelector> userSelectors; |
| | | switch (status) { |
| | | case UNDER_EVALUATION: |
| | | if(CollectionUtil.isEmpty(request.getTableDetailList())) { |
| | | throw new JeecgBootException("æ£æ¥æç»ä¿¡æ¯ä¸ºç©ºï¼"); |
| | | } |
| | | boolean parallelCompletion = flowTaskService.checkParallelCompletion(flowMyBusiness.getTaskId()); |
| | | //æ§è¡å®æ |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0008); |
| | |
| | | values.put("comment", "ææ¯ç¶æé´å®æ§è¡ç»æ"); |
| | | request.setComment("ææ¯ç¶æé´å®æ§è¡ç»æ"); |
| | | //设置entity |
| | | if (parallelCompletion) { |
| | | if (CommonConstant.STATUS_1.equals(entity.getSafetyCheckCompleted()) |
| | | && CommonConstant.STATUS_1.equals(entity.getPrecisionCheckCompleted()) |
| | | && CommonConstant.STATUS_1.equals(entity.getOtherCheckCompleted()) |
| | | && parallelCompletion) { |
| | | //å¤ä¸ªä»»å¡é½å·²å®æä¸ç»´ä¿®å®¤ä¸»ä»»é½å·²å®¡æ¹éè¿,ä¼ç¾å®æï¼è¿è¡ç»´ä¿®å·¥ç¾å |
| | | userSelectors = sysUserService.selectOperatorList(equipment.getEquipmentCode(), equipment.getFactoryOrgCode(), BusinessCodeConst.PCR0002); |
| | | userApprovalList = userSelectors.stream().map(UserSelector::getUsername).collect(Collectors.toList()); |
| | |
| | | } |
| | | if ("safety_equipment_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //æ§è¡å®å
¨æ£æ¥ |
| | | if (CommonConstant.STATUS_1.equals(entity.getSafetyCheckCompleted())) { |
| | | values.put("safetyEquipmentCheckFlag", request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirmResult(request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirm(user.getUsername()); |
| | | entity.setSafetyCheckConfirmTime(new Date()); |
| | | entity.setSafetyCheckConfirmComment(request.getSafetyCheckConfirmComment()); |
| | | //ç»´ä¿®å®¤ä¸»ä»»å®¡æ¹ |
| | | if (!CommonConstant.STATUS_1.equals(request.getSafetyCheckConfirmResult())) { |
| | | //驳å ç»çå¯äºº |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else { |
| | | //å®å
¨è£
ç½®æ£æ¥ç»æå¡«æ¥ |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if(CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("å®å
¨è£
ç½®æ£æ¥é¡¹æç»ä¸ºç©ºï¼"); |
| | | } |
| | | //ç»æé¡¹æ£æ¥ |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK); |
| | | //æ·»å æä½äººä¿¡æ¯ |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | //å®å
¨è£
ç½®æ£æ¥ç»æå¡«æ¥ |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("å®å
¨è£
ç½®æ£æ¥é¡¹æç»ä¸ºç©ºï¼"); |
| | | } |
| | | //ç»æé¡¹æ£æ¥ |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.SAFETY_EQUIPMENT_CHECK); |
| | | //æ·»å æä½äººä¿¡æ¯ |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_1); |
| | | } else if ("safety_equipment_check_confirm".equals(flowMyBusiness.getTaskNameId()) && CommonConstant.STATUS_1.equals(entity.getSafetyCheckCompleted())) { |
| | | values.put("safetyEquipmentCheckFlag", request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirmResult(request.getSafetyCheckConfirmResult()); |
| | | entity.setSafetyCheckConfirm(user.getUsername()); |
| | | entity.setSafetyCheckConfirmTime(new Date()); |
| | | entity.setSafetyCheckConfirmComment(request.getSafetyCheckConfirmComment()); |
| | | //ç»´ä¿®å®¤ä¸»ä»»å®¡æ¹ |
| | | if (!CommonConstant.STATUS_1.equals(request.getSafetyCheckConfirmResult())) { |
| | | //驳å ç»çå¯äºº |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_1); |
| | | entity.setSafetyCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else if ("equipment_precision_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //å¤ç精度æ£éª |
| | | if (CommonConstant.STATUS_1.equals(entity.getPrecisionCheckCompleted())) { |
| | | values.put("precisionCheckFlag", request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirmResult(request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirm(user.getUsername()); |
| | | entity.setPrecisionCheckConfirmTime(new Date()); |
| | | entity.setPrecisionCheckConfirmComment(request.getPrecisionCheckConfirmComment()); |
| | | //ç»´ä¿®å®¤ä¸»ä»»å®¡æ¹ |
| | | if (!CommonConstant.STATUS_1.equals(request.getPrecisionCheckConfirmResult())) { |
| | | //驳å ç»çå¯äºº |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else { |
| | | //设å¤ç²¾åº¦æ£æ¥ç»æå¡«æ¥ |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if(CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("设å¤ç²¾åº¦æ£æ¥é¡¹æç»ä¸ºç©ºï¼"); |
| | | } |
| | | //ç»æé¡¹æ£æ¥ |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK); |
| | | //æ·»å æä½äººä¿¡æ¯ |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_1); |
| | | //设å¤ç²¾åº¦æ£æ¥ç»æå¡«æ¥ |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("设å¤ç²¾åº¦æ£æ¥é¡¹æç»ä¸ºç©ºï¼"); |
| | | } |
| | | |
| | | //ç»æé¡¹æ£æ¥ |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.PRECISION_CHECK); |
| | | //æ·»å æä½äººä¿¡æ¯ |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_1); |
| | | } else if ("equipment_precision_check_confirm".equals(flowMyBusiness.getTaskNameId()) && CommonConstant.STATUS_1.equals(entity.getPrecisionCheckCompleted())) { |
| | | values.put("precisionCheckFlag", request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirmResult(request.getPrecisionCheckConfirmResult()); |
| | | entity.setPrecisionCheckConfirm(user.getUsername()); |
| | | entity.setPrecisionCheckConfirmTime(new Date()); |
| | | entity.setPrecisionCheckConfirmComment(request.getPrecisionCheckConfirmComment()); |
| | | //ç»´ä¿®å®¤ä¸»ä»»å®¡æ¹ |
| | | if (!CommonConstant.STATUS_1.equals(request.getPrecisionCheckConfirmResult())) { |
| | | //驳å ç»çå¯äºº |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setPrecisionCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else if ("other_check".equals(flowMyBusiness.getTaskNameId())) { |
| | | //å¤çå
¶ä»æ£æ¥ |
| | | if (CommonConstant.STATUS_1.equals(entity.getOtherCheckCompleted())) { |
| | | values.put("otherCheckFlag", request.getOtherCheckResult()); |
| | | entity.setOtherCheckResult(request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirm(user.getUsername()); |
| | | entity.setOtherCheckConfirmTime(new Date()); |
| | | entity.setOtherCheckConfirmComment(request.getOtherCheckConfirmComment()); |
| | | //ç»´ä¿®å®¤ä¸»ä»»å®¡æ¹ |
| | | if (!CommonConstant.STATUS_1.equals(request.getOtherCheckConfirmResult())) { |
| | | //驳å ç»çå¯äºº |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } else { |
| | | //å
¶ä»æ£æ¥ç»æå¡«æ¥ |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if(CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("å
¶ä»æ£æ¥é¡¹æç»ä¸ºç©ºï¼"); |
| | | } |
| | | //ç»æé¡¹æ£æ¥ |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK); |
| | | //æ·»å æä½äººä¿¡æ¯ |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | //å
¶ä»æ£æ¥ç»æå¡«æ¥ |
| | | List<EamTechnicalStatusEvaluationOrderDetail> collect = request.getTableDetailList().stream().filter(item -> TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK.name().equals(item.getCheckCategory())).collect(Collectors.toList()); |
| | | if (CollectionUtil.isEmpty(collect)) { |
| | | throw new JeecgBootException("å
¶ä»æ£æ¥é¡¹æç»ä¸ºç©ºï¼"); |
| | | } |
| | | //ç»æé¡¹æ£æ¥ |
| | | checkDetailResult(request.getTableDetailList(), TechnicalStatusEvaluationCheckCategoryEnum.OTHER_CHECK); |
| | | //æ·»å æä½äººä¿¡æ¯ |
| | | for (EamTechnicalStatusEvaluationOrderDetail detail : collect) { |
| | | detail.setRepairmanSignature(user.getUsername()); |
| | | detail.setRepairmanSignatureTime(new Date()); |
| | | } |
| | | orderDetailService.updateBatchById(collect); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_1); |
| | | } else if ("other_check_confirm".equals(flowMyBusiness.getTaskNameId()) && CommonConstant.STATUS_1.equals(entity.getOtherCheckCompleted())) { |
| | | values.put("otherCheckFlag", request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirmResult(request.getOtherCheckConfirmResult()); |
| | | entity.setOtherCheckConfirm(user.getUsername()); |
| | | entity.setOtherCheckConfirmTime(new Date()); |
| | | entity.setOtherCheckConfirmComment(request.getOtherCheckConfirmComment()); |
| | | //ç»´ä¿®å®¤ä¸»ä»»å®¡æ¹ |
| | | if (!CommonConstant.STATUS_1.equals(request.getOtherCheckConfirmResult())) { |
| | | //驳å ç»çå¯äºº |
| | | userApprovalList = Collections.singletonList(request.getTableDetailList().get(0).getRepairmanSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_1); |
| | | entity.setOtherCheckCompleted(CommonConstant.STATUS_0); |
| | | } |
| | | } |
| | | break; |
| | |
| | | entity.setRepairManagerSignature(user.getUsername()); |
| | | entity.setRepairManagerSignatureTime(new Date()); |
| | | entity.setRepairManagerComment(request.getRepairManagerComment()); |
| | | entity.setRepairManagerSignatureResult(request.getRepairManagerSignatureResult()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getRepairManagerSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | |
| | | entity.setDepartTechnicalLeaderSignature(user.getUsername()); |
| | | entity.setDepartTechnicalLeaderSignatureTime(new Date()); |
| | | entity.setDepartTechnicalLeaderComment(request.getDepartTechnicalLeaderComment()); |
| | | entity.setDepartTechnicalLeaderSignatureResult(request.getDepartTechnicalLeaderSignatureResult()); |
| | | //设置entity |
| | | if (BusinessCodeConst.APPROVED.equals(request.getDepartTechnicalLeaderSignatureResult())) { |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.INSPECTOR_SIGNING.name()); |
| | | } else { |
| | | userApprovalList = Collections.singletonList(entity.getProcessTechnicianSignature()); |
| | | values.put("NextAssignee", userApprovalList); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.INSPECTOR_SIGNING.name()); |
| | | entity.setEvaluationStatus(TechnicalStatusEvaluationOrderStatusEnum.PROCESS_TECHNICIAN_SIGNING.name()); |
| | | } |
| | | break; |
| | | case INSPECTOR_SIGNING: |
| | |
| | | switch (checkCategory) { |
| | | case SAFETY_EQUIPMENT_CHECK: |
| | | b = detailList.stream().allMatch(item -> StringUtils.isNotBlank(item.getSafetyEquipmentCheckResult())); |
| | | if(!b) { |
| | | if (!b) { |
| | | throw new JeecgBootException("æå®å
¨è£
ç½®æ£æ¥ç»ææªå¡«åï¼"); |
| | | } |
| | | break; |
| | | case PRECISION_CHECK: |
| | | b = detailList.stream().allMatch(item -> item.getPrecisionCheckResult() != null); |
| | | if(!b) { |
| | | if (!b) { |
| | | throw new JeecgBootException("æè®¾å¤ç²¾åº¦æ£æ¥ç»ææªå¡«åï¼"); |
| | | } |
| | | break; |
| | | case OTHER_CHECK: |
| | | b = detailList.stream().allMatch(item -> StringUtils.isNotBlank(item.getOtherCheckResult())); |
| | | if(!b) { |
| | | if (!b) { |
| | | throw new JeecgBootException("æå
¶ä»æ£æ¥ç»ææªå¡«åï¼"); |
| | | } |
| | | break; |
| | |
| | | UserTask nextTask = nextFlowNode.getUserTask(); |
| | | Task task2 = null; |
| | | Optional<Task> first = task2List.stream().filter(t -> t.getTaskDefinitionKey().equals(nextTask.getId())).findFirst(); |
| | | task2 = first.orElseGet(() -> task2List.get(0)); |
| | | if (task2 != null) { |
| | | // ä¸ä¸ªèç¹åé人 |
| | | List<String> beforeParamsCandidateUsernames = flowCallBackService.flowCandidateUsernamesOfTask(task2.getTaskDefinitionKey(), taskVo.getValues()); |
| | | List<String> candidateUsers = taskVo.getCandidateUsers(); |
| | | if (CollUtil.isNotEmpty(candidateUsers)) { |
| | | // åç«¯ä¼ å
¥åé人 è¦ç |
| | | beforeParamsCandidateUsernames = candidateUsers; |
| | | } |
| | | if (task.getTaskDefinitionKey().equals(task2.getTaskDefinitionKey())) { |
| | | //å¤å®ä¾ ä¼ç¾ TODO |
| | | // * å½åèç¹æ¯ä¼ç¾èç¹ï¼æ²¡æèµ°å® |
| | | business.setTaskId(task2.getId()) |
| | | // .setActStatus(ActStatus.doing) |
| | | .setDoneUsers(doneUserList.toJSONString()) |
| | | ; |
| | | String todoUsersStr = business.getTodoUsers(); |
| | | JSONArray todosArr = JSON.parseArray(todoUsersStr); |
| | | // å é¤åéå |
| | | for (Object oldUser : todosArr) { |
| | | taskService.deleteCandidateUser(task2.getId(), oldUser.toString()); |
| | | } |
| | | // éå |
| | | if (CollUtil.isNotEmpty(beforeParamsCandidateUsernames)) { |
| | | beforeParamsCandidateUsernames.remove(loginUser.getUsername()); |
| | | // ä¸å¡å±ææå®åé人ï¼è¦ç |
| | | for (String newUser : beforeParamsCandidateUsernames) { |
| | | taskService.addCandidateUser(task2.getId(), newUser); |
| | | } |
| | | business.setTodoUsers(JSON.toJSONString(beforeParamsCandidateUsernames)); |
| | | } else { |
| | | todosArr.remove(loginUser.getUsername()); |
| | | for (Object oldUser : todosArr) { |
| | | taskService.addCandidateUser(task2.getId(), oldUser.toString()); |
| | | } |
| | | business.setTodoUsers(todosArr.toJSONString()); |
| | | } |
| | | |
| | | } else { |
| | | //è½å¤å¤çä¸ä¸ªèç¹çåé人 |
| | | List<SysUser> nextFlowNodeUserList = nextFlowNode.getUserList(); |
| | | List<String> collect_username = nextFlowNodeUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); |
| | | if(!first.isPresent() && !checkParallelCompletion(taskVo.getTaskId())){ |
| | | //ä¸ä¸ªèç¹ä»»å¡è¿æ¯å¹¶è¡ç½å
³çä»»å¡ |
| | | flowMyBusinessService.removeById(business.getId()); |
| | | } else { |
| | | task2 = first.orElseGet(() -> task2List.get(0)); |
| | | if (task2 != null) { |
| | | // ä¸ä¸ªèç¹åé人 |
| | | List<String> beforeParamsCandidateUsernames = flowCallBackService.flowCandidateUsernamesOfTask(task2.getTaskDefinitionKey(), taskVo.getValues()); |
| | | List<String> candidateUsers = taskVo.getCandidateUsers(); |
| | | if (CollUtil.isNotEmpty(candidateUsers)) { |
| | | // åç«¯ä¼ å
¥åé人 |
| | | collect_username = candidateUsers; |
| | | // åç«¯ä¼ å
¥åé人 è¦ç |
| | | beforeParamsCandidateUsernames = candidateUsers; |
| | | } |
| | | business |
| | | .setTaskId(task2.getId()) |
| | | // .setActStatus(ActStatus.doing) |
| | | .setTaskNameId(nextTask.getId()) |
| | | .setTaskName(nextTask.getName()) |
| | | .setPriority(nextTask.getPriority()) |
| | | .setDoneUsers(doneUserList.toJSONString()) |
| | | .setTodoUsers(JSON.toJSONString(collect_username)) |
| | | ; |
| | | // å é¤åéå |
| | | for (String oldUser : collect_username) { |
| | | taskService.deleteCandidateUser(task2.getId(), oldUser); |
| | | } |
| | | if (CollUtil.isNotEmpty(beforeParamsCandidateUsernames)) { |
| | | // å端没æä¼ å
¥åé人 && ä¸å¡å±ææå®åé人ï¼è¦ç |
| | | for (String newUser : beforeParamsCandidateUsernames) { |
| | | taskService.addCandidateUser(task2.getId(), newUser); |
| | | if (task.getTaskDefinitionKey().equals(task2.getTaskDefinitionKey())) { |
| | | //å¤å®ä¾ ä¼ç¾ TODO |
| | | // * å½åèç¹æ¯ä¼ç¾èç¹ï¼æ²¡æèµ°å® |
| | | business.setTaskId(task2.getId()) |
| | | // .setActStatus(ActStatus.doing) |
| | | .setDoneUsers(doneUserList.toJSONString()) |
| | | ; |
| | | String todoUsersStr = business.getTodoUsers(); |
| | | JSONArray todosArr = JSON.parseArray(todoUsersStr); |
| | | // å é¤åéå |
| | | for (Object oldUser : todosArr) { |
| | | taskService.deleteCandidateUser(task2.getId(), oldUser.toString()); |
| | | } |
| | | business.setTodoUsers(JSON.toJSONString(beforeParamsCandidateUsernames)); |
| | | // éå |
| | | if (CollUtil.isNotEmpty(beforeParamsCandidateUsernames)) { |
| | | beforeParamsCandidateUsernames.remove(loginUser.getUsername()); |
| | | // ä¸å¡å±ææå®åé人ï¼è¦ç |
| | | for (String newUser : beforeParamsCandidateUsernames) { |
| | | taskService.addCandidateUser(task2.getId(), newUser); |
| | | } |
| | | business.setTodoUsers(JSON.toJSONString(beforeParamsCandidateUsernames)); |
| | | } else { |
| | | todosArr.remove(loginUser.getUsername()); |
| | | for (Object oldUser : todosArr) { |
| | | taskService.addCandidateUser(task2.getId(), oldUser.toString()); |
| | | } |
| | | business.setTodoUsers(todosArr.toJSONString()); |
| | | } |
| | | |
| | | } else { |
| | | for (String oldUser : collect_username) { |
| | | taskService.addCandidateUser(task2.getId(), oldUser); |
| | | //è½å¤å¤çä¸ä¸ªèç¹çåé人 |
| | | List<SysUser> nextFlowNodeUserList = nextFlowNode.getUserList(); |
| | | List<String> collect_username = nextFlowNodeUserList.stream().map(SysUser::getUsername).collect(Collectors.toList()); |
| | | if (CollUtil.isNotEmpty(candidateUsers)) { |
| | | // åç«¯ä¼ å
¥åé人 |
| | | collect_username = candidateUsers; |
| | | } |
| | | business.setTodoUsers(JSON.toJSONString(collect_username)); |
| | | business |
| | | .setTaskId(task2.getId()) |
| | | // .setActStatus(ActStatus.doing) |
| | | .setTaskNameId(nextTask.getId()) |
| | | .setTaskName(nextTask.getName()) |
| | | .setPriority(nextTask.getPriority()) |
| | | .setDoneUsers(doneUserList.toJSONString()) |
| | | .setTodoUsers(JSON.toJSONString(collect_username)) |
| | | ; |
| | | // å é¤åéå |
| | | for (String oldUser : collect_username) { |
| | | taskService.deleteCandidateUser(task2.getId(), oldUser); |
| | | } |
| | | if (CollUtil.isNotEmpty(beforeParamsCandidateUsernames)) { |
| | | // å端没æä¼ å
¥åé人 && ä¸å¡å±ææå®åé人ï¼è¦ç |
| | | for (String newUser : beforeParamsCandidateUsernames) { |
| | | taskService.addCandidateUser(task2.getId(), newUser); |
| | | } |
| | | business.setTodoUsers(JSON.toJSONString(beforeParamsCandidateUsernames)); |
| | | } else { |
| | | for (String oldUser : collect_username) { |
| | | taskService.addCandidateUser(task2.getId(), oldUser); |
| | | } |
| | | business.setTodoUsers(JSON.toJSONString(collect_username)); |
| | | } |
| | | } |
| | | } |
| | | flowMyBusinessService.updateById(business); |
| | | } |
| | | flowMyBusinessService.updateById(business); |
| | | } |
| | | else { |
| | | for(FlowNextDto nextFlowNode : nextFlowNodeList) { |