update BaojiGroupBattGroup、User_battmaint_check and relatedReference,maintCheck.byCondition
| | |
| | | @Alias("Process_survey") |
| | | public class Process_survey implements Serializable{ |
| | | private Integer num;//进程编号 |
| | | private Integer ProcessId;//进程id |
| | | private String ProcessName;//进程名 |
| | | private String ProcessVersion;//进程版本 |
| | | private Integer processId;//进程id |
| | | private String processName;//进程名 |
| | | private String processVersion;//进程版本 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai") |
| | | private Date ProcessTime;//进程执行的时间 |
| | | private Date processTime;//进程执行的时间 |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai") |
| | | private Date Process_starttime;//进程的初始时间 |
| | | private String ServerName;//服务名 |
| | | private Integer ServerFlag;//服务名 0:停止 1:进行中 2:暂不开启 |
| | | private Integer OutTime;//进程超时时间(秒) |
| | | private Date process_starttime;//进程的初始时间 |
| | | private String serverName;//服务名 |
| | | private Integer serverFlag;//服务名 0:停止 1:进行中 2:暂不开启 |
| | | private Integer outTime;//进程超时时间(秒) |
| | | private String note; |
| | | private String ProcessName_CN; |
| | | private String processName_CN; |
| | | public Integer getNum() { |
| | | return num; |
| | | } |
| | | public void setNum(Integer num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | |
| | | public Integer getProcessId() { |
| | | return ProcessId; |
| | | return processId; |
| | | } |
| | | |
| | | public void setProcessId(Integer processId) { |
| | | ProcessId = processId; |
| | | this.processId = processId; |
| | | } |
| | | |
| | | public String getProcessName() { |
| | | return ProcessName; |
| | | return processName; |
| | | } |
| | | |
| | | public void setProcessName(String processName) { |
| | | ProcessName = processName; |
| | | this.processName = processName; |
| | | } |
| | | public Date getProcessTime() { |
| | | return ProcessTime; |
| | | } |
| | | public void setProcessTime(Date processTime) { |
| | | ProcessTime = processTime; |
| | | } |
| | | |
| | | public String getServerName() { |
| | | return ServerName; |
| | | } |
| | | public void setServerName(String serverName) { |
| | | ServerName = serverName; |
| | | } |
| | | public Integer getServerFlag() { |
| | | return ServerFlag; |
| | | } |
| | | public void setServerFlag(Integer serverFlag) { |
| | | ServerFlag = serverFlag; |
| | | } |
| | | |
| | | public Integer getOutTime() { |
| | | return OutTime; |
| | | } |
| | | public void setOutTime(Integer outTime) { |
| | | OutTime = outTime; |
| | | } |
| | | |
| | | |
| | | public String getProcessVersion() { |
| | | return ProcessVersion; |
| | | return processVersion; |
| | | } |
| | | |
| | | public void setProcessVersion(String processVersion) { |
| | | ProcessVersion = processVersion; |
| | | this.processVersion = processVersion; |
| | | } |
| | | |
| | | public Date getProcessTime() { |
| | | return processTime; |
| | | } |
| | | |
| | | public void setProcessTime(Date processTime) { |
| | | this.processTime = processTime; |
| | | } |
| | | |
| | | public Date getProcess_starttime() { |
| | | return Process_starttime; |
| | | return process_starttime; |
| | | } |
| | | |
| | | public void setProcess_starttime(Date process_starttime) { |
| | | Process_starttime = process_starttime; |
| | | this.process_starttime = process_starttime; |
| | | } |
| | | |
| | | public String getServerName() { |
| | | return serverName; |
| | | } |
| | | |
| | | public void setServerName(String serverName) { |
| | | this.serverName = serverName; |
| | | } |
| | | |
| | | public Integer getServerFlag() { |
| | | return serverFlag; |
| | | } |
| | | |
| | | public void setServerFlag(Integer serverFlag) { |
| | | this.serverFlag = serverFlag; |
| | | } |
| | | |
| | | public Integer getOutTime() { |
| | | return outTime; |
| | | } |
| | | |
| | | public void setOutTime(Integer outTime) { |
| | | this.outTime = outTime; |
| | | } |
| | | |
| | | public String getNote() { |
| | | return note; |
| | | } |
| | | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | |
| | | public String getProcessName_CN() { |
| | | return ProcessName_CN; |
| | | return processName_CN; |
| | | } |
| | | |
| | | public void setProcessName_CN(String processName_CN) { |
| | | ProcessName_CN = processName_CN; |
| | | this.processName_CN = processName_CN; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Process_survey [num=" + num + ", ProcessId=" + ProcessId + ", ProcessName=" + ProcessName |
| | | + ", ProcessVersion=" + ProcessVersion + ", ProcessTime=" + ProcessTime + ", Process_starttime=" |
| | | + Process_starttime + ", ServerName=" + ServerName + ", ServerFlag=" + ServerFlag + ", OutTime=" |
| | | + OutTime + ", note=" + note + ", ProcessName_CN=" + ProcessName_CN + "]"; |
| | | return "Process_survey{" + |
| | | "num=" + num + |
| | | ", processId=" + processId + |
| | | ", processName='" + processName + '\'' + |
| | | ", processVersion='" + processVersion + '\'' + |
| | | ", processTime=" + processTime + |
| | | ", process_starttime=" + process_starttime + |
| | | ", serverName='" + serverName + '\'' + |
| | | ", serverFlag=" + serverFlag + |
| | | ", outTime=" + outTime + |
| | | ", note='" + note + '\'' + |
| | | ", processName_CN='" + processName_CN + '\'' + |
| | | '}'; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private Integer num; |
| | | private Integer baoji_group_id; |
| | | private String baoji_group_name; |
| | | private Integer StationId; |
| | | private Integer BattGroupId; |
| | | private Integer stationId; |
| | | private Integer battGroupId; |
| | | private Integer dev_id; |
| | | private String note; |
| | | |
| | | |
| | | public User_battgroup_baojigroup_battgroup() { |
| | | super(); |
| | | // TODO Auto-generated constructor stub |
| | | } |
| | | public Integer getNum() { |
| | | return num; |
| | |
| | | public void setBaoji_group_id(Integer baoji_group_id) { |
| | | this.baoji_group_id = baoji_group_id; |
| | | } |
| | | |
| | | public Integer getStationId() { |
| | | return StationId; |
| | | return stationId; |
| | | } |
| | | |
| | | public void setStationId(Integer stationId) { |
| | | StationId = stationId; |
| | | this.stationId = stationId; |
| | | } |
| | | |
| | | public Integer getBattGroupId() { |
| | | return BattGroupId; |
| | | return battGroupId; |
| | | } |
| | | |
| | | public void setBattGroupId(Integer battGroupId) { |
| | | BattGroupId = battGroupId; |
| | | this.battGroupId = battGroupId; |
| | | } |
| | | |
| | | public String getBaoji_group_name() { |
| | | return baoji_group_name; |
| | | } |
| | |
| | | public void setDev_id(Integer dev_id) { |
| | | this.dev_id = dev_id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "User_battgroup_baojigroup_battgroup [num=" + num |
| | | + ", baoji_group_id=" + baoji_group_id + ", baoji_group_name=" |
| | | + baoji_group_name + ", StationId=" + StationId |
| | | + ", BattGroupId=" + BattGroupId + ", dev_id=" + dev_id |
| | | + ", note=" + note + "]"; |
| | | return "User_battgroup_baojigroup_battgroup{" + |
| | | "num=" + num + |
| | | ", baoji_group_id=" + baoji_group_id + |
| | | ", baoji_group_name='" + baoji_group_name + '\'' + |
| | | ", stationId=" + stationId + |
| | | ", battGroupId=" + battGroupId + |
| | | ", dev_id=" + dev_id + |
| | | ", note='" + note + '\'' + |
| | | '}'; |
| | | } |
| | | |
| | | } |
| | |
| | | @Transient |
| | | List<User_battmaint_check_process> ubcp; |
| | | private Integer num; //主键 |
| | | private Integer StationId; //机房id |
| | | private Integer stationId; //机房id |
| | | private Integer usr_id; //责任人id |
| | | private Integer master_id; //创建人id |
| | | private Integer appoint_uid; //指派人id |
| | |
| | | private String remark; //备注 |
| | | public User_battmaint_check() { |
| | | super(); |
| | | // TODO Auto-generated constructor stub |
| | | } |
| | | |
| | | public List<User_battmaint_check_process> getUbcp() { |
| | |
| | | public void setNum(Integer num) { |
| | | this.num = num; |
| | | } |
| | | |
| | | public Integer getStationId() { |
| | | return StationId; |
| | | return stationId; |
| | | } |
| | | |
| | | public void setStationId(Integer stationId) { |
| | | StationId = stationId; |
| | | this.stationId = stationId; |
| | | } |
| | | |
| | | public Integer getUsr_id() { |
| | | return usr_id; |
| | | } |
| | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "User_battmaint_check [num=" + num + ", StationId=" + StationId |
| | | + ", usr_id=" + usr_id + ", master_id=" + master_id |
| | | + ", appoint_uid=" + appoint_uid + ", copy_uids=" + copy_uids |
| | | + ", task_type_id=" + task_type_id + ", task_level=" |
| | | + task_level + ", task_caption=" + task_caption |
| | | + ", task_time_start=" + task_time_start + ", task_time_end=" |
| | | + task_time_end + ", task_process=" + task_process |
| | | + ", task_done=" + task_done + ", task_done_time=" |
| | | + task_done_time + ", origin_usr_work_mark=" |
| | | + origin_usr_work_mark + ", origin_usr_work_mark1=" |
| | | + origin_usr_work_mark1 + ", task_done_confirm=" |
| | | + task_done_confirm + ", master_audit=" + master_audit |
| | | + ", remark=" + remark + "]"; |
| | | return "User_battmaint_check{" + |
| | | "ubcp=" + ubcp + |
| | | ", num=" + num + |
| | | ", stationId=" + stationId + |
| | | ", usr_id=" + usr_id + |
| | | ", master_id=" + master_id + |
| | | ", appoint_uid=" + appoint_uid + |
| | | ", copy_uids='" + copy_uids + '\'' + |
| | | ", task_type_id=" + task_type_id + |
| | | ", task_level=" + task_level + |
| | | ", task_caption='" + task_caption + '\'' + |
| | | ", task_time_start=" + task_time_start + |
| | | ", task_time_end=" + task_time_end + |
| | | ", task_process='" + task_process + '\'' + |
| | | ", task_done=" + task_done + |
| | | ", task_done_time=" + task_done_time + |
| | | ", origin_usr_work_mark=" + origin_usr_work_mark + |
| | | ", origin_usr_work_mark1=" + origin_usr_work_mark1 + |
| | | ", task_done_confirm=" + task_done_confirm + |
| | | ", master_audit=" + master_audit + |
| | | ", remark='" + remark + '\'' + |
| | | '}'; |
| | | } |
| | | |
| | | } |
| | |
| | | public interface Process_surveyMapper { |
| | | |
| | | //根据进程名字,将服务是否开启的标识符改为0 |
| | | @Update("update web_site.tb_Process_survey set ServerFlag='${@com.fgkj.mapper.ProcessServerDao@PROCESS_OFF}' where ProcessName=#{ProcessName} and ServerFlag!='${@com.fgkj.mapper.ProcessServerDao@PROCESS_TEMP}'") |
| | | @Update("update web_site.tb_Process_survey set ServerFlag='${@com.fgkj.mapper.ProcessServerDao@PROCESS_OFF}' where ProcessName=#{processName} and ServerFlag!='${@com.fgkj.mapper.ProcessServerDao@PROCESS_TEMP}'") |
| | | public boolean update(Process_survey process); |
| | | |
| | | //界面修改进程名字和超时时间以及进程版本号 |
| | |
| | | public boolean updateAll(Process_survey obj); |
| | | |
| | | //界面修改进程同服务对应的标识位 |
| | | @Update(" update web_site.tb_Process_survey set ServerFlag=#{ServerFlag} where ServerName=#{ServerName} ") |
| | | @Update(" update web_site.tb_Process_survey set ServerFlag=#{serverFlag} where ServerName=#{serverName} ") |
| | | public int updateFlag(Process_survey process_survey); |
| | | |
| | | //查询所有进程的运行情况 |
| | |
| | | //4.10作业抽查管理(新建) |
| | | @Insert("insert into db_user.tb_user_battmaint_check(StationId,usr_id,master_id,appoint_uid,copy_uids,task_type_id,task_level," + |
| | | "task_caption,task_time_start,task_time_end,task_process,task_done,task_done_time,origin_usr_work_mark,task_done_confirm,master_audit,remark) " + |
| | | "values(#{StationId},#{usr_id},#{master_id},#{appoint_uid},#{copy_uids},#{task_type_id},#{task_level},#{task_caption},#{task_time_start},#{task_time_end},#{task_process},#{task_done},#{task_done_time},#{origin_usr_work_mark}," + |
| | | "values(#{stationId},#{usr_id},#{master_id},#{appoint_uid},#{copy_uids},#{task_type_id},#{task_level},#{task_caption},#{task_time_start},#{task_time_end},#{task_process},#{task_done},#{task_done_time},#{origin_usr_work_mark}," + |
| | | "#{task_done_confirm},#{master_audit},#{remark})") |
| | | public int add(User_battmaint_check obj) ; |
| | | //4.10作业抽查管理(编辑记录) |
| | |
| | | return model; |
| | | } |
| | | //4.10作业抽查管理(编辑记录)(user_battmaint_check表修改时User_battmaint_check_process表就新增一条记录) |
| | | public ServiceModel updatePro(User_battmaint_check obj1,List<User_battmaint_check_process> obj2) { |
| | | public ServiceModel updatePro(User_battmaint_check ucheck,List<User_battmaint_check_process> list) { |
| | | ServiceModel model = new ServiceModel(); |
| | | //TODO perry待查 |
| | | boolean bl = true; |
| | | TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
| | | User_battmaint_check ucheck = (User_battmaint_check) obj1; |
| | | List<User_battmaint_check_process> list = (List<User_battmaint_check_process>) obj2; |
| | | ArrayList<String> str_sql = new ArrayList<String>();//存放所有的sql语句 |
| | | // ArrayList<String> str_sql = new ArrayList<String>();//存放所有的sql语句 |
| | | //修改User_battmaint_check表 |
| | | if (!(mapper.updatePro(ucheck) > 0)) { |
| | | bl = false; |
| | |
| | | String[] copy_names; |
| | | System.out.println(" list.size = " + list.size()); |
| | | for(int i=0;i<list.size();i++){ |
| | | System.out.println("list.get("+i+") = " + list.get(i)); |
| | | BattInf binf=new BattInf(); |
| | | //电池组组数 |
| | | binf.setStationName(list.get(i).getMcheck().getRemark()); |
| | |
| | | //责任人/创建人/指派人/抄送人 |
| | | usr_id=list.get(i).getMcheck().getUsr_id(); |
| | | uinf.setuId(usr_id); |
| | | usr_name=((User_inf)userInfMapper.serchUname(uinf).get(0)).getuName(); |
| | | // System.out.println("usr_id = " + usr_id); |
| | | List<User_inf> listuser_inf = userInfMapper.serchUname(uinf); |
| | | if (listuser_inf.size() > 0) { |
| | | usr_name = listuser_inf.get(0).getuName(); |
| | | } |
| | | binf.setStationName6(usr_name); |
| | | |
| | | master_id=list.get(i).getMcheck().getMaster_id(); |
| | | uinf.setuId(master_id); |
| | | master_name=((User_inf)userInfMapper.serchUname(uinf).get(0)).getuName(); |
| | | List<User_inf> user_infs = userInfMapper.serchUname(uinf); |
| | | if (user_infs.size() > 0) { |
| | | master_name = user_infs.get(0).getuName(); |
| | | } |
| | | binf.setStationName7(master_name); |
| | | |
| | | appoint_uid=list.get(i).getMcheck().getAppoint_uid(); |
| | | uinf.setuId(appoint_uid); |
| | | appoint_name=((User_inf)userInfMapper.serchUname(uinf).get(0)).getuName(); |
| | | List<User_inf> user_infs1 = userInfMapper.serchUname(uinf); |
| | | if (user_infs1.size() > 0) { |
| | | appoint_name = user_infs1.get(0).getuName(); |
| | | } |
| | | binf.setStationName8(appoint_name); |
| | | //System.out.println(usr_name+" "+master_name+" "+appoint_name); |
| | | copy_ids=list.get(i).getMcheck().getCopy_uids(); |
| | | System.out.println("copy_ids = " + copy_ids); //1001,1002,1003,1004,1008 |
| | | copy_names=copy_ids.split(","); |
| | | for(int j=0;j<copy_names.length;j++){ |
| | | copy_id=Integer.parseInt(copy_names[j]); |
| | | uinf.setuId(copy_id); |
| | | copy_name+=","; |
| | | copy_name+=userInfMapper.serchUname(uinf).get(0).getuName(); |
| | | // List<User_inf> listu = userInfMapper.serchUname(uinf); |
| | | // System.out.println("listu = " + listu); |
| | | // User_inf user_inf = listu.get(0); |
| | | // copy_name+= user_inf.getuName(); |
| | | if (copy_names.length>0) { |
| | | System.out.println("copy_names = " + copy_names.toString()); |
| | | for (int j = 0; j < copy_names.length; j++) { |
| | | String copy_name1 = copy_names[j]; |
| | | if (copy_name1.length() > 0) { |
| | | copy_id = Integer.parseInt(copy_name1); |
| | | uinf.setuId(copy_id); |
| | | } |
| | | copy_name += ","; |
| | | List<User_inf> user_infs2 = userInfMapper.serchUname(uinf); |
| | | if (user_infs2.size() > 0) { |
| | | copy_name += user_infs2.get(0).getuName(); |
| | | } |
| | | } |
| | | } |
| | | binf.setStationName9(copy_name.substring(1, copy_name.length())); |
| | | //System.out.println(binf.getStationName9()); |
| | |
| | | <!-- <delete id="delPro"></delete>--> |
| | | <select id="searchAll" resultType="java.util.List"></select> |
| | | <select id="serchByCondition" resultMap="BaseResultMap"> |
| | | select distinct(tb_user_battmaint_check.StationId), tb_user_battmaint_check.num,usr_id,master_id,appoint_uid,copy_uids,task_type_id,task_level,task_caption, |
| | | select distinct(tb_user_battmaint_check.StationId), |
| | | tb_user_battmaint_check.num,usr_id,master_id,appoint_uid,copy_uids,task_type_id,task_level,task_caption, |
| | | task_time_start,task_time_end,task_process,task_done,task_done_time,origin_usr_work_mark,task_done_confirm,master_audit,remark, |
| | | StationName |
| | | from db_user.tb_user_battmaint_check,db_battinf.tb_battinf |
| | | <!-- where tb_user_battmaint_check.StationId=db_battinf.tb_battinf.StationId--> |
| | | <!-- and (task_time_start)>=(#{mcheck.task_time_start}) and (task_time_end)<![CDATA[<=]]>(#{mcheck.task_time_end})--> |
| | | <!-- and origin_usr_work_mark>=#{mcheck.origin_usr_work_mark} and origin_usr_work_mark<![CDATA[<=]]>#{mcheck.origin_usr_work_mark1}--> |
| | | <!-- <if test="binf.stationName1==''">--> |
| | | <!-- and db_battinf.tb_battinf.StationName1!=#{binf.stationName1}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="binf.stationName!=''">--> |
| | | <!-- and db_battinf.tb_battinf.StationName1=#{binf.stationName}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="binf.BattGroupId==''">--> |
| | | <!-- and db_battinf.tb_battinf.BattGroupId!=#{binf.battGroupId}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="binf.BattGroupId!=''">--> |
| | | <!-- and db_battinf.tb_battinf.BattGroupId=#{binf.battGroupId}--> |
| | | <!-- </if>--> |
| | | <!-- and copy_uids like '%${mcheck.copy_uids}%'--> |
| | | <!-- <if test="mcheck.task_done==100">--> |
| | | <!-- and task_done!=#{mcheck.task_done}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="mcheck.task_done!=100">--> |
| | | <!-- and task_done!=#{mcheck.task_done}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="mcheck.task_done_confirm==100">--> |
| | | <!-- and task_done_confirm!=#{mcheck.task_done_confirm}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="mcheck.task_done_confirm!=100">--> |
| | | <!-- and task_done_confirm!=#{mcheck.task_done_confirm}--> |
| | | <!-- </if>--> |
| | | where tb_user_battmaint_check.StationId=db_battinf.tb_battinf.StationId |
| | | and (task_time_start)>=(#{mcheck.task_time_start}) and (task_time_end)<![CDATA[<=]]>(#{mcheck.task_time_end}) |
| | | and origin_usr_work_mark>=#{mcheck.origin_usr_work_mark} and origin_usr_work_mark<![CDATA[<=]]> |
| | | #{mcheck.origin_usr_work_mark1} |
| | | <if test="binf.stationName1==''"> |
| | | and db_battinf.tb_battinf.StationName1!=#{binf.stationName1} |
| | | </if> |
| | | <if test="binf.stationName!=''"> |
| | | and db_battinf.tb_battinf.StationName1=#{binf.stationName} |
| | | </if> |
| | | <if test="binf.battGroupId==''"> |
| | | and db_battinf.tb_battinf.BattGroupId!=#{binf.battGroupId} |
| | | </if> |
| | | <if test="binf.battGroupId!=''"> |
| | | and db_battinf.tb_battinf.BattGroupId=#{binf.battGroupId} |
| | | </if> |
| | | and copy_uids like '%${mcheck.copy_uids}%' |
| | | <if test="mcheck.task_done==100"> |
| | | and task_done!=#{mcheck.task_done} |
| | | </if> |
| | | <if test="mcheck.task_done!=100"> |
| | | and task_done!=#{mcheck.task_done} |
| | | </if> |
| | | <if test="mcheck.task_done_confirm==100"> |
| | | and task_done_confirm!=#{mcheck.task_done_confirm} |
| | | </if> |
| | | <if test="mcheck.task_done_confirm!=100"> |
| | | and task_done_confirm!=#{mcheck.task_done_confirm} |
| | | </if> |
| | | order by tb_user_battmaint_check.num |
| | | |
| | | </select> |
| | |
| | | --> |
| | | |
| | | <update id="updateAll"> |
| | | update web_site.tb_Process_survey set note=#{note}, OutTime=#{OutTime} where num=#{num} |
| | | update web_site.tb_Process_survey set note=#{note}, OutTime=#{outTime} where num=#{num} |
| | | </update> |
| | | <!-- <update id="updateFlag"></update>--> |
| | | <!-- <select id="searchAll" resultType="java.util.List"></select>--> |