|  |  | 
 |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
 |  |  | import com.ruoyi.common.annotation.Anonymous; | 
 |  |  | import com.ruoyi.common.core.domain.Result; | 
 |  |  | import com.ruoyi.common.oa.OAProcess; | 
 |  |  | import com.ruoyi.inspect.dto.PushOADto; | 
 |  |  | import com.ruoyi.inspect.dto.UnqualifiedHandlerDto; | 
 |  |  | import com.ruoyi.inspect.pojo.InsUnqualifiedHandlerFile; | 
 |  |  | 
 |  |  |  | 
 |  |  | import javax.servlet.http.HttpServletResponse; | 
 |  |  | import java.util.HashMap; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | @RestController | 
 |  |  | @Api("ä¸åæ ¼å¤ç管ç") | 
 |  |  | 
 |  |  |     private static final String CHECKRESULT = "CHECKRESULT"; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "æäº¤OA") | 
 |  |  |     @PostMapping("/pushOA") | 
 |  |  |     public Result pushOA(@RequestBody PushOADto pushOADto){ | 
 |  |  |     public Result pushOA(@RequestBody PushOADto pushOADto) { | 
 |  |  |         return unqualifiedHandlerService.pushOA(pushOADto); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "æ¥è¯¢") | 
 |  |  |     @GetMapping("/page") | 
 |  |  |     public Result pageByUnqualified(Page page, UnqualifiedHandlerDto unqualifiedHandlerDto){ | 
 |  |  |     public Result pageByUnqualified(Page page, UnqualifiedHandlerDto unqualifiedHandlerDto) { | 
 |  |  |         return Result.success(unqualifiedHandlerService.pageList(page, unqualifiedHandlerDto)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "éä»¶ä¸ä¼ ") | 
 |  |  | 
 |  |  |     @Anonymous | 
 |  |  |     @ApiOperation(value = "ä¸åæ ¼å¤çOAåè°") | 
 |  |  |     @RequestMapping(value = "/callback", produces = "text/plain") | 
 |  |  |     public String unqualifiedHandlerOACallback(String data){ | 
 |  |  |         String msg = OAProcess.oaReturnMsg(0, "success"); | 
 |  |  |         JSONObject json = JSONObject.parseObject(data); | 
 |  |  |         log.info("oaåè°åæ°========>" + json); | 
 |  |  |         try { | 
 |  |  |             Long oaWorkId = json.getLong(REQUESTID); | 
 |  |  |             String checkResult = json.getString(CHECKRESULT); | 
 |  |  |             Object o = json.get("workflowRequestLogs"); | 
 |  |  |             JSONArray objects = JSONArray.parseArray(JSONObject.toJSONString(o)); | 
 |  |  |             unqualifiedHandlerService.unqualifiedHandlerOACallback(oaWorkId, checkResult,objects); | 
 |  |  |         } catch (Exception e) { | 
 |  |  |             log.error("oaåè°å¤±è´¥: " + e.getMessage()); | 
 |  |  |             msg = OAProcess.oaReturnMsg(1, "oaåè°å¤±è´¥: " + e.getMessage()); | 
 |  |  |         } | 
 |  |  |         log.info("oaåè°è¿åç»æ========>" + msg); | 
 |  |  |         return msg; | 
 |  |  |     public String unqualifiedHandlerOACallback(String data) { | 
 |  |  |         return null; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * ä¸è½½oaéä»¶ | 
 |  |  |      * | 
 |  |  |      * @param handlerFileId | 
 |  |  |      * @param response | 
 |  |  |      */ | 
 |  |  |     @GetMapping("/downloadOAFile/{handlerFileId}") | 
 |  |  |     public void downloadOAFile(@PathVariable("handlerFileId") Long handlerFileId, HttpServletResponse response){ | 
 |  |  |         unqualifiedHandlerFileService.downloadOAFile(handlerFileId,response); | 
 |  |  |     public void downloadOAFile(@PathVariable("handlerFileId") Long handlerFileId, HttpServletResponse response) { | 
 |  |  |         unqualifiedHandlerFileService.downloadOAFile(handlerFileId, response); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "æ°å¢ä¸åæ ¼å¤ç") | 
 |  |  |     @PostMapping("/addUnqualifiedHandler") | 
 |  |  |     public Result addUnqualifiedHandler(@RequestBody UnqualifiedHandlerDto unqualifiedHandlerDto){ | 
 |  |  |     public Result addUnqualifiedHandler(@RequestBody UnqualifiedHandlerDto unqualifiedHandlerDto) { | 
 |  |  |         return Result.success(unqualifiedHandlerService.addUnqualifiedHandler(unqualifiedHandlerDto)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "ç¼è¾ä¸åæ ¼å¤ç") | 
 |  |  |     @PostMapping("/updateUnqualifiedHandler") | 
 |  |  |     public Result updateUnqualifiedHandler(@RequestBody UnqualifiedHandlerDto unqualifiedHandlerDto){ | 
 |  |  |     public Result updateUnqualifiedHandler(@RequestBody UnqualifiedHandlerDto unqualifiedHandlerDto) { | 
 |  |  |         return Result.success(unqualifiedHandlerService.updateUnqualifiedHandler(unqualifiedHandlerDto)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "æ¥çoaæµç¨") | 
 |  |  |     @GetMapping("/getOaFlow") | 
 |  |  |     public Result getOaFlow(Integer id){ | 
 |  |  |     public Result getOaFlow(Integer id) { | 
 |  |  |         return Result.success(unqualifiedHandlerService.getOaFlow(id)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation(value = "æ¥çä¸åæ ¼å¤ççé¢") | 
 |  |  |     @GetMapping("/getUnqualifiedHandler") | 
 |  |  |     public Result getUnqualifiedHandler(Integer id){ | 
 |  |  |     public Result getUnqualifiedHandler(Integer id) { | 
 |  |  |         return Result.success(unqualifiedHandlerService.getUnqualifiedHandler(id)); | 
 |  |  |     } | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import com.deepoove.poi.data.Pictures; | 
 |  |  | import com.ruoyi.common.core.domain.Result; | 
 |  |  | import com.ruoyi.common.utils.DateImageUtil; | 
 |  |  | import com.ruoyi.common.utils.api.IfsApiUtils; | 
 |  |  | import com.ruoyi.common.utils.QueryWrappers; | 
 |  |  | import com.ruoyi.framework.exception.ErrorException; | 
 |  |  | import com.ruoyi.inspect.dto.IfsStockQueryDTO; | 
 |  |  | 
 |  |  | @Transactional(rollbackFor = Exception.class) | 
 |  |  | public class FinishProductSpotCheckServiceImpl implements FinishProductSpotCheckService { | 
 |  |  |  | 
 |  |  |     @Resource | 
 |  |  |     private IfsApiUtils ifsApiUtils; | 
 |  |  |  | 
 |  |  |     @Resource | 
 |  |  |     private SpotCheckQuarterMapper spotCheckQuarterMapper; | 
 |  |  |     @Resource | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     public Result getIfsStockReport(IfsStockQueryDTO ifsStockQueryDTO) { | 
 |  |  |         JSONObject jresult = new JSONObject(); | 
 |  |  |         jresult.put("total", 0); | 
 |  |  |         jresult.put("count", 0); | 
 |  |  |         jresult.put("data", new JSONArray()); | 
 |  |  |         JSONObject jsonObject = new JSONObject(); | 
 |  |  |         generateIfsStockQueryParams(jsonObject, ifsStockQueryDTO, ifsStockQueryDTO.getPage(), ifsStockQueryDTO.getLimit()); | 
 |  |  |         Result result = ifsApiUtils.getIfsStock(jsonObject.toJSONString()); | 
 |  |  |         if (result.getCode() == 200) { | 
 |  |  |             JSONObject data = (JSONObject) JSON.toJSON(result.getData()); | 
 |  |  |             JSONArray array = new JSONArray(); | 
 |  |  |             for (int i = 0; i < data.getJSONArray("LIST_INFO").size(); i++) { | 
 |  |  |                 JSONObject listInfo = data.getJSONArray("LIST_INFO").getJSONObject(i); | 
 |  |  |                 array.add(listInfo); | 
 |  |  |             } | 
 |  |  |             //è·åæ»æ°é | 
 |  |  |             int count = data.getIntValue("TOTAL_RECORD"); | 
 |  |  |             //è·åé¡µæ° | 
 |  |  |             int total = (int) Math.ceil((double) count / (double) ifsStockQueryDTO.getLimit()); | 
 |  |  |             jresult.put("total", total); | 
 |  |  |             jresult.put("count", count); | 
 |  |  |             jresult.put("data", array); | 
 |  |  |         } | 
 |  |  |         return Result.success(jresult); | 
 |  |  |         return Result.success(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public void generateIfsStockQueryParams(JSONObject result, IfsStockQueryDTO ifsStockQueryDTO, Long pageNo, Long pageSize) { | 
 |  |  |         result.put("PAGE", pageNo); | 
 |  |  |         result.put("LIMIT", pageSize); | 
 |  |  |         result.put("WAREHOUSE", "æåä»åº"); | 
 |  |  |         result.put("QUANTITY_FLAG", ">0"); | 
 |  |  |         //表éé¢çOTCè¡å· | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getCotcOrderNo())) { | 
 |  |  |             result.put("C_OTC_ORDER_NO", ifsStockQueryDTO.getCotcOrderNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getCotcLineNo())) { | 
 |  |  |             result.put("C_OTC_LINE_NO", ifsStockQueryDTO.getCotcLineNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getPartNo())) { | 
 |  |  |             result.put("PART_NO", ifsStockQueryDTO.getPartNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getPartDescription())) { | 
 |  |  |             result.put("PART_DESC", "%" + ifsStockQueryDTO.getPartDescription() + "%"); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocNo())) { | 
 |  |  |             result.put("LOCATION_NO", ifsStockQueryDTO.getLocNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocDesc())) { | 
 |  |  |             result.put("LOCATION_DESC", ifsStockQueryDTO.getLocDesc()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLotBatchNo())) { | 
 |  |  |             result.put("LOT_BATCH_NO", ifsStockQueryDTO.getLotBatchNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getWdrNo())) { | 
 |  |  |             result.put("WDR_NO", ifsStockQueryDTO.getWdrNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getWarehouse())) { | 
 |  |  |             result.put("WAREHOUSE", ifsStockQueryDTO.getWarehouse()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocationGroup())) { | 
 |  |  |             result.put("LOCATION_GROUP", ifsStockQueryDTO.getLocationGroup()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLocationGroupDesc())) { | 
 |  |  |             result.put("LOCATION_GROUP_DESC", ifsStockQueryDTO.getLocationGroupDesc()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getReelNumber())) { | 
 |  |  |             result.put("ATTR1", ifsStockQueryDTO.getReelNumber()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getStartMeter())) { | 
 |  |  |             result.put("ATTR2", ifsStockQueryDTO.getStartMeter()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getEndMeter())) { | 
 |  |  |             result.put("ATTR3", ifsStockQueryDTO.getEndMeter()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getOuterColor())) { | 
 |  |  |             result.put("ATTR4", ifsStockQueryDTO.getOuterColor()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getInsulationColor())) { | 
 |  |  |             result.put("ATTR5", ifsStockQueryDTO.getInsulationColor()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getOtcOrderNo())) { | 
 |  |  |             result.put("ATTR6", ifsStockQueryDTO.getOtcOrderNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getMpsNo())) { | 
 |  |  |             result.put("ATTR7", ifsStockQueryDTO.getMpsNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLetteringInfo())) { | 
 |  |  |             result.put("ATTR8", ifsStockQueryDTO.getLetteringInfo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getSStockQuantity())) { | 
 |  |  |             result.put("ATTR9", ifsStockQueryDTO.getSStockQuantity()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getSAvailableStockQuantity())) { | 
 |  |  |             result.put("ATTR10", ifsStockQueryDTO.getSAvailableStockQuantity()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getSunit())) { | 
 |  |  |             result.put("ATTR11", ifsStockQueryDTO.getSunit()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getStockSource())) { | 
 |  |  |             result.put("ATTR12", ifsStockQueryDTO.getStockSource()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getInspInstorageTime())) { | 
 |  |  |             result.put("ATTR13", ifsStockQueryDTO.getInspInstorageTime()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getTestRemark())) { | 
 |  |  |             result.put("ATTR14", ifsStockQueryDTO.getTestRemark()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getGrossWeight())) { | 
 |  |  |             result.put("ATTR15", ifsStockQueryDTO.getGrossWeight()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getNetWeight())) { | 
 |  |  |             result.put("ATTR16", ifsStockQueryDTO.getNetWeight()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getPackingManner())) { | 
 |  |  |             result.put("ATTR17", ifsStockQueryDTO.getPackingManner()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getCylinderNumber())) { | 
 |  |  |             result.put("ATTR18", ifsStockQueryDTO.getCylinderNumber()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getRemark())) { | 
 |  |  |             result.put("ATTR19", ifsStockQueryDTO.getRemark()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getLengthRequirement())) { | 
 |  |  |             result.put("ATTR20", ifsStockQueryDTO.getLengthRequirement()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getCustomerName())) { | 
 |  |  |             result.put("ATTR21", ifsStockQueryDTO.getCustomerName()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getSystemNo())) { | 
 |  |  |             result.put("ATTR22", ifsStockQueryDTO.getSystemNo()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getInSource())) { | 
 |  |  |             result.put("ATTR23", ifsStockQueryDTO.getInSource()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getSplitQuality())) { | 
 |  |  |             result.put("ATTR24", ifsStockQueryDTO.getSplitQuality()); | 
 |  |  |         } | 
 |  |  |         if (StrUtil.isNotBlank(ifsStockQueryDTO.getReserveQuantity())) { | 
 |  |  |             result.put("QTY_RESERVED", ifsStockQueryDTO.getReserveQuantity()); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /************************************************* å£åº¦æ½æ · ***********************************************************/ | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import com.ruoyi.common.core.domain.entity.User; | 
 |  |  | import com.ruoyi.common.numgen.NumberGenerator; | 
 |  |  | import com.ruoyi.common.utils.*; | 
 |  |  | import com.ruoyi.common.utils.api.IfsApiUtils; | 
 |  |  | import com.ruoyi.framework.exception.ErrorException; | 
 |  |  | import com.ruoyi.inspect.dto.*; | 
 |  |  | import com.ruoyi.inspect.mapper.*; | 
 |  |  | 
 |  |  |     private final NumberGenerator<InsOrder> numberGenerator; | 
 |  |  |     private InsReportMapper insReportMapper; | 
 |  |  |     private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper; | 
 |  |  |     private IfsApiUtils ifsApiUtils; | 
 |  |  |     private SpotCheckQuarterItemMapper spotCheckQuarterItemMapper; | 
 |  |  |     private StandardProductListMapper standardProductListMapper; | 
 |  |  |     private StructureItemParameterMapper structureItemParameterMapper; | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     public void getIfsOrder() { | 
 |  |  |         HashMap<String, Object> map = new HashMap<>(); | 
 |  |  |         map.put("LOCATION_NO","1302"); | 
 |  |  |         map.put("STATE_DB","To be Inspected"); | 
 |  |  |         List<Map<String, Object>> inventory = ifsApiUtils.getInventory(JSONUtil.toJsonStr(map)); | 
 |  |  |         if(inventory.size() == 0) { | 
 |  |  |             return; | 
 |  |  |         } | 
 |  |  |         // è¿è¡ä¿å | 
 |  |  |         for (Map<String, Object> map1 : inventory) { | 
 |  |  |             DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); // æ¶é´æ ¼å¼å | 
 |  |  |             IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity(); | 
 |  |  |             ifsInventoryQuantity.setContract(map1.get("CONTRACT") == null ? "" : map1.get("CONTRACT").toString()); // å | 
 |  |  |             ifsInventoryQuantity.setPartNo(map1.get("PART_NO") == null ? "" : map1.get("PART_NO").toString() ); // é¶ä»¶å· | 
 |  |  |             ifsInventoryQuantity.setPartDesc(map1.get("PART_DESC") == null ? "" : map1.get("PART_DESC").toString()); // é¶ä»¶æè¿° | 
 |  |  |             ifsInventoryQuantity.setOrderNo(map1.get("ORDER_NO") == null ? "" : map1.get("ORDER_NO").toString()); // è®¢åå· | 
 |  |  |             ifsInventoryQuantity.setLineNo(map1.get("LINE_NO") == null ? "" : map1.get("LINE_NO").toString()); // è¡å· | 
 |  |  |             ifsInventoryQuantity.setReleaseNo(map1.get("RELEASE_NO") == null ? "" : map1.get("RELEASE_NO").toString()); // ä¸è¾¾å· | 
 |  |  |             ifsInventoryQuantity.setReceiptNo(Integer.parseInt(map1.get("RECEIPT_NO") == null ? "" : map1.get("RECEIPT_NO").toString())); // æ¥æ¶å· | 
 |  |  |             ifsInventoryQuantity.setStatus(map1.get("STATE") == null ? "" : map1.get("STATE").toString()); // ç¶ææè¿° | 
 |  |  |             ifsInventoryQuantity.setStatusDb(map1.get("STATE_DB") == null ? "" : map1.get("STATE_DB").toString()); // ç¶æ | 
 |  |  |             if(map1.get("QTY_ARRIVED") != null) { | 
 |  |  |                 ifsInventoryQuantity.setQtyArrived(new BigDecimal(map1.get("QTY_ARRIVED").toString())); // æµè¾¾çéè´æ°é | 
 |  |  |             } | 
 |  |  |             if(map1.get("QTY_INSPECTED") != null) { | 
 |  |  |                 ifsInventoryQuantity.setQtyInspected(new BigDecimal(map1.get("QTY_INSPECTED").toString())); // å·²æ£éªçè´ä¹°æ°é | 
 |  |  |             } | 
 |  |  |             if(map1.get("QTY_TO_INSPECT") != null) { | 
 |  |  |                 ifsInventoryQuantity.setQtyToInspect(new BigDecimal(map1.get("QTY_TO_INSPECT").toString())); // è¦æ£éªçéè´æ°é | 
 |  |  |             } | 
 |  |  |             if(map1.get("INV_QTY_IN_STORE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setInvQtyInStore(new BigDecimal(map1.get("INV_QTY_IN_STORE").toString())); // æµè¾¾çåºåæ°é | 
 |  |  |             } | 
 |  |  |             if(map1.get("PUR_QTY_IN_STORE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setPurQtyInStore(new BigDecimal( map1.get("PUR_QTY_IN_STORE").toString())); // æµè¾¾çéè´æ°é | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |             ifsInventoryQuantity.setSupplierId(map1.get("SUPPLIER_ID") == null ? "" : map1.get("SUPPLIER_ID").toString()); // ä¾åºåID | 
 |  |  |             ifsInventoryQuantity.setSupplierName(map1.get("SUPPLIER_NAME") == null ? "" : map1.get("SUPPLIER_NAME").toString()); // ä¾åºååç§° | 
 |  |  |             ifsInventoryQuantity.setConfigurationId(map1.get("CONFIGURATION_ID") == null ? "" : map1.get("CONFIGURATION_ID").toString()); // é
ç½®æ è¯ | 
 |  |  |             ifsInventoryQuantity.setLotBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // æ¹æ¬¡å· | 
 |  |  |             ifsInventoryQuantity.setUpdateBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // æ¹æ¬¡å· | 
 |  |  |             ifsInventoryQuantity.setWaivDevRejNo(map1.get("WAIV_DEV_REJ_NO") == null ? "" : map1.get("WAIV_DEV_REJ_NO").toString()); // WDRå· | 
 |  |  |             ifsInventoryQuantity.setActivitySeq(map1.get("ACTIVITY_SEQ") == null ? null : Integer.parseInt(map1.get("ACTIVITY_SEQ").toString())); // æ´»å¨åºå | 
 |  |  |             ifsInventoryQuantity.setSerialNo(map1.get("SERIAL_NO") == null ? "" : map1.get("SERIAL_NO").toString()); // åºåå· | 
 |  |  |             ifsInventoryQuantity.setLocationNo(map1.get("LOCATION_NO") == null ? "" : map1.get("LOCATION_NO").toString()); // åºä½å· | 
 |  |  |             ifsInventoryQuantity.setEngChgLevel(map1.get("ENG_CHG_LEVEL") == null ? "" : map1.get("ENG_CHG_LEVEL").toString()); // çæ¬å· | 
 |  |  |             ifsInventoryQuantity.setReceiver(map1.get("RECEIVER") == null ? "" : map1.get("RECEIVER").toString()); // æ¥æ¶äºº | 
 |  |  |             ifsInventoryQuantity.setReceiverName(map1.get("RECEIVER_NAME") == null ? "" : map1.get("RECEIVER_NAME").toString()); // æ¥æ¶äººåç§° | 
 |  |  |             ifsInventoryQuantity.setBuyerCode(map1.get("BUYER_CODE") == null ? "" : map1.get("BUYER_CODE").toString()); // éè´å | 
 |  |  |             ifsInventoryQuantity.setBuyerName(map1.get("BUYER_NAME") == null ? "" : map1.get("BUYER_NAME").toString()); // éè´ååç§° | 
 |  |  |  | 
 |  |  |             if(map1.get("ARRIVE_DATE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setArriveDate(LocalDateTime.parse(map1.get("ARRIVE_DATE").toString(),dateTimeFormatter)); // å®é
å°è´§æ¥æ | 
 |  |  |             } | 
 |  |  |             if(map1.get("DELIVERY_DATE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setDeliveryDate(LocalDateTime.parse(map1.get("DELIVERY_DATE").toString(),dateTimeFormatter)); // å®é
äº¤è´§æ¥æ | 
 |  |  |             } | 
 |  |  |             if(map1.get("PRODUCT_DATE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setProductDate(LocalDateTime.parse(map1.get("PRODUCT_DATE").toString(),dateTimeFormatter)); // çäº§æ¥æ | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |             if(map1.get("INVALID_DATE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setInvalidDate(LocalDateTime.parse(map1.get("INVALID_DATE").toString(),dateTimeFormatter)); // å¤±ææ¥æ | 
 |  |  |             } | 
 |  |  |             if(map1.get("APPROVED_DATE") != null) { | 
 |  |  |                 ifsInventoryQuantity.setApprovedDate(LocalDateTime.parse(map1.get("APPROVED_DATE").toString(),dateTimeFormatter)); // å®¡æ¹æ¥æ | 
 |  |  |             } | 
 |  |  |             ifsInventoryQuantity.setReqCeater(map1.get("REQ_CEATER") == null ? "" : map1.get("REQ_CEATER").toString()); // éè´ç³è¯·å建人 | 
 |  |  |             ifsInventoryQuantity.setReqCeaterName(map1.get("REQ_CEATER_NAME") == null ? "" : map1.get("REQ_CEATER_NAME").toString()); // éè´ç³è¯·å建人åç§° | 
 |  |  |             ifsInventoryQuantity.setLineRemarks(map1.get("LINE_REMARKS") == null ? "" : map1.get("LINE_REMARKS").toString()); // éè´è®¢åè¡å¤æ³¨ | 
 |  |  |             ifsInventoryQuantity.setBuyUnitMeas(map1.get("BUY_UNIT_MEAS") == null ? "" : map1.get("BUY_UNIT_MEAS").toString()); // éè´åä½ | 
 |  |  |             ifsInventoryQuantity.setReceiverDate(LocalDateTime.now()); // æ¥æ¶æ¥æ | 
 |  |  |             ifsInventoryQuantity.setIsSource(1); | 
 |  |  |             ifsInventoryQuantity.setState(0); | 
 |  |  |  | 
 |  |  |             Long count = ifsInventoryQuantityMapper.selectCount(new LambdaQueryWrapper<IfsInventoryQuantity>() | 
 |  |  |                     .eq(IfsInventoryQuantity::getOrderNo, ifsInventoryQuantity.getOrderNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getLineNo, ifsInventoryQuantity.getLineNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getReleaseNo, ifsInventoryQuantity.getReleaseNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getReceiptNo, ifsInventoryQuantity.getReceiptNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getLocationNo, ifsInventoryQuantity.getLocationNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getLotBatchNo, ifsInventoryQuantity.getLotBatchNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getSerialNo, ifsInventoryQuantity.getSerialNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getEngChgLevel, ifsInventoryQuantity.getEngChgLevel()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getWaivDevRejNo, ifsInventoryQuantity.getWaivDevRejNo()) | 
 |  |  |                     .eq(IfsInventoryQuantity::getActivitySeq, ifsInventoryQuantity.getActivitySeq()) | 
 |  |  |             ); | 
 |  |  |             if(count == 0) { | 
 |  |  |                 ifsInventoryQuantity.setIsFirst(0); | 
 |  |  |                 // æ¥è¯¢äº§ä¸é¾æ£æµæ°æ® | 
 |  |  |                 String industryChainAttrFields = IndustryChainUtils.getIndustryChainAttrFields(ifsInventoryQuantity.getOrderNo(), | 
 |  |  |                         ifsInventoryQuantity.getLineNo(), | 
 |  |  |                         ifsInventoryQuantity.getReleaseNo()); | 
 |  |  |                 ifsInventoryQuantity.setIndustryChain(industryChainAttrFields); | 
 |  |  |  | 
 |  |  |                 ifsInventoryQuantityMapper.insert(ifsInventoryQuantity); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 
 |  |  | 
 |  |  | import com.ruoyi.common.core.domain.entity.InformationNotification; | 
 |  |  | import com.ruoyi.common.config.WechatProperty; | 
 |  |  | import com.ruoyi.common.utils.*; | 
 |  |  | import com.ruoyi.common.utils.api.IfsApiUtils; | 
 |  |  | import com.ruoyi.framework.exception.ErrorException; | 
 |  |  | import com.ruoyi.inspect.dto.InsReportExport; | 
 |  |  | import com.ruoyi.inspect.dto.ReportPageDto; | 
 |  |  | 
 |  |  |     private ThreadPoolTaskExecutor threadPoolTaskExecutor; | 
 |  |  |     @Resource | 
 |  |  |     private InsOrderService insOrderService; | 
 |  |  |     @Resource | 
 |  |  |     private WechatProperty wechatProperty; | 
 |  |  | //    @Resource | 
 |  |  | //    private WechatProperty wechatProperty; | 
 |  |  |     @Resource | 
 |  |  |     private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper; | 
 |  |  |     @Resource | 
 |  |  |     private IfsApiUtils ifsApiUtils; | 
 |  |  |     @Resource | 
 |  |  |     private InsSampleUserMapper insSampleUserMapper; | 
 |  |  |  | 
 |  |  | 
 |  |  |                         .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             threadPoolTaskExecutor.execute(() -> { | 
 |  |  |                 // ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  |                 String message = ""; | 
 |  |  |                 message += "æ£æµç»ææäº¤éç¥"; | 
 |  |  |                 message += "\næ¹æ¬¡å·: " + one.getUpdateBatchNo(); | 
 |  |  |                 message += "\né¶ä»¶å·: " + one.getPartNo(); | 
 |  |  |                 message += "\né¶ä»¶æè¿°: " + one.getPartDesc(); | 
 |  |  |                 message += "\nä¾åºååç§°: " + one.getSupplierName(); | 
 |  |  |                 message += "\næµè¾¾æ°é: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); | 
 |  |  |                 // åéä¼ä¸inspectStatusä¿¡éç¥ | 
 |  |  |                 if (inspectStatus == 1) { | 
 |  |  |                     message += "\næ£æµç»æ: åæ ¼"; | 
 |  |  |                 } else { | 
 |  |  |                     message += "\næ£æµç»æ: ä¸åæ ¼"; | 
 |  |  |                 } | 
 |  |  |                 WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); | 
 |  |  |             }); | 
 |  |  | //            threadPoolTaskExecutor.execute(() -> { | 
 |  |  | //                // ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  | //                String message = ""; | 
 |  |  | //                message += "æ£æµç»ææäº¤éç¥"; | 
 |  |  | //                message += "\næ¹æ¬¡å·: " + one.getUpdateBatchNo(); | 
 |  |  | //                message += "\né¶ä»¶å·: " + one.getPartNo(); | 
 |  |  | //                message += "\né¶ä»¶æè¿°: " + one.getPartDesc(); | 
 |  |  | //                message += "\nä¾åºååç§°: " + one.getSupplierName(); | 
 |  |  | //                message += "\næµè¾¾æ°é: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); | 
 |  |  | //                // åéä¼ä¸inspectStatusä¿¡éç¥ | 
 |  |  | //                if (inspectStatus == 1) { | 
 |  |  | //                    message += "\næ£æµç»æ: åæ ¼"; | 
 |  |  | //                } else { | 
 |  |  | //                    message += "\næ£æµç»æ: ä¸åæ ¼"; | 
 |  |  | //                } | 
 |  |  | //                WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); | 
 |  |  | //            }); | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Override | 
 |  |  |     public String moveRawMaterial(IfsInventoryQuantity one) { | 
 |  |  |         String toLocation; | 
 |  |  |         // ç»è®°éè´æ£éªç»æSTD | 
 |  |  |         if (one.getIsRegister().equals(0)) { | 
 |  |  |             Map<String, Object> resultMap = new HashMap<>(); | 
 |  |  |             List<Map<String, Object>> resultList = new ArrayList<>(); | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 |  |  |             map.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· | 
 |  |  |             map.put("LINE_NO", one.getLineNo()); // è¡å· | 
 |  |  |             map.put("RELEASE_NO", one.getReleaseNo()); // ä¸è¾¾å· | 
 |  |  |             map.put("RECEIPT_NO", one.getReceiptNo()); // æ¥æ¶å· | 
 |  |  |             map.put("PURCH_QTY", one.getQtyToInspect()); // è¦æ£éªçéè´æ°é | 
 |  |  |             resultList.add(map); | 
 |  |  |             resultMap.put("RECORD_ID", UUID.randomUUID().toString()); | 
 |  |  |             resultMap.put("SYSCODE", "LIMS"); | 
 |  |  |             resultMap.put("SYSMODEL", "ç»è®°éè´æ£éªç»æ"); | 
 |  |  |             resultMap.put("BATCH_INFO", resultList); | 
 |  |  |             Result result = ifsApiUtils.getProcurementResults(JSONUtil.toJsonStr(resultMap)); | 
 |  |  |             if (result.getCode() != 200) { | 
 |  |  |                 throw new ErrorException("IFSç»è®°éè´æ£éªç»æå¤±è´¥: " + result.getMessage()); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         insOrderService.updateIfsInventoryQuantity(one.getId()); | 
 |  |  |         /** | 
 |  |  |          * TODO åç»éè¦è°ç¨IFSçæ¥å£ ç§»å
¥çåºä½å· toLocation | 
 |  |  |          */ | 
 |  |  |         // æ£éªåç§»åº | 
 |  |  |         toLocation = "1301"; | 
 |  |  |         Map<String, Object> moveResultMap = new HashMap<>(); | 
 |  |  |         List<Map<String, Object>> moveResultList = new ArrayList<>(); | 
 |  |  |         Map<String, Object> moveMap = new HashMap<>(); | 
 |  |  |         moveMap.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· | 
 |  |  |         moveMap.put("LINE_NO", one.getLineNo()); | 
 |  |  |         moveMap.put("RELEASE_NO", one.getReleaseNo()); | 
 |  |  |         moveMap.put("RECEIPT_NO", one.getReceiptNo()); | 
 |  |  |         moveMap.put("PART_NO", one.getPartNo()); | 
 |  |  |         moveMap.put("QTY", one.getQtyArrived()); | 
 |  |  |         moveMap.put("LOCATION_NO", one.getLocationNo()); | 
 |  |  |         moveMap.put("TO_LOCATION_NO", toLocation); | 
 |  |  |         moveMap.put("LOT_BATCH_NO", one.getLotBatchNo()); | 
 |  |  |         moveMap.put("SERIAL_NO", one.getSerialNo()); | 
 |  |  |         moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); | 
 |  |  |         moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); | 
 |  |  |         moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); | 
 |  |  |         moveResultList.add(moveMap); | 
 |  |  |         moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); | 
 |  |  |         moveResultMap.put("SYSCODE", "LIMS"); | 
 |  |  |         moveResultMap.put("SYSMODEL", "æ£éªåç§»åº"); | 
 |  |  |         moveResultMap.put("BATCH_INFO", moveResultList); | 
 |  |  |  | 
 |  |  |         Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); | 
 |  |  |         // å¦ææå¿
须为é¶ä»¶æå®æ¹å·æ¥ééè¦éæ°æäº¤ç§»åºä¿¡æ¯å»æå®æ¹å· | 
 |  |  |         if (result1.getCode() != 200) { | 
 |  |  |             String message = result1.getMessage(); | 
 |  |  |             if (message.contains("å¿
须为é¶ä»¶") && message.contains("æå®æ¹å·")) { | 
 |  |  |                 updaeBatch(one, toLocation); | 
 |  |  |             } else { | 
 |  |  |                 throw new ErrorException("IFSæ£éªåç§»åºå¤±è´¥: " + result1.getMessage()); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return toLocation; | 
 |  |  |         return null; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      * @param toLocation | 
 |  |  |      */ | 
 |  |  |     private void updaeBatch(IfsInventoryQuantity one, String toLocation) { | 
 |  |  |         if (one.getIsUpdateBatch().equals(0)) { | 
 |  |  |             // å
ä¿®æ¹æ¹æ¬¡å·åè¿è¡ç§»åº | 
 |  |  |             Map<String, Object> resultMap = new HashMap<>(); | 
 |  |  |             List<Map<String, Object>> resultList = new ArrayList<>(); | 
 |  |  |             Map<String, Object> map = new HashMap<>(); | 
 |  |  |             map.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· | 
 |  |  |             map.put("LINE_NO", one.getLineNo()); // è¡å· | 
 |  |  |             map.put("RELEASE_NO", one.getReleaseNo()); // ä¸è¾¾å· | 
 |  |  |             map.put("RECEIPT_NO", one.getReceiptNo()); // æ¥æ¶å· | 
 |  |  |             map.put("PART_NO", one.getPartNo()); //é¶ä»¶å· | 
 |  |  |             map.put("CONFIGURATION_ID", one.getConfigurationId()); // é
ç½®æ è¯ | 
 |  |  |             map.put("LOCATION_NO", one.getLocationNo()); // åºä½å· | 
 |  |  |             map.put("LOT_BATCH_NO", one.getLotBatchNo());// æ¹æ¬¡å· | 
 |  |  |             map.put("NEW_LOT_BATCH_NO", one.getUpdateBatchNo()); // ç®æ æ¹æ¬¡å· | 
 |  |  |             map.put("SERIAL_NO", one.getSerialNo()); // åºåå· | 
 |  |  |             map.put("ENG_CHG_LEVEL", one.getEngChgLevel()); // çæ¬å· | 
 |  |  |             map.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); // wdrå· | 
 |  |  |             map.put("ACTIVITY_SEQ", one.getActivitySeq()); // æ´»å¨åºå· | 
 |  |  |             map.put("QTY_TO_CHANGE", one.getQtyArrived()); // åæ´æ°é | 
 |  |  |             resultList.add(map); | 
 |  |  |             resultMap.put("RECORD_ID", UUID.randomUUID().toString()); | 
 |  |  |             resultMap.put("SYSCODE", "LIMS"); | 
 |  |  |             resultMap.put("SYSMODEL", "ä¿®æ¹éè´è®¢åæ¹æ¬¡å·"); | 
 |  |  |             resultMap.put("BATCH_INFO", resultList); | 
 |  |  |  | 
 |  |  |             Result result = ifsApiUtils.updateMoveReceiptLot(JSONUtil.toJsonStr(resultMap)); | 
 |  |  |  | 
 |  |  |             if (result.getCode() != 200) { | 
 |  |  |                 throw new ErrorException("IFSä¿®æ¹æ¹æ¬¡å·å¤±è´¥: " + result.getMessage()); | 
 |  |  |             } | 
 |  |  |             ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() | 
 |  |  |                     .set(IfsInventoryQuantity::getIsUpdateBatch, 1) | 
 |  |  |                     .eq(IfsInventoryQuantity::getId, one.getId())); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         Map<String, Object> moveResultMap = new HashMap<>(); | 
 |  |  |         List<Map<String, Object>> moveResultList = new ArrayList<>(); | 
 |  |  |         Map<String, Object> moveMap = new HashMap<>(); | 
 |  |  |         moveMap.put("ORDER_NO", one.getOrderNo()); // éè´è®¢åå· | 
 |  |  |         moveMap.put("LINE_NO", one.getLineNo()); | 
 |  |  |         moveMap.put("RELEASE_NO", one.getReleaseNo()); | 
 |  |  |         moveMap.put("RECEIPT_NO", one.getReceiptNo()); | 
 |  |  |         moveMap.put("PART_NO", one.getPartNo()); | 
 |  |  |         moveMap.put("QTY", one.getQtyArrived()); | 
 |  |  |         moveMap.put("LOCATION_NO", one.getLocationNo()); | 
 |  |  |         moveMap.put("TO_LOCATION_NO", toLocation); | 
 |  |  |         moveMap.put("LOT_BATCH_NO", one.getUpdateBatchNo()); | 
 |  |  |         moveMap.put("SERIAL_NO", one.getSerialNo()); | 
 |  |  |         moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); | 
 |  |  |         moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel()); | 
 |  |  |         moveMap.put("ACTIVITY_SEQ", one.getActivitySeq()); | 
 |  |  |         moveResultList.add(moveMap); | 
 |  |  |         moveResultMap.put("RECORD_ID", UUID.randomUUID().toString()); | 
 |  |  |         moveResultMap.put("SYSCODE", "LIMS"); | 
 |  |  |         moveResultMap.put("SYSMODEL", "æ£éªåç§»åº"); | 
 |  |  |         moveResultMap.put("BATCH_INFO", moveResultList); | 
 |  |  |  | 
 |  |  |         Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap)); | 
 |  |  |         if (result1.getCode() != 200) { | 
 |  |  |             throw new ErrorException("IFSæ£éªåç§»åºå¤±è´¥: " + result1.getMessage()); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
 |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
 |  |  | import com.ruoyi.common.core.domain.Result; | 
 |  |  | import com.ruoyi.common.oa.OAProcess; | 
 |  |  | import com.ruoyi.common.oa.OAProperty; | 
 |  |  | import com.ruoyi.common.oa.OAResult; | 
 |  |  | import com.ruoyi.common.utils.QueryWrappers; | 
 |  |  | import com.ruoyi.common.utils.SecurityUtils; | 
 |  |  | import com.ruoyi.framework.exception.ErrorException; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Resource | 
 |  |  |     private CommonOaService commonOaService; | 
 |  |  |     @Resource | 
 |  |  |     private OAProperty oaProperty; | 
 |  |  |  | 
 |  |  |     @Resource | 
 |  |  |     private InsUnqualifiedHandlerFileService insUnqualifiedHandlerFileService; | 
 |  |  |     @Resource | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public Result pushOA(PushOADto pushOADto) { | 
 |  |  |         //è·åä¸åæ ¼å¤çè®°å½ | 
 |  |  |         UnqualifiedHandlerVO vo = baseMapper.findById(pushOADto.getHandlerId()); | 
 |  |  |  | 
 |  |  |         if (vo.getRequestId() != null) { | 
 |  |  |             throw new ErrorException("该ä¸åæ ¼å¤çå·²æäº¤è¿OA"); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         //æäº¤oaç¸å
³å段èµå¼ | 
 |  |  |         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | 
 |  |  |         Map<String, String> mainFields = new HashMap<>(); | 
 |  |  |         mainFields.put("bh", vo.getNo());//ç¼å· | 
 |  |  |         mainFields.put("gysmc", vo.getSupplierName());//ä¾åºååç§° | 
 |  |  |         mainFields.put("wlmc", vo.getMaterialName());//ç©æåç§° | 
 |  |  |         mainFields.put("scpc", vo.getProductionBatch());//çäº§æ¹æ¬¡ | 
 |  |  |         mainFields.put("dhsl", vo.getCargoQuantity());//å°è´§æ°é | 
 |  |  |         mainFields.put("ggxh", vo.getSpecsModels());//è§æ ¼åå· | 
 |  |  |         mainFields.put("bjrq", vo.getInspectTime().format(formatter));//æ¥æ£æ¥æ | 
 |  |  |         mainFields.put("fkr", SecurityUtils.getUsername());//åé¦äºº | 
 |  |  |         mainFields.put("fkrq", vo.getFeedbackTime().format(formatter));//å馿¥æ | 
 |  |  |         mainFields.put("fl", vo.getClassification());//åç±» | 
 |  |  |         mainFields.put("bhggs", vo.getOffGradeAscription());//ä¸åæ ¼å½å± | 
 |  |  |         mainFields.put("bhgqkms", vo.getUnqualifiedDesc());//ä¸åæ ¼æ
åµæè¿° | 
 |  |  |  | 
 |  |  |         //æ¥è¯¢éä»¶ | 
 |  |  |         List<InsUnqualifiedHandlerFile> handlerFiles = insUnqualifiedHandlerFileService.list(Wrappers.<InsUnqualifiedHandlerFile>lambdaQuery() | 
 |  |  |                 .eq(InsUnqualifiedHandlerFile::getUnqualifiedId, vo.getHandlerId())); | 
 |  |  |         if (CollectionUtils.isNotEmpty(handlerFiles)) { | 
 |  |  |             StringBuilder fileUrl = new StringBuilder(); | 
 |  |  |             for (int i = 0; i < handlerFiles.size(); i++) { | 
 |  |  |                 String path = handlerFiles.get(i).getType().equals(1) ? "/lims/img/" : "/lims/word/"; | 
 |  |  |                 if (i == handlerFiles.size() - 1) { | 
 |  |  |                     fileUrl.append("<a href='" + oaProperty.getProdIp()).append(path + handlerFiles.get(i).getFileUrl() | 
 |  |  |                             + "'target='_blank'>" + handlerFiles.get(i).getFileName() + "</a>"); | 
 |  |  |                 } else { | 
 |  |  |                     fileUrl.append("<a href='" + oaProperty.getProdIp()).append(path + handlerFiles.get(i).getFileUrl() | 
 |  |  |                             + "'target='_blank'>" + handlerFiles.get(i).getFileName() + "</a>").append("<br/>"); | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |             mainFields.put("xlimsfj", fileUrl.toString()); | 
 |  |  |         } | 
 |  |  |         //æµç¨æ é¢ | 
 |  |  |         String requestName = vo.getHeadline(); | 
 |  |  |         //åèµ·OA | 
 |  |  |         boolean oa = false; | 
 |  |  |         try { | 
 |  |  |             log.info("åèµ·ä¸åæ ¼å¤çOA审核æµç¨"); | 
 |  |  |             String unqualifiedProcessId = oaProperty.getUnqualifiedProcessId(); | 
 |  |  |             OAResult oaResult = OAProcess.start(mainFields, requestName, unqualifiedProcessId,SecurityUtils.getUsername()); | 
 |  |  |             log.info("ä¸åæ ¼å¤çOA审核æµç¨ç»æï¼è¿åç»æ->{}" + oaResult); | 
 |  |  |             oa = oaResult.success(); | 
 |  |  |             if (oa) { | 
 |  |  |                 String addWorkflowResult = oaResult.getAddWorkflowResult(); | 
 |  |  |                 baseMapper.update(null, new LambdaUpdateWrapper<InsUnqualifiedHandler>() | 
 |  |  |                         .set(InsUnqualifiedHandler::getRequestId, addWorkflowResult) | 
 |  |  |                         .set(InsUnqualifiedHandler::getOaState, 2) | 
 |  |  |                         .eq(InsUnqualifiedHandler::getId, pushOADto.getHandlerId())); | 
 |  |  |             } else { | 
 |  |  |                 return Result.fail("æäº¤oa失败: " + oaResult.getErrorMsg()); | 
 |  |  |             } | 
 |  |  |         } catch (Exception e) { | 
 |  |  |             throw new RuntimeException(e); | 
 |  |  |         } | 
 |  |  |         return Result.success(); | 
 |  |  |     } | 
 |  |  |  | 
 
 |  |  | 
 |  |  |     private InsSampleMapper insSampleMapper; | 
 |  |  |     private final NumberGenerator<InsOrder> numberGenerator; | 
 |  |  |     private InsReportService insReportService; | 
 |  |  |     private WechatProperty wechatProperty; | 
 |  |  | //    private WechatProperty wechatProperty; | 
 |  |  |     private ThreadPoolTaskExecutor threadPoolTaskExecutor; | 
 |  |  |     private InsProductMapper insProductMapper; | 
 |  |  |     private AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper; | 
 |  |  | 
 |  |  |                 .set(IfsInventoryQuantity::getIsInspect, 1) | 
 |  |  |                 .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now()) | 
 |  |  |         ); | 
 |  |  |         threadPoolTaskExecutor.execute(() -> { | 
 |  |  |             List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery() | 
 |  |  |                     .in(IfsInventoryQuantity::getId, ids)); | 
 |  |  |             // ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  |             String message = ""; | 
 |  |  |             message += "æ°å¢æ¥æ£éç¥"; | 
 |  |  |             for (IfsInventoryQuantity inventoryQuantity : quantityList) { | 
 |  |  |                 message += "\næ¹æ¬¡å·: " + inventoryQuantity.getUpdateBatchNo(); | 
 |  |  |                 message += "\né¶ä»¶æè¿°: " + inventoryQuantity.getPartDesc(); | 
 |  |  |                 message += "\næµè¾¾æ°é: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas(); | 
 |  |  |  | 
 |  |  |                 // å¤æææ²¡æå°20å¨. æè
è½å¦å
æ£ | 
 |  |  |                 int result = notificationRawOrder(inventoryQuantity.getId()); | 
 |  |  |                 switch (result) { | 
 |  |  |                     case 1: | 
 |  |  |                         message += "\nå½åæ ·åå·²æ£éªè¿, å¯ä»¥å
æ£"; | 
 |  |  |                         break; | 
 |  |  |                     case 2: | 
 |  |  |                         message += "\nå½åæ ·åå·²è¶
è¿20å¨"; | 
 |  |  |                         break; | 
 |  |  |                 } | 
 |  |  |                 message += "\n"; | 
 |  |  |             } | 
 |  |  |             WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); | 
 |  |  |         }); | 
 |  |  | //        threadPoolTaskExecutor.execute(() -> { | 
 |  |  | //            List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery() | 
 |  |  | //                    .in(IfsInventoryQuantity::getId, ids)); | 
 |  |  | //            // ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  | //            String message = ""; | 
 |  |  | //            message += "æ°å¢æ¥æ£éç¥"; | 
 |  |  | //            for (IfsInventoryQuantity inventoryQuantity : quantityList) { | 
 |  |  | //                message += "\næ¹æ¬¡å·: " + inventoryQuantity.getUpdateBatchNo(); | 
 |  |  | //                message += "\né¶ä»¶æè¿°: " + inventoryQuantity.getPartDesc(); | 
 |  |  | //                message += "\næµè¾¾æ°é: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas(); | 
 |  |  | // | 
 |  |  | //                // å¤æææ²¡æå°20å¨. æè
è½å¦å
æ£ | 
 |  |  | //                int result = notificationRawOrder(inventoryQuantity.getId()); | 
 |  |  | //                switch (result) { | 
 |  |  | //                    case 1: | 
 |  |  | //                        message += "\nå½åæ ·åå·²æ£éªè¿, å¯ä»¥å
æ£"; | 
 |  |  | //                        break; | 
 |  |  | //                    case 2: | 
 |  |  | //                        message += "\nå½åæ ·åå·²è¶
è¿20å¨"; | 
 |  |  | //                        break; | 
 |  |  | //                } | 
 |  |  | //                message += "\n"; | 
 |  |  | //            } | 
 |  |  | //            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); | 
 |  |  | //        }); | 
 |  |  |         return 1; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo()) | 
 |  |  |         ); | 
 |  |  |  | 
 |  |  |         threadPoolTaskExecutor.execute(() -> { | 
 |  |  |             IfsInventoryQuantity inventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryQuantity.getId()); | 
 |  |  |             // ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  |             String message = ""; | 
 |  |  |             message += "æ°å¢æ¥æ£éç¥"; | 
 |  |  |             message += "\næ¹æ¬¡å·: " + inventoryQuantity.getUpdateBatchNo(); | 
 |  |  |             message += "\né¶ä»¶æè¿°: " + inventoryQuantity.getPartDesc(); | 
 |  |  |             message += "\næµè¾¾æ°é: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas(); | 
 |  |  |             WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); | 
 |  |  |         }); | 
 |  |  | //        threadPoolTaskExecutor.execute(() -> { | 
 |  |  | //            IfsInventoryQuantity inventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryQuantity.getId()); | 
 |  |  | //            // ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  | //            String message = ""; | 
 |  |  | //            message += "æ°å¢æ¥æ£éç¥"; | 
 |  |  | //            message += "\næ¹æ¬¡å·: " + inventoryQuantity.getUpdateBatchNo(); | 
 |  |  | //            message += "\né¶ä»¶æè¿°: " + inventoryQuantity.getPartDesc(); | 
 |  |  | //            message += "\næµè¾¾æ°é: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas(); | 
 |  |  | //            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); | 
 |  |  | //        }); | 
 |  |  |         return 1; | 
 |  |  |     } | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import java.util.Set; | 
 |  |  | import java.util.UUID; | 
 |  |  |  | 
 |  |  | import com.ruoyi.common.config.SsoBean; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
 |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private TokenService tokenService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private SsoBean ssoBean; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * ç»å½æ¹æ³ | 
 |  |  | 
 |  |  |     @GetMapping("/getSsoAuthUrl") | 
 |  |  |     public AjaxResult getSsoAuthUrl() { | 
 |  |  |         String uuid = UUID.randomUUID().toString(); | 
 |  |  |         return AjaxResult.success("æä½æå", ssoBean.getUrl() + "/oauth2/auth?response_type=code&scope=openid&client_id=" + ssoBean.getClientId() + "&redirect_uri=" + ssoBean.getCallbackUrl() + "&state=" + uuid); | 
 |  |  |         return AjaxResult.success("æä½æå"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 
 |  |  | 
 |  |  |     # æ°æ®åºç´¢å¼ | 
 |  |  |     database: 0 | 
 |  |  |     #    # å¯ç  | 
 |  |  |     #    password: root2022! | 
 |  |  |     password: 123456 | 
 |  |  |     # è¿æ¥è¶
æ¶æ¶é´ | 
 |  |  |     timeout: 10s | 
 |  |  |     lettuce: | 
 |  |  | 
 |  |  | wordUrl: D:\é¡¹ç®æä»¶åå¨\word | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #oa: | 
 |  |  | #    oaHost: http://192.168.0.49:8000/oa_workflowrequest.asmx?wsdl | 
 |  |  | #    prodIp: http://192.168.21.53:8081 | 
 |  |  | #    unqualifiedProcessId: 41974 | 
 |  |  |  | 
 |  |  | # äººäºç³»ç» | 
 |  |  | personnel: | 
 |  |  |   # æ£å¼å°å | 
 |  |  |   code: https://ztt-sso.ztt.cn/oauth2/token | 
 |  |  |   # è£
å¤äººäºæ£å¼åº | 
 |  |  |   appId: 6f5f6a0c-2a01-4ef6-9e75-c8a6f0c2f044 | 
 |  |  |   appSecret: 89b9c4735b1e5ee9d6a8544b9b38bb03 | 
 |  |  |   companies: https://ztt-connector.ztt.cn/api/org/v1/companies | 
 |  |  |   simple: https://ztt-connector.ztt.cn/api/org/v1/employees/simple?companyId= | 
 |  |  |   # äººåå¯ç è·å | 
 |  |  |   password: https://ztt-connector.ztt.cn/api/org/v1/employees/original_pwd/ | 
 |  |  |   department: https://ztt-connector.ztt.cn/api/org/v1/companies/companyId/departments | 
 |  |  |   person: https://ztt-connector.ztt.cn/api/org/v1/employees/simple/ | 
 |  |  |  | 
 |  |  | # ä¼ä¸å¾®ä¿¡éç¥ | 
 |  |  | wechat: | 
 |  |  |   # è´¨éæ¥æ£éç¥ | 
 |  |  |   examiningUrl: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=21993616-9966-4fe4-81b0-68e99a40c964 | 
 |  |  |   examiningUrl: | 
 |  |  |  | 
 |  |  | ifs: | 
 |  |  |   contract: ZTZB | 
 |  |  |   contract-key-get: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo= | 
 |  |  |   contract-key-post: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo= | 
 |  |  |   custorder: http://192.168.20.47/PurchService.ashx? | 
 |  |  |   custorder-port: http://192.168.20.47:8008/PurchService.ashx? | 
 |  |  |   erp-services: http://192.168.20.47:8081 | 
 |  |  |  | 
 |  |  | # å¤æ³¨ 18083å¯ç ï¼zttZTT123!@ | 
 |  |  | mqtt: | 
 |  |  |   url: tcp://mqtt-ztt.zttiot.com:1883 # æå¡å¨ip | 
 |  |  |   username: forwarder # MQTT-æå¡ç«¯-ç¨æ·å,åæä¼ä¿®æ¹ä¸ºç¨æ·ç»å½å | 
 |  |  |   password: ZTlink12345 # MQTT-æå¡ç«¯-å¯ç ï¼,åæä¼ä¿®æ¹ä¸ºç¨æ·ç»å½å¯ç  | 
 |  |  |   timeout: 100 # è¶
æ¶æ¶é´ ï¼åä½ï¼ç§ï¼ | 
 |  |  |   keepalive: 60 # å¿è·³ ï¼åä½ï¼ç§ï¼ | 
 |  |  |   qos: 1 # å¿è·³å
çº§å« | 
 |  |  |   completion-timeout: 3000 # è¿æ¥è¶
æ¶æ¶é´ï¼åä½ï¼ç§ï¼ | 
 |  |  |   clientId: javaPublish # clientId | 
 |  |  |   subscribe: /ztt/v3/2443521/publish # è®¢é
ä¸»é¢ | 
 |  |  |   client: false # å¦æå¼åéè¦å¯å¨æµè¯ï¼éè¦æ¹ä¸ºfalseä¸ç¶ä¼ä¸ç´æ¥é | 
 |  |  |  | 
 
 |  |  | 
 |  |  | wordUrl: /javaWork/lims-ruoyi/file/word | 
 |  |  |  | 
 |  |  |  | 
 |  |  | #oa: | 
 |  |  | #    oaHost: http://192.168.0.49:8000/oa_workflowrequest.asmx?wsdl | 
 |  |  | #    prodIp: http://192.168.21.53:8081 | 
 |  |  | #    unqualifiedProcessId: 41974 | 
 |  |  |  | 
 |  |  | wechat: | 
 |  |  |   # è´¨éæ¥æ£éç¥ | 
 |  |  |   examiningUrl: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=21993616-9966-4fe4-81b0-68e99a40c964 | 
 |  |  |   examiningUrl: | 
 |  |  |  | 
 |  |  | ifs: | 
 |  |  |   contract: ZTZB | 
 |  |  |   contract-key-get: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo= | 
 |  |  |   contract-key-post: 4ttDeLKNsZuhstjtROMcRE1USNFXKdFYE7lQ2p1m5Bo= | 
 |  |  |   custorder: http://192.168.20.47/PurchService.ashx? | 
 |  |  |   custorder-port: http://192.168.20.47:8008/PurchService.ashx? | 
 |  |  |   erp-services: http://192.168.20.47:8081 | 
 |  |  |  | 
 |  |  | # å¤æ³¨ 18083å¯ç ï¼zttZTT123!@ | 
 |  |  | mqtt: | 
 |  |  |   url: tcp://mqtt-ztt.zttiot.com:1883 # æå¡å¨ip | 
 |  |  |   username: forwarder # MQTT-æå¡ç«¯-ç¨æ·å,åæä¼ä¿®æ¹ä¸ºç¨æ·ç»å½å | 
 |  |  |   password: ZTlink12345 # MQTT-æå¡ç«¯-å¯ç ï¼,åæä¼ä¿®æ¹ä¸ºç¨æ·ç»å½å¯ç  | 
 |  |  |   timeout: 100 # è¶
æ¶æ¶é´ ï¼åä½ï¼ç§ï¼ | 
 |  |  |   keepalive: 60 # å¿è·³ ï¼åä½ï¼ç§ï¼ | 
 |  |  |   qos: 1 # å¿è·³å
çº§å« | 
 |  |  |   completion-timeout: 3000 # è¿æ¥è¶
æ¶æ¶é´ï¼åä½ï¼ç§ï¼ | 
 |  |  |   clientId: javaPublish # clientId | 
 |  |  |   subscribe: /ztt/v3/2443521/publish # è®¢é
ä¸»é¢ | 
 |  |  |   client: false # å¦æå¼åéè¦å¯å¨æµè¯ï¼éè¦æ¹ä¸ºfalseä¸ç¶ä¼ä¸ç´æ¥é | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  | # å¼åç¯å¢é
ç½® | 
 |  |  | server: | 
 |  |  |   # æå¡å¨çHTTPç«¯å£ | 
 |  |  |   port: 8001 | 
 |  |  |   port: 7012 | 
 |  |  |   servlet: | 
 |  |  |     # åºç¨ç访é®è·¯å¾ | 
 |  |  |     context-path: | 
 |  |  | 
 |  |  |   # å¹é
龿¥ | 
 |  |  |   urlPatterns: /system/*,/monitor/*,/tool/* | 
 |  |  |  | 
 |  |  | #éå¢ç»ä¸ç»å½ | 
 |  |  | sso: | 
 |  |  |   url: https://ztt-sso.ztt.cn | 
 |  |  |   clientId: 6ca77685-e304-4c0e-9e63-3839e166742f | 
 |  |  |   clientSecret: 496e2809629ea5beb4118b10c95d702f | 
 |  |  |   callbackUrl: https://ztzb-lims.ztt.cn/thirdpartylogin | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  | import javax.servlet.http.HttpServletRequest; | 
 |  |  | import javax.servlet.http.HttpServletResponse; | 
 |  |  |  | 
 |  |  | import com.ruoyi.common.config.SsoBean; | 
 |  |  | import com.ruoyi.common.utils.SecurityUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.context.annotation.Configuration; | 
 |  |  | 
 |  |  |     private TokenService tokenService; | 
 |  |  |     @Autowired | 
 |  |  |     private RedisTemplate redisTemplate; | 
 |  |  |     @Autowired | 
 |  |  |     private SsoBean ssoBean; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * éåºå¤ç | 
 |  |  | 
 |  |  |             // æ¸
é¤åç¹ç»å½ä¿¡æ¯ | 
 |  |  |             Object idToken = redisTemplate.opsForValue().get("ssoOauthToken:idToken:" + userName); | 
 |  |  |             if (idToken != null) { | 
 |  |  |                 loginOutUrl = ssoBean.getUrl() + "/oauth2/sessions/logout?id_token_hint=" + idToken; | 
 |  |  |                 redisTemplate.delete("ssoOauthToken:idToken:" + userName); | 
 |  |  |                 AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, MessageUtils.message("user.sso.logout.success"))); | 
 |  |  |             } else { | 
 
 |  |  | 
 |  |  | import javax.net.ssl.SSLContext; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson.JSON; | 
 |  |  | import com.ruoyi.common.config.SsoBean; | 
 |  |  | import com.ruoyi.framework.model.SsoOauthTokenModel; | 
 |  |  | import com.ruoyi.framework.model.SsoUserInfoModel; | 
 |  |  | import com.ruoyi.framework.web.ssoAuth.SsoCodeAuthenticationToken; | 
 |  |  | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private ISysConfigService configService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private SsoBean ssoBean; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private RedisTemplate redisTemplate; | 
 |  |  | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public SsoOauthTokenModel getSsoAccessToken(String code) { | 
 |  |  |         List<NameValuePair> list = new LinkedList<>(); | 
 |  |  |         list.add(new BasicNameValuePair("grant_type", "authorization_code")); | 
 |  |  |         list.add(new BasicNameValuePair("code", code)); | 
 |  |  |         list.add(new BasicNameValuePair("client_id", ssoBean.getClientId())); | 
 |  |  |         list.add(new BasicNameValuePair("client_secret", ssoBean.getClientSecret())); | 
 |  |  |         list.add(new BasicNameValuePair("redirect_uri", ssoBean.getCallbackUrl())); | 
 |  |  |  | 
 |  |  |         Map<String, String> headers = new HashMap<>(); | 
 |  |  |         headers.put("Content-Type", "application/x-www-form-urlencoded"); | 
 |  |  |         headers.put("Accept", "application/json"); | 
 |  |  |         String result = doPost(ssoBean.getUrl() + "/oauth2/token", headers, list); | 
 |  |  |         if (org.apache.commons.lang3.StringUtils.isBlank(result)) { | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |         return JSON.parseObject(result, SsoOauthTokenModel.class); | 
 |  |  |         return null; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     public SsoUserInfoModel getSsoUserInfo(String accessToken) { | 
 |  |  |         Map<String, String> headers = new HashMap<>(); | 
 |  |  |         headers.put("Authorization", "Bearer " + accessToken); | 
 |  |  |         String result = doPost(ssoBean.getUrl() + "/userinfo", headers, null); | 
 |  |  |         if (org.apache.commons.lang3.StringUtils.isBlank(result)) { | 
 |  |  |             return null; | 
 |  |  |         } | 
 |  |  |         return JSON.parseObject(result, SsoUserInfoModel.class); | 
 |  |  |         return null; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public static String doPost(String url, Map<String, String> headers, List<NameValuePair> params) { |