| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.domain.enums.LedErrorAreaType; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.RgvOneSign; |
| | | import com.zy.asrs.entity.WrkDetl; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.RgvOneSignMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.escalationParam.ScaleEscalationParam; |
| | | import com.zy.asrs.task.escalationParam.StaEscalationParam; |
| | | import com.zy.asrs.utils.LedErrorThreadUtil; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | |
| | | @Transactional |
| | | public class ScaleEscalationHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | @Autowired |
| | | private ApiLogService apiLogService; |
| | | @Autowired |
| | |
| | | if (!Cools.isEmpty(basDevp) && basDevp.getAutoing().equals("Y") && basDevp.getWrkNo()==0){ |
| | | if (staProtocol.isAutoing() && staProtocol.getWorkNo()==0 && staProtocol.isInEnable()){ |
| | | log.error("1楼翻转重量信息上传时,站点状态:"+JSON.toJSONString(staProtocol)); |
| | | ScaleEscalationParam scaleEscalationParam = new ScaleEscalationParam(basDevp.getGrossWt()); |
| | | ScaleEscalationParam scaleEscalationParam = new ScaleEscalationParam(basDevp.getGrossWt(),basDevp.getDevNo()); |
| | | ReturnT<String> result = postMesData(reportOutPath,scaleEscalationParam); |
| | | if (result.getCode()==200){ |
| | | basDevp.setReportSign(1); |
| | | basDevpService.updateById(basDevp); |
| | | return SUCCESS; |
| | | }else { |
| | | LedErrorThreadUtil.ledErrorThread("1楼翻转倒料重量上报erp失败!站点号:"+staNo,4, LedErrorAreaType.ONE_OTHER.getDesc()); |
| | | log.error("1楼翻转重量信息上传失败"); |
| | | } |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("异常!!!"+e); |
| | | log.error("异常2!!!"+e); |
| | | return FAIL; |
| | | } |
| | | return FAIL; |
| | |
| | | .build() |
| | | .doPost(); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.getInteger("Code")==200) { |
| | | if (jsonObject.getInteger("code")==200) { |
| | | success = true; |
| | | } else { |
| | | log.error("1楼翻转重量信息上传请求接口失败!!!url:{};request:{};response:{}"+erpUrl+erpPath, JSON.toJSONString(combParam), response); |