diff --git a/src/main/java/com/emr/controller/ArchiveOtherExtController.java b/src/main/java/com/emr/controller/ArchiveOtherExtController.java index 8dc4303..f0d0c0d 100644 --- a/src/main/java/com/emr/controller/ArchiveOtherExtController.java +++ b/src/main/java/com/emr/controller/ArchiveOtherExtController.java @@ -3,14 +3,18 @@ package com.emr.controller; import com.emr.entity.OffsetLimitPage; import com.emr.service.ipml.ArchiveOtherExtService; import com.emr.util.ExceptionPrintUtil; +import com.emr.util.Msg; import com.emr.vo.ArchiveFlowInfoVo; +import com.emr.vo.ArchiveOtherExtVo; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import javax.servlet.http.HttpServletRequest; import java.util.List; @Controller @@ -18,13 +22,21 @@ import java.util.List; public class ArchiveOtherExtController { @Autowired private ArchiveOtherExtService archiveOtherExtService; + + /** + * 任务详情列表 + * @param offset + * @param limit + * @param archiveOtherExtVo + * @param request + * @return + */ @RequestMapping("getArchiveExtInfo") @ResponseBody - public OffsetLimitPage getArchiveExtInfo(Integer offset, Integer limit){ + public OffsetLimitPage getArchiveExtInfo(Integer offset, Integer limit, ArchiveOtherExtVo archiveOtherExtVo, HttpServletRequest request){ PageHelper.offsetPage(offset,limit); try { - List list = null; - //List list = archiveOtherExtService.getArchiveExtInfo(archiveOtherExtVo); + List list = archiveOtherExtService.getArchiveExtInfo(request,archiveOtherExtVo); return new OffsetLimitPage((Page) list); } catch (Exception e) { ExceptionPrintUtil.printException(e); @@ -32,4 +44,28 @@ public class ArchiveOtherExtController { return null; } } + + /** + * 同步更新 + * @param ids + * @return + * @throws Exception + */ + @RequestMapping("submitUpdate") + @ResponseBody + public Msg submitUpdate(String ids,String notNursingIds,String jzh,String masterId,Integer sysFlag) throws Exception{ + if(StringUtils.isBlank(ids)){ + return Msg.fail("至少选中一个!"); + } + if(null != sysFlag && sysFlag == 1){ + if(StringUtils.isBlank(jzh)){ + return Msg.fail("记账号不能为空!"); + } + if(StringUtils.isBlank(masterId)){ + return Msg.fail("masterId不能为空!"); + } + } + archiveOtherExtService.updateSubmit(ids,notNursingIds,jzh,masterId,sysFlag); + return Msg.success(); + } } diff --git a/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java b/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java new file mode 100644 index 0000000..2b557ae --- /dev/null +++ b/src/main/java/com/emr/dao/ArchiveOtherExtMapper.java @@ -0,0 +1,25 @@ +package com.emr.dao; + +import com.emr.entity.ArchiveOtherExt; +import com.emr.vo.ArchiveOtherExtVo; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ArchiveOtherExtMapper { + int deleteByPrimaryKey(Long id); + + int insert(ArchiveOtherExt record); + + int insertSelective(ArchiveOtherExt record); + + ArchiveOtherExt selectByPrimaryKey(Long id); + + int updateByPrimaryKeySelective(ArchiveOtherExt record); + + int updateByPrimaryKey(ArchiveOtherExt record); + + List getArchiveExtInfo(ArchiveOtherExtVo record); + + int updateSubmit(@Param("ids")String ids); +} \ No newline at end of file diff --git a/src/main/java/com/emr/dao/ArchiveOtherExtSubmittimeMapper.java b/src/main/java/com/emr/dao/ArchiveOtherExtSubmittimeMapper.java new file mode 100644 index 0000000..1692bae --- /dev/null +++ b/src/main/java/com/emr/dao/ArchiveOtherExtSubmittimeMapper.java @@ -0,0 +1,26 @@ +package com.emr.dao; + +import com.emr.entity.ArchiveOtherExtSubmittime; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ArchiveOtherExtSubmittimeMapper { + int deleteByPrimaryKey(Integer id); + + int insert(ArchiveOtherExtSubmittime record); + + int insertSelective(ArchiveOtherExtSubmittime record); + + ArchiveOtherExtSubmittime selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(ArchiveOtherExtSubmittime record); + + int updateByPrimaryKey(ArchiveOtherExtSubmittime record); + + List selectAllByExtId(@Param("ids")String ids); + + int createInfo(@Param("ids") String ids); + + int updateInfo(@Param("ids") String ids); +} \ No newline at end of file diff --git a/src/main/java/com/emr/entity/ArchiveOtherExtSubmittime.java b/src/main/java/com/emr/entity/ArchiveOtherExtSubmittime.java new file mode 100644 index 0000000..b59441d --- /dev/null +++ b/src/main/java/com/emr/entity/ArchiveOtherExtSubmittime.java @@ -0,0 +1,116 @@ +package com.emr.entity; + +import java.io.Serializable; + +public class ArchiveOtherExtSubmittime implements Serializable { + private Integer id; + + private String otherExtId; + + private String createTime; + + private Integer int1; + + private Integer int2; + + private Integer int3; + + private String str1; + + private String str2; + + private String str3; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getOtherExtId() { + return otherExtId; + } + + public void setOtherExtId(String otherExtId) { + this.otherExtId = otherExtId == null ? null : otherExtId.trim(); + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime == null ? null : createTime.trim(); + } + + public Integer getInt1() { + return int1; + } + + public void setInt1(Integer int1) { + this.int1 = int1; + } + + public Integer getInt2() { + return int2; + } + + public void setInt2(Integer int2) { + this.int2 = int2; + } + + public Integer getInt3() { + return int3; + } + + public void setInt3(Integer int3) { + this.int3 = int3; + } + + public String getStr1() { + return str1; + } + + public void setStr1(String str1) { + this.str1 = str1 == null ? null : str1.trim(); + } + + public String getStr2() { + return str2; + } + + public void setStr2(String str2) { + this.str2 = str2 == null ? null : str2.trim(); + } + + public String getStr3() { + return str3; + } + + public void setStr3(String str3) { + this.str3 = str3 == null ? null : str3.trim(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", otherExtId=").append(otherExtId); + sb.append(", createTime=").append(createTime); + sb.append(", int1=").append(int1); + sb.append(", int2=").append(int2); + sb.append(", int3=").append(int3); + sb.append(", str1=").append(str1); + sb.append(", str2=").append(str2); + sb.append(", str3=").append(str3); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java b/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java index 7afcd73..2a752ee 100644 --- a/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java +++ b/src/main/java/com/emr/service/ipml/ArchiveOtherExtService.java @@ -1,16 +1,197 @@ package com.emr.service.ipml; -import com.emr.vo.ArchiveFlowInfoVo; +import com.emr.dao.ArchiveOtherExtMapper; +import com.emr.dao.ArchiveOtherExtSubmittimeMapper; +import com.emr.entity.ArchiveOtherExtSubmittime; +import com.emr.vo.ArchiveOtherExtVo; +import com.emr.vo.KeyValue; +import net.sf.json.JSONArray; +import org.apache.commons.lang3.StringUtils; +import org.apache.shiro.util.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; +import java.io.*; import java.util.List; @Service @Transactional public class ArchiveOtherExtService { - public List getArchiveExtInfo() { - //return archiveOtherExtMapper.getArchiveExtInfo(archiveOtherExtVo); - return null; + @Autowired + private ArchiveOtherExtMapper archiveOtherExtMapper; + @Autowired + private ArchiveOtherExtSubmittimeMapper archiveOtherExtSubmittimeMapper; + @Autowired + private ArchiveOtherService archiveOtherService; + /**查询任务详情列表 + * @param request + * @param archiveOtherExtVo + * @return + * @throws Exception + */ + public List getArchiveExtInfo(HttpServletRequest request,ArchiveOtherExtVo archiveOtherExtVo) throws Exception{ + List list = archiveOtherExtMapper.getArchiveExtInfo(archiveOtherExtVo); + if(!CollectionUtils.isEmpty(list)){ + //读取系统标识json文件 + String fileNamePath = "static/json/dictionary.json"; + List statusAndSysFlagValues = readJsonData(request, fileNamePath); + for(ArchiveOtherExtVo vo : list){ + //presulit为Done转换为完成 + String presult = vo.getPresult(); + if(StringUtils.isNoneBlank(presult) && "done".equalsIgnoreCase(presult)){ + vo.setPresult("完成"); + } + //转换采集状态 + if(!CollectionUtils.isEmpty(statusAndSysFlagValues)){ + Integer statusflag = vo.getStatusflag(); + if(null != statusflag){ + for(KeyValue keyValue : statusAndSysFlagValues){ + if("otherExtStatusFlag".equals(keyValue.getType())){ + if(keyValue.getCode().equals(statusflag.toString())) { + vo.setStatusFlagStr(keyValue.getName()); + break; + } + } + } + } + } + //转换系统标识 + if(!CollectionUtils.isEmpty(statusAndSysFlagValues)){ + Integer sysflag = vo.getSysflag(); + if(null != sysflag){ + for(KeyValue keyValue : statusAndSysFlagValues){ + if("otherExtSysFlag".equals(keyValue.getType())) { + if (keyValue.getCode().equals(sysflag.toString())) { + vo.setSysFlagStr(keyValue.getName()); + break; + } + } + } + } + } + } + } + return list; + } + + /** + * 读取json文件方法 + * @param request + * @param fileNamePath + * @return + * @throws IOException + */ + private List readJsonData(HttpServletRequest request, String fileNamePath) throws IOException { + String contextPath=request.getSession().getServletContext().getRealPath("/"); + String fileName = contextPath + fileNamePath; + File jsonFile = new File(fileName); + FileReader fileReader = new FileReader(jsonFile); + Reader reader = new InputStreamReader(new FileInputStream(jsonFile),"utf-8"); + int ch = 0; + StringBuffer sb = new StringBuffer(); + while ((ch = reader.read()) != -1) { + sb.append((char) ch); + } + fileReader.close(); + reader.close(); + String jsonStr = sb.toString(); + List list = (List) net.sf.json.JSONArray.toList(JSONArray.fromObject(jsonStr), KeyValue.class); + return list; + } + + /** + * 同步更新方法 + * @param ids + * @param notNursingIds + * @param jzh + * @param masterId + * @param sysFlag + */ + public void updateSubmit(String ids,String notNursingIds, String jzh, String masterId, Integer sysFlag) throws Exception{ + String idsStr = SplitString2String(ids); + //存在护理记录则调用护理按需采集功能 + if(null != sysFlag && sysFlag == 1) { + //调用护理按需采集功能 + archiveOtherService.updateArchiveOther(jzh, masterId); + //ext表更新非护理记录 + if(StringUtils.isNotBlank(notNursingIds)){ + String tempIds = SplitString2String(notNursingIds); + archiveOtherExtMapper.updateSubmit(tempIds); + } + }else{ + //全部更新ext表 + archiveOtherExtMapper.updateSubmit(idsStr); + } + //操作提交信息表 + OperOtherExtSubmitInfo(ids, idsStr); + } + + //带逗号的字符串加单引号 + private String SplitString2String(String notNursingIds) { + String[] notNursingIdsArr = notNursingIds.split(","); + //批量更新ext表的statusFlag字段值为0 + StringBuilder notNursingIdsBuilder = new StringBuilder(); + for(String id : notNursingIdsArr){ + if(StringUtils.isNotBlank(id)) { + if (StringUtils.isNotBlank(notNursingIdsBuilder)) { + notNursingIdsBuilder.append(","); + } + notNursingIdsBuilder.append("'").append(id).append("'"); + } + } + return notNursingIdsBuilder.toString(); + } + + /** + * 操作提交信息表 + * @param ids + * @param idsStr + */ + private void OperOtherExtSubmitInfo(String ids, String idsStr) { + //查询ext_id在ext_info表中是否存在 + List infoList = archiveOtherExtSubmittimeMapper.selectAllByExtId(idsStr); + //定义需要新增的id集合 + StringBuilder createStr = new StringBuilder(); + //定义需要更新的id集合 + StringBuilder updateStr = new StringBuilder(); + String[] idArr = ids.split(","); + for(String id : idArr){ + if(StringUtils.isNotBlank(id)) { + //定义是否存在 + boolean flag = false; + //判断存在 + if(!CollectionUtils.isEmpty(infoList)){ + for(ArchiveOtherExtSubmittime obj : infoList){ + String otherExtId = obj.getOtherExtId(); + if(id.equals(otherExtId)){ + flag = true; + break; + } + } + } + //存在添加进updateStr,不存在添加进createStr + if(flag){ + if (StringUtils.isNotBlank(updateStr)) { + updateStr.append(","); + } + updateStr.append("'").append(id).append("'"); + }else{ + if (StringUtils.isNotBlank(createStr)) { + createStr.append(","); + } + createStr.append(id); + } + } + } + //存在则批量更新 + if(StringUtils.isNotBlank(updateStr)){ + archiveOtherExtSubmittimeMapper.updateInfo(updateStr.toString()); + } + //不存在则批量新增 + if(StringUtils.isNotBlank(createStr)){ + archiveOtherExtSubmittimeMapper.createInfo(createStr.toString()); + } } } diff --git a/src/main/java/com/emr/vo/ArchiveOtherExtVo.java b/src/main/java/com/emr/vo/ArchiveOtherExtVo.java new file mode 100644 index 0000000..6c19aaa --- /dev/null +++ b/src/main/java/com/emr/vo/ArchiveOtherExtVo.java @@ -0,0 +1,33 @@ +package com.emr.vo; + +import com.emr.entity.ArchiveOtherExt; +import lombok.Data; + +/** + * @ProjectName: + * @Description: + * @Param 传输参数 + * @Return + * @Author: 曾文和 + * @CreateDate: 2020/10/9 10:25 + * @UpdateUser: 曾文和 + * @UpdateDate: 2020/10/9 10:25 + * @UpdateRemark: 更新说明 + * @Version: 1.0 + */ +@Data +public class ArchiveOtherExtVo extends ArchiveOtherExt { + private String idTemp; + + private String sysupdatetimeStr; + + private String stimeStr; + + private String etimeStr; + + private String sysFlagStr; + + private String statusFlagStr; + + private String createTime; +} diff --git a/src/main/java/com/emr/vo/KeyValue.java b/src/main/java/com/emr/vo/KeyValue.java new file mode 100644 index 0000000..f189181 --- /dev/null +++ b/src/main/java/com/emr/vo/KeyValue.java @@ -0,0 +1,24 @@ +package com.emr.vo; + +import lombok.Data; + +/** + * @ProjectName: + * @Description: + * @Param 传输参数 + * @Return + * @Author: 曾文和 + * @CreateDate: 2020/10/9 11:09 + * @UpdateUser: 曾文和 + * @UpdateDate: 2020/10/9 11:09 + * @UpdateRemark: 更新说明 + * @Version: 1.0 + */ +@Data +public class KeyValue { + private String code; + + private String name; + + private String type; +} diff --git a/src/main/resources/mapper/ArchiveOtherExtMapper.xml b/src/main/resources/mapper/ArchiveOtherExtMapper.xml new file mode 100644 index 0000000..0834fd0 --- /dev/null +++ b/src/main/resources/mapper/ArchiveOtherExtMapper.xml @@ -0,0 +1,510 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID, SycTime, SycObj, otherID, sysFlag, sysUpdateTime, jzh, zyh, stime, eTime, statusFlag, + pResult, MID, DID, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, N1, N2, N3, T1, T2, T3, + T4, T5, T6 + + + + delete from archive_other_ext + where ID = #{id,jdbcType=BIGINT} + + + insert into archive_other_ext (ID, SycTime, SycObj, + otherID, sysFlag, sysUpdateTime, + jzh, zyh, stime, + eTime, statusFlag, pResult, + MID, DID, C1, C2, + C3, C4, C5, C6, + C7, C8, C9, C10, + N1, N2, N3, T1, + T2, T3, T4, T5, + T6) + values (#{id,jdbcType=BIGINT}, #{syctime,jdbcType=TIMESTAMP}, #{sycobj,jdbcType=NVARCHAR}, + #{otherid,jdbcType=BIGINT}, #{sysflag,jdbcType=INTEGER}, #{sysupdatetime,jdbcType=TIMESTAMP}, + #{jzh,jdbcType=NVARCHAR}, #{zyh,jdbcType=NVARCHAR}, #{stime,jdbcType=TIMESTAMP}, + #{etime,jdbcType=TIMESTAMP}, #{statusflag,jdbcType=INTEGER}, #{presult,jdbcType=NVARCHAR}, + #{mid,jdbcType=NVARCHAR}, #{did,jdbcType=NVARCHAR}, #{c1,jdbcType=NVARCHAR}, #{c2,jdbcType=NVARCHAR}, + #{c3,jdbcType=NVARCHAR}, #{c4,jdbcType=NVARCHAR}, #{c5,jdbcType=NVARCHAR}, #{c6,jdbcType=NVARCHAR}, + #{c7,jdbcType=NVARCHAR}, #{c8,jdbcType=NVARCHAR}, #{c9,jdbcType=NVARCHAR}, #{c10,jdbcType=NVARCHAR}, + #{n1,jdbcType=DECIMAL}, #{n2,jdbcType=DECIMAL}, #{n3,jdbcType=DECIMAL}, #{t1,jdbcType=TIMESTAMP}, + #{t2,jdbcType=TIMESTAMP}, #{t3,jdbcType=TIMESTAMP}, #{t4,jdbcType=TIMESTAMP}, #{t5,jdbcType=TIMESTAMP}, + #{t6,jdbcType=TIMESTAMP}) + + + insert into archive_other_ext + + + ID, + + + SycTime, + + + SycObj, + + + otherID, + + + sysFlag, + + + sysUpdateTime, + + + jzh, + + + zyh, + + + stime, + + + eTime, + + + statusFlag, + + + pResult, + + + MID, + + + DID, + + + C1, + + + C2, + + + C3, + + + C4, + + + C5, + + + C6, + + + C7, + + + C8, + + + C9, + + + C10, + + + N1, + + + N2, + + + N3, + + + T1, + + + T2, + + + T3, + + + T4, + + + T5, + + + T6, + + + + + #{id,jdbcType=BIGINT}, + + + #{syctime,jdbcType=TIMESTAMP}, + + + #{sycobj,jdbcType=NVARCHAR}, + + + #{otherid,jdbcType=BIGINT}, + + + #{sysflag,jdbcType=INTEGER}, + + + #{sysupdatetime,jdbcType=TIMESTAMP}, + + + #{jzh,jdbcType=NVARCHAR}, + + + #{zyh,jdbcType=NVARCHAR}, + + + #{stime,jdbcType=TIMESTAMP}, + + + #{etime,jdbcType=TIMESTAMP}, + + + #{statusflag,jdbcType=INTEGER}, + + + #{presult,jdbcType=NVARCHAR}, + + + #{mid,jdbcType=NVARCHAR}, + + + #{did,jdbcType=NVARCHAR}, + + + #{c1,jdbcType=NVARCHAR}, + + + #{c2,jdbcType=NVARCHAR}, + + + #{c3,jdbcType=NVARCHAR}, + + + #{c4,jdbcType=NVARCHAR}, + + + #{c5,jdbcType=NVARCHAR}, + + + #{c6,jdbcType=NVARCHAR}, + + + #{c7,jdbcType=NVARCHAR}, + + + #{c8,jdbcType=NVARCHAR}, + + + #{c9,jdbcType=NVARCHAR}, + + + #{c10,jdbcType=NVARCHAR}, + + + #{n1,jdbcType=DECIMAL}, + + + #{n2,jdbcType=DECIMAL}, + + + #{n3,jdbcType=DECIMAL}, + + + #{t1,jdbcType=TIMESTAMP}, + + + #{t2,jdbcType=TIMESTAMP}, + + + #{t3,jdbcType=TIMESTAMP}, + + + #{t4,jdbcType=TIMESTAMP}, + + + #{t5,jdbcType=TIMESTAMP}, + + + #{t6,jdbcType=TIMESTAMP}, + + + + + update archive_other_ext + + + SycTime = #{syctime,jdbcType=TIMESTAMP}, + + + SycObj = #{sycobj,jdbcType=NVARCHAR}, + + + otherID = #{otherid,jdbcType=BIGINT}, + + + sysFlag = #{sysflag,jdbcType=INTEGER}, + + + sysUpdateTime = #{sysupdatetime,jdbcType=TIMESTAMP}, + + + jzh = #{jzh,jdbcType=NVARCHAR}, + + + zyh = #{zyh,jdbcType=NVARCHAR}, + + + stime = #{stime,jdbcType=TIMESTAMP}, + + + eTime = #{etime,jdbcType=TIMESTAMP}, + + + statusFlag = #{statusflag,jdbcType=INTEGER}, + + + pResult = #{presult,jdbcType=NVARCHAR}, + + + MID = #{mid,jdbcType=NVARCHAR}, + + + DID = #{did,jdbcType=NVARCHAR}, + + + C1 = #{c1,jdbcType=NVARCHAR}, + + + C2 = #{c2,jdbcType=NVARCHAR}, + + + C3 = #{c3,jdbcType=NVARCHAR}, + + + C4 = #{c4,jdbcType=NVARCHAR}, + + + C5 = #{c5,jdbcType=NVARCHAR}, + + + C6 = #{c6,jdbcType=NVARCHAR}, + + + C7 = #{c7,jdbcType=NVARCHAR}, + + + C8 = #{c8,jdbcType=NVARCHAR}, + + + C9 = #{c9,jdbcType=NVARCHAR}, + + + C10 = #{c10,jdbcType=NVARCHAR}, + + + N1 = #{n1,jdbcType=DECIMAL}, + + + N2 = #{n2,jdbcType=DECIMAL}, + + + N3 = #{n3,jdbcType=DECIMAL}, + + + T1 = #{t1,jdbcType=TIMESTAMP}, + + + T2 = #{t2,jdbcType=TIMESTAMP}, + + + T3 = #{t3,jdbcType=TIMESTAMP}, + + + T4 = #{t4,jdbcType=TIMESTAMP}, + + + T5 = #{t5,jdbcType=TIMESTAMP}, + + + T6 = #{t6,jdbcType=TIMESTAMP}, + + + where ID = #{id,jdbcType=BIGINT} + + + update archive_other_ext + set SycTime = #{syctime,jdbcType=TIMESTAMP}, + SycObj = #{sycobj,jdbcType=NVARCHAR}, + otherID = #{otherid,jdbcType=BIGINT}, + sysFlag = #{sysflag,jdbcType=INTEGER}, + sysUpdateTime = #{sysupdatetime,jdbcType=TIMESTAMP}, + jzh = #{jzh,jdbcType=NVARCHAR}, + zyh = #{zyh,jdbcType=NVARCHAR}, + stime = #{stime,jdbcType=TIMESTAMP}, + eTime = #{etime,jdbcType=TIMESTAMP}, + statusFlag = #{statusflag,jdbcType=INTEGER}, + pResult = #{presult,jdbcType=NVARCHAR}, + MID = #{mid,jdbcType=NVARCHAR}, + DID = #{did,jdbcType=NVARCHAR}, + C1 = #{c1,jdbcType=NVARCHAR}, + C2 = #{c2,jdbcType=NVARCHAR}, + C3 = #{c3,jdbcType=NVARCHAR}, + C4 = #{c4,jdbcType=NVARCHAR}, + C5 = #{c5,jdbcType=NVARCHAR}, + C6 = #{c6,jdbcType=NVARCHAR}, + C7 = #{c7,jdbcType=NVARCHAR}, + C8 = #{c8,jdbcType=NVARCHAR}, + C9 = #{c9,jdbcType=NVARCHAR}, + C10 = #{c10,jdbcType=NVARCHAR}, + N1 = #{n1,jdbcType=DECIMAL}, + N2 = #{n2,jdbcType=DECIMAL}, + N3 = #{n3,jdbcType=DECIMAL}, + T1 = #{t1,jdbcType=TIMESTAMP}, + T2 = #{t2,jdbcType=TIMESTAMP}, + T3 = #{t3,jdbcType=TIMESTAMP}, + T4 = #{t4,jdbcType=TIMESTAMP}, + T5 = #{t5,jdbcType=TIMESTAMP}, + T6 = #{t6,jdbcType=TIMESTAMP} + where ID = #{id,jdbcType=BIGINT} + + + + + and jzh = #{jzh,jdbcType=NVARCHAR} + + + and C1 like '%${c1}%' + + + and sysFlag = #{sysflag,jdbcType=INTEGER} + + + and statusFlag = #{statusflag,jdbcType=INTEGER} + + + + + + update archive_other_ext + set statusFlag = 0 + + + ID in (${ids}) + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ArchiveOtherExtSubmittimeMapper.xml b/src/main/resources/mapper/ArchiveOtherExtSubmittimeMapper.xml new file mode 100644 index 0000000..391ef94 --- /dev/null +++ b/src/main/resources/mapper/ArchiveOtherExtSubmittimeMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + id, other_ext_id, create_time, int1, int2, int3, str1, str2, str3 + + + + delete from archive_other_ext_submitTime + where id = #{id,jdbcType=INTEGER} + + + insert into archive_other_ext_submitTime (id, other_ext_id, create_time, + int1, int2, int3, str1, + str2, str3) + values (#{id,jdbcType=INTEGER}, #{otherExtId,jdbcType=VARCHAR}, #{createTime,jdbcType=VARCHAR}, + #{int1,jdbcType=INTEGER}, #{int2,jdbcType=INTEGER}, #{int3,jdbcType=INTEGER}, #{str1,jdbcType=NVARCHAR}, + #{str2,jdbcType=NVARCHAR}, #{str3,jdbcType=NVARCHAR}) + + + insert into archive_other_ext_submitTime + + + id, + + + other_ext_id, + + + create_time, + + + int1, + + + int2, + + + int3, + + + str1, + + + str2, + + + str3, + + + + + #{id,jdbcType=INTEGER}, + + + #{otherExtId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=VARCHAR}, + + + #{int1,jdbcType=INTEGER}, + + + #{int2,jdbcType=INTEGER}, + + + #{int3,jdbcType=INTEGER}, + + + #{str1,jdbcType=NVARCHAR}, + + + #{str2,jdbcType=NVARCHAR}, + + + #{str3,jdbcType=NVARCHAR}, + + + + + update archive_other_ext_submitTime + + + other_ext_id = #{otherExtId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=VARCHAR}, + + + int1 = #{int1,jdbcType=INTEGER}, + + + int2 = #{int2,jdbcType=INTEGER}, + + + int3 = #{int3,jdbcType=INTEGER}, + + + str1 = #{str1,jdbcType=NVARCHAR}, + + + str2 = #{str2,jdbcType=NVARCHAR}, + + + str3 = #{str3,jdbcType=NVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update archive_other_ext_submitTime + set other_ext_id = #{otherExtId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=VARCHAR}, + int1 = #{int1,jdbcType=INTEGER}, + int2 = #{int2,jdbcType=INTEGER}, + int3 = #{int3,jdbcType=INTEGER}, + str1 = #{str1,jdbcType=NVARCHAR}, + str2 = #{str2,jdbcType=NVARCHAR}, + str3 = #{str3,jdbcType=NVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + + + + insert into + archive_other_ext_submitTime(other_ext_id,create_time) + values + + ( + ${id}, CONVERT(varchar(19),GETDATE(),120) + ) + + + + + update archive_other_ext_submitTime set create_time = CONVERT(varchar(19),GETDATE(),120) + where other_ext_id in (${ids}) + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp b/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp index 0b60e8e..269d160 100644 --- a/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp +++ b/src/main/webapp/WEB-INF/views/beHospitaledDir/beHospList.jsp @@ -703,22 +703,19 @@ -
+
- +
-
+
- +
-
+ <%--
-
+
--%>
- + +
+
+ 同步更新提交后,最近提交时间为红色。同步采集完成后最近提交时间为绿色。 +
@@ -743,7 +744,7 @@
- - - + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index 9d29b5e..27fb9f9 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -354,7 +354,7 @@