|
@@ -15,6 +15,7 @@ import com.github.zuihou.context.BaseContextHandler;
|
|
|
import com.github.zuihou.database.mybatis.auth.DataScope;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
import com.github.zuihou.injection.annonation.InjectionResult;
|
|
|
+import com.github.zuihou.tenant.dao.ProductionresourceviewMapper;
|
|
|
import com.github.zuihou.tenant.entity.Productionresource;
|
|
|
import com.github.zuihou.tenant.service.ProductionresourceService;
|
|
|
import com.github.zuihou.utils.BeanPlusUtil;
|
|
@@ -51,7 +52,7 @@ public class MachineCuttingToolServiceImpl extends SuperCacheServiceImpl<Machine
|
|
|
@Value("${machineCuttingTools.synUrl}")
|
|
|
private String synUrl;
|
|
|
@Autowired
|
|
|
- private ProductionresourceService productionresourceService;
|
|
|
+ private ProductionresourceviewMapper productionresourceviewMapper;
|
|
|
@Resource
|
|
|
private RestTemplate restTemplate;
|
|
|
|
|
@@ -76,7 +77,7 @@ public class MachineCuttingToolServiceImpl extends SuperCacheServiceImpl<Machine
|
|
|
HttpHeaders headers = new HttpHeaders();
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
for(String id : synIds){
|
|
|
- Productionresource productionresource = productionresourceService.getById(id);
|
|
|
+ Productionresource productionresource = productionresourceviewMapper.selectById(id);
|
|
|
// 访问ccs接口查询设备刀具
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("url",productionresource.getIp());
|
|
@@ -93,7 +94,7 @@ public class MachineCuttingToolServiceImpl extends SuperCacheServiceImpl<Machine
|
|
|
JSONObject upResult = JSON.parseObject(synMachineCuttingTolls);
|
|
|
if("0".equals(upResult.getString("code"))){
|
|
|
productionresource.setToolSynTime(DateUtil.formatTime(Calendar.getInstance().getTime()));
|
|
|
- productionresourceService.save(productionresource);
|
|
|
+ productionresourceviewMapper.updateById(productionresource);
|
|
|
|
|
|
MachineCuttingTool machineCuttingTool = JSONObject.parseObject(synMachineCuttingTolls,MachineCuttingTool.class);
|
|
|
machineCuttingTool.setMachineId(Integer.valueOf(id));
|