|
@@ -46,7 +46,8 @@ public class EquipmentMaintenancePlanJob extends BaseJob2 {
|
|
|
" WHEN '年保养' THEN YEAR('"+planDate+"') " +
|
|
" WHEN '年保养' THEN YEAR('"+planDate+"') " +
|
|
|
" END AS period_num,device.wei_hu_zhou_qi_c_ as zhu_zhou_qi_ ,device.id_ as she_bei_bian_hao_,device.bian_zhi_bu_men_, " +
|
|
" END AS period_num,device.wei_hu_zhou_qi_c_ as zhu_zhou_qi_ ,device.id_ as she_bei_bian_hao_,device.bian_zhi_bu_men_, " +
|
|
|
" device.she_bei_ming_cheng_ as she_bei_ming_chen,device.she_bei_shi_bie_h as ri_qi_,device.cun_fang_di_dian_ as sheng_xiao_ri_qi_, " +
|
|
" device.she_bei_ming_cheng_ as she_bei_ming_chen,device.she_bei_shi_bie_h as ri_qi_,device.cun_fang_di_dian_ as sheng_xiao_ri_qi_, " +
|
|
|
- " jhb.id_ as ji_hua_zong_wai_j,jhzb.id_ as ji_hua_wai_jian_ ,device.wei_hu_fang_shi_ as wei_hu_gang_wei_ , device.di_dian_" +
|
|
|
|
|
|
|
+ " jhb.id_ as ji_hua_zong_wai_j,jhzb.id_ as ji_hua_wai_jian_ ,device.wei_hu_fang_shi_ as wei_hu_gang_wei_ , " +
|
|
|
|
|
+ " device.di_dian_ ,device.yuan_she_bei_bian as original_device_n " +
|
|
|
" FROM `t_mjsbwhjhb` jhb,`t_mjsbwhjhzb` jhzb,`v_device_devicemaintenance` device " +
|
|
" FROM `t_mjsbwhjhb` jhb,`t_mjsbwhjhzb` jhzb,`v_device_devicemaintenance` device " +
|
|
|
" WHERE jhb.shi_fou_guo_shen_='已完成' AND jhb.zhi_xing_zhuang_t='正常' " +
|
|
" WHERE jhb.shi_fou_guo_shen_='已完成' AND jhb.zhi_xing_zhuang_t='正常' " +
|
|
|
" AND jhb.id_ = jhzb.parent_id_ " +
|
|
" AND jhb.id_ = jhzb.parent_id_ " +
|
|
@@ -68,16 +69,17 @@ public class EquipmentMaintenancePlanJob extends BaseJob2 {
|
|
|
success = success + 1;
|
|
success = success + 1;
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
error = error + 1;
|
|
error = error + 1;
|
|
|
- logger.error("设备维护添加数据异常,异常数据she_bei_bian_hao_:{}",map.get("she_bei_bian_hao_"));
|
|
|
|
|
|
|
+ logger.error("设备维护添加数据异常,异常数据she_bei_bian_hao_:{} with error message {}",map.get("she_bei_bian_hao_"),e.getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- logger.warn("添加设备维护保养数据正常数:{}",success );
|
|
|
|
|
- logger.warn("添加设备维护保养数据异常数:{}",error);
|
|
|
|
|
|
|
+ String msg = "添加设备维护保养数据正常数:"+success+",添加设备维护保养数据异常数:"+error;
|
|
|
|
|
+ logger.warn(msg);
|
|
|
|
|
+ if (error>0){
|
|
|
|
|
+ throw new Exception(msg);
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
logger.warn("未查询到需要添加设备维护保养的数据");
|
|
logger.warn("未查询到需要添加设备维护保养的数据");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private String buildInsertSql(Map<String, Object> map, String uuid){
|
|
private String buildInsertSql(Map<String, Object> map, String uuid){
|