From 971162978842f8cf87d34f99da8c529e2e945da8 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期二, 15 四月 2025 08:46:57 +0800 Subject: [PATCH] zjh20250415 --- ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiController.java | 2 ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcbgd.java | 1 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjXdPictureController.java | 3 ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java | 111 ++++++++++++++++++++---------------- ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcsqd.java | 1 ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java | 2 ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java | 5 + ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java | 13 +++- ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcbgdMapper.java | 2 9 files changed, 85 insertions(+), 55 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiController.java index 17235b1..122f41e 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiController.java @@ -304,7 +304,7 @@ ltkjExamJcbgd.setYxbx(ltkjExamJcsqd.getJgzt()); ltkjExamJcbgd.setYxzd(ltkjExamJcsqd.getJgzt()); ltkjExamJcsqd.setCreateTime(new Date()); - ltkjExamJcbgdService.deletedLtkjJcbgdByTjhandtmh(ltkjExamJcsqd.getTjh(),ltkjExamJcsqd.getTmh()); + ltkjExamJcbgdService.deletedLtkjJcbgdByTjhAndTmh(ltkjExamJcsqd.getTjh()); boolean save2 = ltkjExamJcbgdService.save(ltkjExamJcbgd); if (save1 && save2) { try { diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java index 05b88e3..82e0ab3 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java @@ -1619,12 +1619,17 @@ if (null != cusIds && !cusIds.isEmpty()) { ExecutorService threadPools = Executors.newFixedThreadPool(cusIds.size()); for (String cusId : cusIds) { - threadPools.execute(new Runnable() { - @Override - public void run() { - getAjaxResults(cusId); - } - }); + +// threadPools.execute(new Runnable() { +// @Override +// public void run() { + try { + getAjaxResults(cusId); + } catch (Exception e) { + + } +// } +// }); } LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>(); wq.in(TjCustomer::getCusIdcard, cusIds); @@ -1735,7 +1740,7 @@ map.put("errtjh",errTjh); return AjaxResult.success("浠ヤ笂浜哄憳绛惧埌澶辫触",map); } - return AjaxResult.success(); + return AjaxResult.error(); } // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return AjaxResult.error(); @@ -1814,51 +1819,59 @@ tjReservationService.updateById(tjReservation); // return AjaxResult.error("瀵逛笉璧锋偍鐨勯绾﹀凡瓒呮椂璇烽噸鏂伴绾�"); }*/ - LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); - qw.eq(TjCustomer::getCusIdcard, cusIdcard); - TjCustomer tjCustomer1 = tjCustomerService.getOne(qw); - if (tjCustomer1 != null) { - tjCustomer1.setTjType(tjReservation.getTjType()); - tjCustomer1.setCusName(tjReservation.getName()); - tjCustomer1.setCusSex(Long.valueOf(tjReservation.getSex())); - tjCustomer1.setCusBrithday(tjReservation.getBirthday()); - tjCustomer1.setCusPhone(tjReservation.getPhoe()); - tjCustomer1.setCusEmail(tjReservation.getEmail()); - tjCustomer1.setCusAddr(tjReservation.getAddress()); - tjCustomer1.setCusMarryStatus(String.valueOf(tjReservation.getMarriage())); - tjCustomer1.setCusNational(String.valueOf(tjReservation.getNation())); - tjCustomer1.setIdType(tjReservation.getIdType()); - tjCustomer1.setAge(tjReservation.getAge()); - tjCustomer1.setAgeUnit(tjReservation.getAgeUnit()); - tjCustomer1.setCareer(tjReservation.getCareer()); - tjCustomerService.updateById(tjCustomer1); - } else { - TjCustomer tjCustomer = new TjCustomer(); - tjCustomer.setCusIdcard(tjReservation.getIdCard()); - tjCustomer.setCusName(tjReservation.getName()); - tjCustomer.setCusSex(Long.valueOf(tjReservation.getSex())); - tjCustomer.setCusBrithday(tjReservation.getBirthday()); - tjCustomer.setCusPhone(tjReservation.getPhoe()); - tjCustomer.setCusEmail(tjReservation.getEmail()); - tjCustomer.setCusAddr(tjReservation.getAddress()); - tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage())); - tjCustomer.setCusNational(String.valueOf(tjReservation.getNation())); - tjCustomer.setIdType(tjReservation.getIdType()); - tjCustomer.setAge(tjReservation.getAge()); - tjCustomer.setAgeUnit(tjReservation.getAgeUnit()); - tjCustomer.setCareer(tjReservation.getCareer()); - tjCustomer.setDwPhone(tjReservation.getDwPhone()); - tjCustomer.setCardId(tjReservation.getCardId()); - tjCustomer.setIndexCard(tjReservation.getIndexCard()); - //鎴彇瀵嗙爜鑷姩鐢熸垚set杩涘幓 - String substring = cusIdcard.substring(cusIdcard.length() - 6); - substring = DigestUtils.md5DigestAsHex(substring.getBytes()); - tjCustomer.setCusPassword(substring); - tjCustomer.setTjType(tjReservation.getTjType()); - tjCustomerService.save(tjCustomer); + try { + LambdaQueryWrapper<TjCustomer> qw = new LambdaQueryWrapper<>(); + qw.eq(TjCustomer::getCusIdcard, cusIdcard); + TjCustomer tjCustomer1 = tjCustomerService.getOne(qw); + if (tjCustomer1 != null) { + tjCustomer1.setTjType(tjReservation.getTjType()); + tjCustomer1.setCusName(tjReservation.getName()); + tjCustomer1.setCusSex(Long.valueOf(tjReservation.getSex())); + tjCustomer1.setCusBrithday(tjReservation.getBirthday()); + tjCustomer1.setCusPhone(tjReservation.getPhoe()); + tjCustomer1.setCusEmail(tjReservation.getEmail()); + tjCustomer1.setCusAddr(tjReservation.getAddress()); + tjCustomer1.setCusMarryStatus(String.valueOf(tjReservation.getMarriage())); + tjCustomer1.setCusNational(String.valueOf(tjReservation.getNation())); + tjCustomer1.setIdType(tjReservation.getIdType()); + tjCustomer1.setAge(tjReservation.getAge()); + tjCustomer1.setAgeUnit(tjReservation.getAgeUnit()); + tjCustomer1.setCareer(tjReservation.getCareer()); + tjCustomerService.updateById(tjCustomer1); + } else { + TjCustomer tjCustomer = new TjCustomer(); + tjCustomer.setCusIdcard(tjReservation.getIdCard()); + tjCustomer.setCusName(tjReservation.getName()); + tjCustomer.setCusSex(Long.valueOf(tjReservation.getSex())); + tjCustomer.setCusBrithday(tjReservation.getBirthday()); + tjCustomer.setCusPhone(tjReservation.getPhoe()); + tjCustomer.setCusEmail(tjReservation.getEmail()); + tjCustomer.setCusAddr(tjReservation.getAddress()); + tjCustomer.setCusMarryStatus(String.valueOf(tjReservation.getMarriage())); + tjCustomer.setCusNational(String.valueOf(tjReservation.getNation())); + tjCustomer.setIdType(tjReservation.getIdType()); + tjCustomer.setAge(tjReservation.getAge()); + tjCustomer.setAgeUnit(tjReservation.getAgeUnit()); + tjCustomer.setCareer(tjReservation.getCareer()); + tjCustomer.setDwPhone(tjReservation.getDwPhone()); + tjCustomer.setCardId(tjReservation.getCardId()); + tjCustomer.setIndexCard(tjReservation.getIndexCard()); + //鎴彇瀵嗙爜鑷姩鐢熸垚set杩涘幓 + String substring = cusIdcard.substring(cusIdcard.length() - 6); + substring = DigestUtils.md5DigestAsHex(substring.getBytes()); + tjCustomer.setCusPassword(substring); + tjCustomer.setTjType(tjReservation.getTjType()); + tjCustomerService.save(tjCustomer); + } + } catch (Exception e) { + throw new RuntimeException(e); } + }else { + throw new RuntimeException(); } + }else { + throw new RuntimeException(); } } diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjXdPictureController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjXdPictureController.java index 4c8bb69..d45f941 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjXdPictureController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjXdPictureController.java @@ -394,9 +394,10 @@ jcbgd.setZdsj(DateUtil.format(date,"yyyy-MM-dd")); jcbgd.setJcbw(""); jcbgd.setSqsj(DateUtil.format(date,"yyyy-MM-dd")); + jcbgd.setLx("1"); jcbgd.setCreateTime(date); jcbgdService.save(jcbgd); - jcsqdService.saveLtkjExamJcsqd(xdtgmdjg.getCardId()); + jcsqdService.saveLtkjExamJcsqdxdt(xdtgmdjg.getCardId()); } catch (Exception e) { throw new RuntimeException(e); } diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcbgdMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcbgdMapper.java index b6c7fe4..85e3793 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcbgdMapper.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcbgdMapper.java @@ -21,7 +21,7 @@ @DataSource(value = DataSourceType.MASTER) public interface LtkjExamJcbgdMapper extends BaseMapper<LtkjExamJcbgd> { - @Delete ("DELETE FROM ltkj_exam_jcbgd WHERE tjh=#{tmh} ") + @Delete ("DELETE FROM ltkj_exam_jcbgd WHERE tjh=#{tmh} and lx=0 ") void deletedLtkjJcbgdByTjhAndTmh(String tmh); @Delete ("DELETE FROM ltkj_exam_jcbgd WHERE tjh=#{tjh} and tmh=#{tmh} ") diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java index 4ae5ff2..33b95d1 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java @@ -22,10 +22,10 @@ //@DataSource(value = DataSourceType.MASTER) public interface LtkjExamJcsqdMapper extends BaseMapper<LtkjExamJcsqd> { - @Select ("SELECT * FROM ltkj_exam_jcsqd a WHERE a.tjh=#{tjh} AND a.tmh=#{tmh} ") + @Select ("SELECT * FROM ltkj_exam_jcsqd a WHERE a.tjh=#{tjh} AND a.tmh=#{tmh} and a.lx=0 ") LtkjExamJcsqd getLtkjJcsqdByTjhAndTmh(@Param("tjh") String tjh,@Param("tmh") String tmh); - @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh}") + @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and lx=0 ") void deletedLtkjJcsqdByTjhAndTmh(@Param("tjh")String tjh); @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and tmh=#{tmh}") @@ -55,6 +55,13 @@ @Param("page")int page, @Param("status")String status); - @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and jcxmid = #{xmid}") + @Delete ("DELETE FROM ltkj_exam_jcsqd WHERE tjh=#{tjh} and jcxmid = #{xmid} and lx=0 ") void deletedLtkjJcsqdByTjhAndProId(@Param("tjh") String tjh,@Param("xmid") String xmid); + + + @Insert("INSERT INTO ltkj_exam_jcsqd \n" + + "SELECT a.tjh,a.tmh,NULL jclx,NULL jczlx,a.shysxm bgys,a.shysdm bgysid,a.sqsj,a.zdsj jgsj, a.xmmc jcxmmc,a.xmdm jcxmid,a.jcbw bw,\n" + + "a.yxzd jgzt,a.bg_nr jgbx,'1',sysdate()\n" + + "FROM ltkj_exam_jcbgd a WHERE a.tjh=#{tjh} GROUP BY a.xmmc") + void saveLtkjExamJcsqdxdt(String tjh); } diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java index 4b038d0..0336281 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java @@ -29,6 +29,8 @@ void saveLtkjExamJcsqd(String tjh); + void saveLtkjExamJcsqdxdt(String tjh); + AjaxResult getTjJcProByHisCall(String ksmc,String strIn,String brid,int pagecount,int page,String status); List<LtkjExamJcbgd> queryLtkjExamJcsqdByTjh(String tjh); diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java index 2ceb3ec..46d2cd2 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java @@ -77,6 +77,11 @@ } @Override + public void saveLtkjExamJcsqdxdt(String tjh) { + mapper.saveLtkjExamJcsqdxdt(tjh); + } + + @Override public AjaxResult getTjJcProByHisCall(String ksmc,String strIn,String brid,int pagecount,int page,String status) { List<Map<String, Object>> tjJcProByHisCall = mapper.getTjJcProByHisCall(ksmc,strIn,brid,pagecount,page,status); return AjaxResult.success().put("data",tjJcProByHisCall); diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcbgd.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcbgd.java index a317b4c..39691bd 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcbgd.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcbgd.java @@ -38,6 +38,7 @@ private String zdsj; private String sqsj; private String jcbw; + private String lx; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "鍒涘缓鏃堕棿") diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcsqd.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcsqd.java index bda5750..7435659 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcsqd.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/sqlDomain/LtkjExamJcsqd.java @@ -29,6 +29,7 @@ private String jgzt; private String jgbx; private String jgsj; + private String lx; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "鍒涘缓鏃堕棿") -- Gitblit v1.8.0