浏览代码

修改最后开合时间

wutt 5 年之前
父节点
当前提交
1d47ecbdd2

+ 2 - 2
cloud-model/src/main/resources/mapper/MouldMapper.xml

@@ -90,7 +90,7 @@
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbco.company_name produceCompany,tbm.pre_update_id,
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
-        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
+        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT indate FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
         ,tbmp.curhill_number hillNumber,tbmp.curtemperature temperature
         from
         tb_mould tbm
@@ -140,7 +140,7 @@
         tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.holes,tbm.pre_update_id,tbco.company_name produceCompany,
         tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,tbmp.equipment_name equipmentName,
         tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
-        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT indate FROM `mould_history` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime,
+        tbmp.lng,tbmp.lat,tbmp.stage,(SELECT indate FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime,
         tbmp.curhill_number hillNumber,
         tbmp.curtemperature temperature
         from

+ 1 - 0
cloud-socket/.settings/org.eclipse.core.resources.prefs

@@ -1,3 +1,4 @@
 eclipse.preferences.version=1
 encoding//WebContent/bind_weixin.jsp=UTF-8
 encoding//src/com/tenpay=GBK
+encoding/<project>=UTF-8

+ 5 - 5
cloud-socket/src/com/js/kbt/socket/UserHandler.java

@@ -359,10 +359,10 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 			logger.info("非法云模盒编号,不作下发处理");
 			return;
 		}
-		// List<TimeCalibrationRecord> count =
-		// timeCalibrationRecordMapper.selectCountByToday(equipmentNo);
-		// if (count.size() == 0) {
-		// 时间一直进行校准
+		 List<TimeCalibrationRecord> count =
+		 timeCalibrationRecordMapper.selectCountByToday(equipmentNo);
+		 //今天未校准时间,下发时间校准,已经校准过了,则不再校准
+		 if (count.size() == 0) {
 		Date date = new Date();
 		SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd,HH:mm:ss");
 		String dateStr = sdf.format(date);
@@ -377,7 +377,7 @@ public class UserHandler extends SimpleChannelInboundHandler<String> {
 		timeCalibrationRecord.setIndate(new Date());
 		timeCalibrationRecord.setEquipmentNo(equipmentNo);
 		timeCalibrationRecordMapper.insertSelective(timeCalibrationRecord);
-		// }
+		 }
 	}
 
 	private void handleModLogic(MouldHistory item, int avgTime) {