| | |
| | | import com.vci.ubcs.code.webService.config.AttributeMapConfig; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.HttpUtils; |
| | |
| | | @Value("${erp.item.secValue:A}") |
| | | public String secValue; |
| | | |
| | | |
| | | @Value("${erp.item.btmName:XHDH}") |
| | | public String btmName; |
| | | /** |
| | | * 业务类型的服务 |
| | | */ |
| | |
| | | * 同步型号代号 |
| | | */ |
| | | @Override |
| | | public void saveItemDataSyncScheduing(String btmName) { |
| | | public void saveItemDataSyncScheduing(String endDate) { |
| | | String paramString=""; |
| | | String backString="成功"; |
| | | String msg="成功"; |
| | | boolean success=true; |
| | | SearchItemParam searchItemParam=new SearchItemParam(); |
| | | searchItemParam.setSystag("VCI"); //调用系统标识 |
| | | Calendar calendar= Calendar.getInstance(); |
| | | calendar.set(Calendar.HOUR_OF_DAY,0); |
| | | calendar.set(Calendar.MINUTE,0); |
| | | calendar.set(Calendar.SECOND,0); |
| | | log.info("查询时间------->"+calendar.getTime()); |
| | | SimpleDateFormat dft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String lastchangedon= dft.format(calendar.getTime()); |
| | | String lastchangedon=""; |
| | | if(StringUtils.isBlank(endDate)) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | log.info("查询时间------->"+calendar.getTime()); |
| | | lastchangedon= dft.format(calendar.getTime()); |
| | | }else{ |
| | | lastchangedon=endDate; |
| | | } |
| | | searchItemParam.setLastchangedon(lastchangedon); |
| | | searchItemParam.setStatus("1");// |
| | | Map<String,String>searchDataMap= VciBaseUtil.objectToMapString(searchItemParam); |
| | | //SearchItemVO searchItemVO= mdmSearchItemCodeProvider.getppModelByElem(searchDataMap); |
| | | SearchItemVO searchItemVO=new SearchItemVO(); |
| | | SearchItemVO searchItemVO= mdmSearchItemCodeProvider.getppModelByElem(searchDataMap); |
| | | /*SearchItemVO searchItemVO=new SearchItemVO(); |
| | | List<SearchItemDataVO> data=new ArrayList<>(); |
| | | SearchItemDataVO searchItemDataVO1=initData("1","","pro-00001"); |
| | | SearchItemDataVO searchItemDataVO2=initData("0","item-00001",""); |
| | |
| | | data.add(searchItemDataVO2); |
| | | searchItemVO.setData(data); |
| | | searchItemVO.setCode("200"); |
| | | searchItemVO.setMsg(""); |
| | | String paramString=""; |
| | | String backString="成功"; |
| | | String msg="成功"; |
| | | boolean success=true; |
| | | searchItemVO.setMsg("");*/ |
| | | if(searchItemVO!=null) { |
| | | paramString = JSONObject.toJSON(searchItemVO).toString(); |
| | | try { |
| | |
| | | success=false; |
| | | backString="查询失败--->"+e; |
| | | msg="查询失败--->"+e; |
| | | throw new VciBaseException(e.getMessage()); |
| | | }finally { |
| | | try { |
| | | //记录日志 |
| | |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | log.error(e.getMessage()); |
| | | throw new VciBaseException(e.getMessage()); |
| | | } |
| | | } |
| | | } |