自助开单界面,初版
This commit is contained in:
parent
2e0a7064f6
commit
5505e1d0c2
@ -55,4 +55,5 @@ public class RegApply {
|
||||
* 状态 0.正常,1 作废
|
||||
*/
|
||||
private String Status;
|
||||
private String applyid;
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import java.util.Date;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RegApplyDetail {
|
||||
private Long uid;
|
||||
private String applyid;
|
||||
private BigDecimal OrderItemSerial;
|
||||
private String OrderItemCode;
|
||||
@ -24,4 +25,5 @@ public class RegApplyDetail {
|
||||
private String update_by;
|
||||
private Date update_time;
|
||||
private String DataSource;
|
||||
private BigDecimal amount;
|
||||
}
|
||||
|
||||
@ -36,4 +36,5 @@ public class RegHospital extends BaseEntity {
|
||||
*/
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
private String hospital_type;
|
||||
}
|
||||
|
||||
@ -47,4 +47,5 @@ public class RegItemclass extends BaseEntity {
|
||||
private Long itemclassPrintcnt;
|
||||
@Excel(name = "抗凝样本", readConverterExp = "0=否,1=是")
|
||||
private Long itemclassKn;
|
||||
private String classid;
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.transitPlatForm.common.core.domain.entity.reg;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RegSeq {
|
||||
private String seqid;
|
||||
private Long maxno;
|
||||
private String bz;
|
||||
}
|
||||
@ -56,7 +56,7 @@ public class RegTransitSample {
|
||||
/**
|
||||
* 出生日期 时间格式:yyyy-MM-dd
|
||||
*/
|
||||
private String PatBirthday;
|
||||
private Date PatBirthday;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ -130,7 +130,7 @@ public class RegTransitSample {
|
||||
*/
|
||||
private String Barcode;
|
||||
/**
|
||||
* 试管编码
|
||||
* 条码类别
|
||||
*/
|
||||
private String SrcHospBarcode;
|
||||
/**
|
||||
|
||||
@ -56,4 +56,8 @@ public class RegTransitSampleDetail {
|
||||
* 数据来源
|
||||
*/
|
||||
private String DataSource;
|
||||
private String applyid;
|
||||
private String applyDetailId;
|
||||
private String bz1;
|
||||
private String bz2;
|
||||
}
|
||||
|
||||
@ -3,9 +3,10 @@ package com.transitPlatForm.interfaceCommon.mapper;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface CommonMapper {
|
||||
Date getCurrentTime();
|
||||
//String getyhjs(@Param("yhdh")String yhdh);
|
||||
//String getUserPower(@Param("yq")String yq,@Param("yhdh")String yhdh);
|
||||
List<Map<String, Object>> getFeeClassList();
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package com.transitPlatForm.interfaceCommon.mapper;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RegApplyDetailMapper {
|
||||
void insert(RegApplyDetail regApplyDetail);
|
||||
List<RegApplyDetail> queryList(RegApplyDetail regApplyDetail);
|
||||
void update(RegApplyDetail regApplyDetail);
|
||||
void delete(String applyid);
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.transitPlatForm.interfaceCommon.mapper;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
|
||||
|
||||
public interface RegApplyMapper {
|
||||
void insert(RegApply regApply);
|
||||
RegApply queryOne(RegApply regApply);
|
||||
void update(RegApply regApply);
|
||||
void delete(String applyid);
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.transitPlatForm.interfaceCommon.mapper;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegSeq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RegSeqMapper {
|
||||
RegSeq getSeqOne(String seqid);
|
||||
void update(RegSeq regSeq);
|
||||
}
|
||||
@ -1,9 +1,12 @@
|
||||
package com.transitPlatForm.interfaceCommon.utils;
|
||||
|
||||
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.domain.entity.SysUser;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegSeq;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.ComLocalconfigMapper;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.CommonMapper;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.RegSeqMapper;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.SysUserCommMapper;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -23,6 +26,9 @@ public class CommonUtil {
|
||||
SysUserCommMapper sysUserCommMapper;
|
||||
@Autowired
|
||||
ComLocalconfigMapper comLocalconfigMapper;
|
||||
@Autowired
|
||||
RegSeqMapper regSeqMapper;
|
||||
|
||||
|
||||
|
||||
//服务器时间方法
|
||||
@ -58,5 +64,50 @@ public class CommonUtil {
|
||||
return comLocalconfigMapper.getLocalconfigByIP(ip);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取种子最大值
|
||||
* @return
|
||||
*/
|
||||
public synchronized String getMaxNo(String seqid) {
|
||||
RegSeq seqOne = regSeqMapper.getSeqOne(seqid);
|
||||
if (seqOne != null) return "";
|
||||
long maxno = seqOne.getMaxno() + 1;
|
||||
seqOne.setMaxno(maxno);
|
||||
regSeqMapper.update(seqOne);
|
||||
return LisUtil.isBank(maxno);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取固定位数的序列
|
||||
* @param seqName
|
||||
* @param position
|
||||
* @return
|
||||
*/
|
||||
public String getNextSeq_pro(String seqName,int position){
|
||||
String subMaxNo = "";
|
||||
String maxNo = getMaxNo(seqName);
|
||||
int length = maxNo.length();
|
||||
if(length > position){
|
||||
subMaxNo = maxNo.substring(length - position);
|
||||
}else{
|
||||
// int len = position - length ;
|
||||
subMaxNo = String.format("%0" + position + "d", Integer.valueOf(maxNo));
|
||||
}
|
||||
|
||||
return subMaxNo;
|
||||
}
|
||||
|
||||
public Map<String,Object> getFeeClass(List<Map<String, Object>> feeClassList,String itemcode){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
List<Map<String, Object>> collect = feeClassList.stream().filter(feeClass -> feeClass.get("itemcode").equals(itemcode)).collect(Collectors.toList());
|
||||
if(collect.size() > 0){
|
||||
map.put("itemclass",collect.get(0).get("itemclass"));
|
||||
map.put("itemclass_yblx",collect.get(0).get("itemclass_yblx"));
|
||||
map.put("itemclass_bkcolor",collect.get(0).get("itemclass_bkcolor"));
|
||||
return map;
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -6,7 +6,9 @@
|
||||
select getdate()
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getFeeClassList" resultType="map">
|
||||
<![CDATA[select * from reg_item a,reg_itemclass b where a.itemclass is not null and a.itemclass <> '' and a.itemclass = b.itemclass_code]]>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.transitPlatForm.interfaceCommon.mapper.RegApplyDetailMapper">
|
||||
<insert id="insert">
|
||||
insert into reg_apply_detail(applyid, OrderItemSerial, OrderItemCode, OrderItemName, SampleTypeCode,
|
||||
SampleTypeName, BodyCode, BodyName, create_by, create_time, update_by, update_time,
|
||||
DataSource, amount)
|
||||
values (#{applyid},
|
||||
#{OrderItemSerial},
|
||||
#{OrderItemCode},
|
||||
#{OrderItemName},
|
||||
#{SampleTypeCode},
|
||||
#{SampleTypeName},
|
||||
#{BodyCode},
|
||||
#{BodyName},
|
||||
#{create_by},
|
||||
#{create_time},
|
||||
#{update_by},
|
||||
#{update_time},
|
||||
#{DataSource},
|
||||
#{amount})
|
||||
</insert>
|
||||
|
||||
<select id="queryList" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail">
|
||||
select * from reg_apply_detail
|
||||
<where>
|
||||
<if test="applyid != null and applyid != ''">and applyid = #{applyid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="update">
|
||||
update reg_apply_detail
|
||||
<set>
|
||||
<if test="OrderItemSerial != null">OrderItemSerial = #{OrderItemSerial},</if>
|
||||
<if test="OrderItemCode != null and OrderItemCode != ''">OrderItemCode = #{OrderItemCode},</if>
|
||||
<if test="OrderItemName != null and OrderItemName != ''">OrderItemName = #{OrderItemName},</if>
|
||||
<if test="SampleTypeCode != null and SampleTypeCode != ''">SampleTypeCode = #{SampleTypeCode},</if>
|
||||
<if test="SampleTypeName != null and SampleTypeName != ''">SampleTypeName = #{SampleTypeName},</if>
|
||||
<if test="BodyCode != null and BodyCode != ''">BodyCode = #{BodyCode},</if>
|
||||
<if test="BodyName != null and BodyName != ''">BodyName = #{BodyName},</if>
|
||||
<if test="DataSource != null and DataSource != ''">DataSource = #{DataSource},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="applyDetailId != null and applyDetailId != ''">applyDetailId = #{applyDetailId},</if>
|
||||
<if test="bz1 != null and bz1 != ''">bz1 = #{bz1},</if>
|
||||
<if test="bz2 != null and bz2 != ''">bz2 = #{bz2},</if>
|
||||
<if test="update_by != null and update_by != ''">update_by = #{update_by},</if>
|
||||
<if test="update_time != null ">update_time = #{update_time},</if>
|
||||
applyid = #{applyid}
|
||||
</set>
|
||||
where applyid = #{applyid}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from reg_apply_detail where applyid = #{applyid}
|
||||
</delete>
|
||||
</mapper>
|
||||
113
pf_interfaceCommon/src/main/resources/mapper/RegApplyMapper.xml
Normal file
113
pf_interfaceCommon/src/main/resources/mapper/RegApplyMapper.xml
Normal file
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.transitPlatForm.interfaceCommon.mapper.RegApplyMapper">
|
||||
<insert id="insert">
|
||||
insert into reg_apply(PatId, PatCardType, PatCardNo, PatType, RegNo, PatName, PatSex, PatAge, AgeUnit,
|
||||
PatAgeShow, PatBirthday, PatIdentity, Phone, Address, PatFeeType, DepartCode,
|
||||
DepartName, AreaCode, AreaName, PatBed, DiagnosisCode, DiagnosisName, ReciNumber,
|
||||
DoctorCode, DoctorName, OrderTime, ExecDeptCode, ExecDeptName, SrcHospCode, SrcHospName,
|
||||
Amount, ChargeState, PatInvoiceNum, UserCode, UserName, DataSource, applyid, Status)
|
||||
values (#{PatId},
|
||||
#{PatCardType},
|
||||
#{PatCardNo},
|
||||
#{PatType},
|
||||
#{RegNo},
|
||||
#{PatName},
|
||||
#{PatSex},
|
||||
#{PatAge},
|
||||
#{AgeUnit},
|
||||
#{PatAgeShow},
|
||||
#{PatBirthday},
|
||||
#{PatIdentity},
|
||||
#{Phone},
|
||||
#{Address},
|
||||
#{PatFeeType},
|
||||
#{DepartCode},
|
||||
#{DepartName},
|
||||
#{AreaCode},
|
||||
#{AreaName},
|
||||
#{PatBed},
|
||||
#{DiagnosisCode},
|
||||
#{DiagnosisName},
|
||||
#{ReciNumber},
|
||||
#{DoctorCode},
|
||||
#{DoctorName},
|
||||
#{OrderTime},
|
||||
#{ExecDeptCode},
|
||||
#{ExecDeptName},
|
||||
#{SrcHospCode},
|
||||
#{SrcHospName},
|
||||
#{Amount},
|
||||
#{ChargeState},
|
||||
#{PatInvoiceNum},
|
||||
#{UserCode},
|
||||
#{UserName},
|
||||
#{DataSource},
|
||||
#{applyid},
|
||||
#{Status})
|
||||
</insert>
|
||||
|
||||
<select id="queryOne" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApply">
|
||||
select * from reg_apply
|
||||
<where>
|
||||
<if test="applyid != null and applyid != ''">and applyid = #{applyid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="update">
|
||||
update reg_apply
|
||||
<set>
|
||||
<if test="PatId != null and PatId != ''">PatId = #{PatId},</if>
|
||||
<if test="PatCardType != null and PatCardType != ''">PatCardType = #{PatCardType},</if>
|
||||
<if test="PatCardNo != null and PatCardNo != ''">PatCardNo = #{PatCardNo},</if>
|
||||
<if test="PatType != null and PatType != ''">PatType = #{PatType},</if>
|
||||
<if test="RegNo != null and RegNo != ''">RegNo = #{RegNo},</if>
|
||||
<if test="PatName != null and PatName != ''">PatName = #{PatName},</if>
|
||||
<if test="PatSex != null and PatSex != ''">PatSex = #{PatSex},</if>
|
||||
<if test="PatAge != null and PatAge != ''">PatAge = #{PatAge},</if>
|
||||
<if test="AgeUnit != null and AgeUnit != ''">AgeUnit = #{AgeUnit},</if>
|
||||
<if test="PatAgeShow != null and PatAgeShow != ''">PatAgeShow = #{PatAgeShow},</if>
|
||||
<if test="PatBirthday != null ">PatBirthday = #{PatBirthday},</if>
|
||||
<if test="PatIdentity != null and PatIdentity != ''">PatIdentity = #{PatIdentity},</if>
|
||||
<if test="Phone != null and Phone != ''">Phone = #{Phone},</if>
|
||||
<if test="Address != null and Address != ''">Address = #{Address},</if>
|
||||
<if test="PatFeeType != null and PatFeeType != ''">PatFeeType = #{PatFeeType},</if>
|
||||
<if test="DepartCode != null and DepartCode != ''">DepartCode = #{DepartCode},</if>
|
||||
<if test="DepartName != null and DepartName != ''">DepartName = #{DepartName},</if>
|
||||
<if test="AreaCode != null and AreaCode != ''">AreaCode = #{AreaCode},</if>
|
||||
<if test="AreaName != null and AreaName != ''">AreaName = #{AreaName},</if>
|
||||
<if test="PatBed != null and PatBed != ''">PatBed = #{PatBed},</if>
|
||||
<if test="DiagnosisCode != null and DiagnosisCode != ''">DiagnosisCode = #{DiagnosisCode},</if>
|
||||
<if test="DiagnosisName != null and DiagnosisName != ''">DiagnosisName = #{DiagnosisName},</if>
|
||||
<if test="ReciNumber != null and ReciNumber != ''">ReciNumber = #{ReciNumber},</if>
|
||||
<if test="DoctorCode != null and DoctorCode != ''">DoctorCode = #{DoctorCode},</if>
|
||||
<if test="DoctorName != null and DoctorName != ''">DoctorName = #{DoctorName},</if>
|
||||
<if test="OrderTime != null">OrderTime = #{OrderTime},</if>
|
||||
<if test="ExecDeptCode != null and ExecDeptCode != ''">ExecDeptCode = #{ExecDeptCode},</if>
|
||||
<if test="ExecDeptName != null and ExecDeptName != ''">ExecDeptName = #{ExecDeptName},</if>
|
||||
<if test="SrcHospCode != null and SrcHospCode != ''">SrcHospCode = #{SrcHospCode},</if>
|
||||
<if test="SrcHospName != null and SrcHospName != ''">SrcHospName = #{SrcHospName},</if>
|
||||
<if test="SrcHospName != null and SrcHospName != ''">SrcHospName = #{SrcHospName},</if>
|
||||
<if test="Amount != null">Amount = #{Amount},</if>
|
||||
<if test="ChargeState != null and ChargeState != ''">ChargeState = #{ChargeState},</if>
|
||||
<if test="PatInvoiceNum != null and PatInvoiceNum != ''">PatInvoiceNum = #{PatInvoiceNum},</if>
|
||||
<if test="UserCode != null and UserCode != ''">UserCode = #{UserCode},</if>
|
||||
<if test="UserName != null and UserName != ''">UserName = #{UserName},</if>
|
||||
<if test="DataSource != null and DataSource != ''">DataSource = #{DataSource},</if>
|
||||
<if test="create_by != null and create_by != ''">create_by = #{create_by},</if>
|
||||
<if test="create_time != null">create_time = #{create_time},</if>
|
||||
<if test="update_by != null and update_by != ''">update_by = #{update_by},</if>
|
||||
<if test="update_time != null">update_time = #{update_time},</if>
|
||||
<if test="applyid != null and applyid != ''">applyid = #{applyid},</if>
|
||||
<if test="Status != null and Status != ''">Status = #{Status},</if>
|
||||
applyid = #{applyid}
|
||||
</set>
|
||||
where applyid = #{applyid}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from reg_apply where applyid = #{applyid}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.transitPlatForm.interfaceCommon.mapper.RegSeqMapper">
|
||||
<select id="getSeqOne" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegSeq">
|
||||
select * from reg_seq where seqid = #{seqid}
|
||||
</select>
|
||||
|
||||
<insert id="update">
|
||||
update reg_seq set maxno = #{maxno} where seqid = #{seqid}
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -115,7 +115,7 @@ public class SwaggerConfig {
|
||||
// 用ApiInfoBuilder进行定制
|
||||
return new ApiInfoBuilder()
|
||||
// 设置标题
|
||||
.title("标题:检验lis8.0系统_接口文档")
|
||||
.title("标题:区域流转平台_接口文档")
|
||||
// 描述
|
||||
.description("描述:用于测试和管理后台接口")
|
||||
// 作者信息
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
package com.transitPlatForm;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
|
||||
import com.transitPlatForm.system.TransitPlatFormApplication;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@SpringBootTest(classes = TransitPlatFormApplication.class)
|
||||
public class SpringbootTest {
|
||||
|
||||
@Resource
|
||||
CommonUtil commonUtil;
|
||||
|
||||
@Test
|
||||
public void test01(){
|
||||
String dateStr = DateUtil.format(commonUtil.getCurrentTime(), "yyyyMMdd");
|
||||
System.out.println(dateStr);
|
||||
}
|
||||
}
|
||||
@ -3,14 +3,13 @@ package com.transitPlatForm.transitPF.controller;
|
||||
import com.transitPlatForm.common.core.controller.BaseController;
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
||||
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 自助开单界面
|
||||
@ -44,4 +43,11 @@ public class RegRequestInfoController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("保存申请单信息")
|
||||
@PostMapping("/saveReqInfo")
|
||||
public Result saveReqInfo(@RequestBody ReqApplyInfoDTO reqApplyInfoDTO){
|
||||
return regRequestInfoService.saveReqInfo(reqApplyInfoDTO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.transitPlatForm.transitPF.controller.dict;
|
||||
import com.transitPlatForm.common.annotation.Log;
|
||||
import com.transitPlatForm.common.core.controller.BaseController;
|
||||
import com.transitPlatForm.common.core.domain.AjaxResult;
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.page.TableDataInfo;
|
||||
import com.transitPlatForm.common.enums.BusinessType;
|
||||
import com.transitPlatForm.common.utils.poi.ExcelUtil;
|
||||
@ -53,6 +54,12 @@ public class RegDictController extends BaseController {
|
||||
return success(regDictService.selectDictById(dictId));
|
||||
}
|
||||
|
||||
@ApiOperation("获取字典信息")
|
||||
@GetMapping("/getInfoOne")
|
||||
public Result getInfoOne(String dict_type){
|
||||
return regDictService.getInfoOne(dict_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典
|
||||
*/
|
||||
|
||||
@ -78,4 +78,6 @@ public interface RegDictMapper {
|
||||
* @return 结果
|
||||
*/
|
||||
RegDict checkDictCodeUnique(@Param("dictCode") String DictCode,@Param("dictType") String dictType);
|
||||
|
||||
List<RegDict> getInfoOne(String dict_type);
|
||||
}
|
||||
|
||||
@ -6,11 +6,12 @@ import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface RegRequestInfoMapper {
|
||||
List<RegApply> queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO);
|
||||
|
||||
List<RegApplyDetail> queryReqDetail(String applyId);
|
||||
|
||||
List<RegItem> getItemInfo();
|
||||
List<Map<String,Object>> getItemInfo();
|
||||
}
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package com.transitPlatForm.transitPF.pojo.DTO;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ReqApplyInfoDTO {
|
||||
private RegApply regApply;
|
||||
private List<RegApplyDetail> regApplyDetailList;
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
package com.transitPlatForm.transitPF.service;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
||||
|
||||
import java.util.List;
|
||||
@ -84,4 +85,6 @@ public interface RegDictService {
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDict(RegDict Dict);
|
||||
|
||||
Result getInfoOne(String dictType);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.transitPlatForm.transitPF.service;
|
||||
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
||||
|
||||
public interface RegRequestInfoService {
|
||||
Result queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO);
|
||||
@ -9,4 +10,6 @@ public interface RegRequestInfoService {
|
||||
Result queryReqDetail(String applyId);
|
||||
|
||||
Result getItemInfo();
|
||||
|
||||
Result saveReqInfo(ReqApplyInfoDTO reqApplyInfoDTO);
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.transitPlatForm.transitPF.service.impl;
|
||||
|
||||
import com.transitPlatForm.common.constant.UserConstants;
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.exception.ServiceException;
|
||||
import com.transitPlatForm.common.utils.StringUtils;
|
||||
import com.transitPlatForm.transitPF.mapper.RegDictMapper;
|
||||
@ -143,4 +144,10 @@ public class RegDictServiceImpl implements RegDictService {
|
||||
public int updateDict(RegDict Dict) {
|
||||
return dictMapper.updateDict(Dict);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getInfoOne(String dictType) {
|
||||
List<RegDict> regDictList = dictMapper.getInfoOne(dictType);
|
||||
return new Result("0","获取数据成功!",regDictList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,30 @@
|
||||
package com.transitPlatForm.transitPF.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.CommonMapper;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.RegApplyDetailMapper;
|
||||
import com.transitPlatForm.interfaceCommon.mapper.RegApplyMapper;
|
||||
import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
|
||||
import com.transitPlatForm.interfaceCommon.utils.LisUtil;
|
||||
import com.transitPlatForm.transitPF.mapper.RegRequestInfoMapper;
|
||||
import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
||||
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@ -19,6 +32,19 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
||||
|
||||
@Autowired
|
||||
RegRequestInfoMapper regRequestInfoMapper;
|
||||
@Autowired
|
||||
private CommonUtil commonUtil;
|
||||
@Autowired
|
||||
private CommonMapper commonMapper;
|
||||
@Autowired
|
||||
private RegApplyMapper regApplyMapper;
|
||||
@Autowired
|
||||
private RegApplyDetailMapper regApplyDetailMapper;
|
||||
@Resource
|
||||
private ApplicationContext applicationContext;
|
||||
@Resource
|
||||
private RegTransitSampleMapper regTransitSampleMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 获取申请单列表
|
||||
@ -44,7 +70,267 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
||||
|
||||
@Override
|
||||
public Result getItemInfo() {
|
||||
List<RegItem> regItemList = regRequestInfoMapper.getItemInfo();
|
||||
List<Map<String, Object>> regItemList = regRequestInfoMapper.getItemInfo();
|
||||
return new Result("0","查询成功!",regItemList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存申请单信息和条码信息
|
||||
* @param reqApplyInfoDTO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result saveReqInfo(ReqApplyInfoDTO reqApplyInfoDTO) {
|
||||
RegApply regApply = reqApplyInfoDTO.getRegApply();
|
||||
List<RegApplyDetail> regApplyDetailList = reqApplyInfoDTO.getRegApplyDetailList();
|
||||
String status = regApply.getStatus();
|
||||
if(status == null) status = "";
|
||||
//修改数据
|
||||
if(status.equals("")){
|
||||
applicationContext.getBean(RegRequestInfoServiceImpl.class).updateApply(regApply,regApplyDetailList);
|
||||
}
|
||||
|
||||
//申请单号
|
||||
String applyId = "PT"+regApply.getSrcHospCode()+DateUtil.format(commonUtil.getCurrentTime(),"yyyyMMdd")+commonUtil.getNextSeq_pro("applyno",4);
|
||||
regApply.setApplyid(applyId);
|
||||
regApply.setStatus("1");
|
||||
regApply.setCreate_by(regApply.getUserCode());
|
||||
regApply.setCreate_time(commonUtil.getCurrentTime());
|
||||
|
||||
|
||||
for (RegApplyDetail regApplyDetail : regApplyDetailList) {
|
||||
regApplyDetail.setApplyid(applyId);
|
||||
}
|
||||
|
||||
//保存申请单信息
|
||||
applicationContext.getBean(RegRequestInfoServiceImpl.class).saveReqInfo(regApply,regApplyDetailList);
|
||||
|
||||
//生成条码信息
|
||||
regApply = regApplyMapper.queryOne(regApply);
|
||||
RegApplyDetail regApplyDetail = new RegApplyDetail();
|
||||
regApplyDetail.setApplyid(regApply.getApplyid());
|
||||
regApplyDetailList = regApplyDetailMapper.queryList(regApplyDetail);
|
||||
Result result = createBarcode(regApply, regApplyDetailList);
|
||||
if(!result.getCode().equals("0")) return result;
|
||||
|
||||
return new Result("0","保存成功!");
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveReqInfo(RegApply regApply,List<RegApplyDetail> regApplyDetailList){
|
||||
regApplyMapper.insert(regApply);
|
||||
for (RegApplyDetail regApplyDetail : regApplyDetailList) {
|
||||
regApplyDetailMapper.insert(regApplyDetail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Result createBarcode(RegApply regApply,List<RegApplyDetail> regApplyDetailList){
|
||||
String ls_nopriceitems = "";
|
||||
|
||||
List<RegTransitSample> regTransitSampleList = new ArrayList<>();
|
||||
List<RegTransitSampleDetail> regTransitSampleDetailList = new ArrayList<>();
|
||||
List<Map<String,Object>> reqSqdInfoList = new ArrayList<>();
|
||||
|
||||
|
||||
|
||||
//获取项目的对照信息列表
|
||||
List<Map<String, Object>> feeClassList = commonMapper.getFeeClassList();
|
||||
for (RegApplyDetail regApplyDetail : regApplyDetailList) {
|
||||
|
||||
String orderItemCode = regApplyDetail.getOrderItemCode();
|
||||
String orderItemName = regApplyDetail.getOrderItemName();
|
||||
//判断是否对照
|
||||
Map<String, Object> feeClass = commonUtil.getFeeClass(feeClassList,orderItemCode);
|
||||
if(feeClass.size() <= 0) {
|
||||
ls_nopriceitems += "~r~n"+orderItemCode + "|" + orderItemName;
|
||||
continue;
|
||||
}
|
||||
|
||||
String itemClass = LisUtil.isBank(feeClass.get("itemclass"));
|
||||
|
||||
|
||||
Map<String,Object> reqSqdInfo = new HashMap<>();
|
||||
reqSqdInfo.put("sample_PatId",regApply.getPatId());
|
||||
reqSqdInfo.put("sample_PatCardType",regApply.getPatCardType());
|
||||
reqSqdInfo.put("sample_PatCardNo",regApply.getPatCardNo());
|
||||
reqSqdInfo.put("sample_PatType",regApply.getPatType());
|
||||
reqSqdInfo.put("sample_RegNo",regApply.getRegNo());
|
||||
reqSqdInfo.put("sample_PatName",regApply.getPatName());
|
||||
reqSqdInfo.put("sample_PatSex",regApply.getPatSex());
|
||||
reqSqdInfo.put("sample_PatAge",regApply.getPatAge());
|
||||
reqSqdInfo.put("sample_AgeUnit",regApply.getAgeUnit());
|
||||
reqSqdInfo.put("sample_PatAgeShow",regApply.getPatAgeShow());
|
||||
reqSqdInfo.put("sample_PatBirthday",DateUtil.format(regApply.getPatBirthday(),"yyyy-MM-dd"));
|
||||
reqSqdInfo.put("sample_PatIdentity",regApply.getPatIdentity());
|
||||
reqSqdInfo.put("sample_Phone",regApply.getPhone());
|
||||
reqSqdInfo.put("sample_Address",regApply.getAddress());
|
||||
reqSqdInfo.put("sample_PatFeeType",regApply.getPatFeeType());
|
||||
reqSqdInfo.put("sample_DepartCode",regApply.getDepartCode());
|
||||
reqSqdInfo.put("sample_DepartName",regApply.getDepartName());
|
||||
reqSqdInfo.put("sample_AreaCode",regApply.getAreaCode());
|
||||
reqSqdInfo.put("sample_AreaName",regApply.getAreaName());
|
||||
reqSqdInfo.put("sample_PatBed",regApply.getPatBed());
|
||||
reqSqdInfo.put("sample_DiagnosisCode",regApply.getDiagnosisCode());
|
||||
reqSqdInfo.put("sample_DiagnosisName",regApply.getDiagnosisName());
|
||||
reqSqdInfo.put("sample_OrderUserCode",regApply.getDoctorCode());
|
||||
reqSqdInfo.put("sample_OrderUserName",regApply.getDoctorName());
|
||||
reqSqdInfo.put("sample_OrderTime",regApply.getOrderTime());
|
||||
reqSqdInfo.put("sample_SrcHospCode",regApply.getSrcHospCode());
|
||||
reqSqdInfo.put("sample_SrcHospName",regApply.getSrcHospName());
|
||||
reqSqdInfo.put("sample_SampleTypeCode",regApplyDetail.getSampleTypeCode());
|
||||
reqSqdInfo.put("sample_SampleTypeName",regApplyDetail.getSampleTypeName());
|
||||
reqSqdInfo.put("sample_IsER","0"); //是否急查
|
||||
reqSqdInfo.put("sample_Status","10"); //开单状态
|
||||
reqSqdInfo.put("sample_SrcHospBarcode",itemClass); //条码类别
|
||||
reqSqdInfo.put("sample_UserCode",regApply.getUserCode());
|
||||
reqSqdInfo.put("sample_UserName",regApply.getUserName());
|
||||
|
||||
reqSqdInfo.put("detail_OrderItemCode",regApplyDetail.getOrderItemCode());
|
||||
reqSqdInfo.put("detail_OrderItemName",regApplyDetail.getOrderItemName());
|
||||
reqSqdInfo.put("detail_SrcOrderItemCode",regApplyDetail.getOrderItemCode());
|
||||
reqSqdInfo.put("detail_SrcOrderItemName",regApplyDetail.getOrderItemName());
|
||||
reqSqdInfo.put("detail_cost",regApplyDetail.getAmount());
|
||||
reqSqdInfo.put("detail_DataSource","1");
|
||||
reqSqdInfo.put("detail_applyid",regApply.getApplyid());
|
||||
reqSqdInfo.put("detail_applyDetailId",regApplyDetail.getUid());
|
||||
reqSqdInfoList.add(reqSqdInfo);
|
||||
|
||||
}
|
||||
|
||||
//排序
|
||||
reqSqdInfoList.sort(new Comparator<Map<String, Object>>() {
|
||||
@Override
|
||||
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
||||
String itemClass1 = LisUtil.isBank(o1.get("sample_SrcHospBarcode").toString().trim());
|
||||
String itemClass2 = LisUtil.isBank(o2.get("sample_SrcHospBarcode").toString().trim());
|
||||
return itemClass1.compareTo(itemClass2);
|
||||
}
|
||||
});
|
||||
|
||||
String itemClassOne = "" ;
|
||||
int xh = 0,k = -1;
|
||||
String barcode = "";
|
||||
String jymd = "";
|
||||
RegTransitSample regTransitSample = null;
|
||||
|
||||
for (Map<String, Object> stringObjectMap : reqSqdInfoList) {
|
||||
String itemClass = LisUtil.isBank(stringObjectMap.get("sample_SrcHospBarcode"));
|
||||
RegTransitSampleDetail regTransitSampleDetail = new RegTransitSampleDetail();
|
||||
if (itemClassOne.equals(itemClass)) {
|
||||
xh++;
|
||||
stringObjectMap.put("sample_Barcode", barcode);
|
||||
stringObjectMap.put("detail_OrderItemSerial", xh);
|
||||
jymd = LisUtil.isBank(stringObjectMap.get("detail_OrderItemName"));
|
||||
regTransitSample.setCheckPUR(jymd);
|
||||
regTransitSampleList.add(k, regTransitSample);
|
||||
|
||||
//写条码明细表
|
||||
regTransitSampleDetail.setBarcode(barcode);
|
||||
regTransitSampleDetail.setOrderItemSerial(new BigDecimal(xh));
|
||||
regTransitSampleDetail.setOrderItemCode(LisUtil.isBank(stringObjectMap.get("detail_OrderItemCode")));
|
||||
regTransitSampleDetail.setOrderItemName(LisUtil.isBank(stringObjectMap.get("detail_OrderItemName")));
|
||||
regTransitSampleDetail.setCost(new BigDecimal(stringObjectMap.get("detail_cost").toString()));
|
||||
regTransitSampleDetail.setApplyid(LisUtil.isBank(stringObjectMap.get("detail_applyid")));
|
||||
regTransitSampleDetail.setApplyDetailId(String.valueOf(xh));
|
||||
regTransitSampleDetailList.add(regTransitSampleDetail);
|
||||
continue;
|
||||
} else {
|
||||
xh = 1;
|
||||
//条码号
|
||||
barcode = regApply.getSrcHospCode() + DateUtil.format(commonUtil.getCurrentTime(), "yyyyMMdd") + commonUtil.getNextSeq_pro("barcode", 4);
|
||||
itemClassOne = itemClass;
|
||||
}
|
||||
|
||||
stringObjectMap.put("sample_Barcode", barcode);
|
||||
stringObjectMap.put("detail_OrderItemSerial", xh);
|
||||
|
||||
//写条码明细表
|
||||
regTransitSampleDetail.setBarcode(barcode);
|
||||
regTransitSampleDetail.setOrderItemSerial(new BigDecimal(xh));
|
||||
regTransitSampleDetail.setOrderItemCode(LisUtil.isBank(stringObjectMap.get("detail_OrderItemCode")));
|
||||
regTransitSampleDetail.setOrderItemName(LisUtil.isBank(stringObjectMap.get("detail_OrderItemName")));
|
||||
regTransitSampleDetail.setCost(new BigDecimal(stringObjectMap.get("detail_cost").toString()));
|
||||
regTransitSampleDetail.setApplyid(LisUtil.isBank(stringObjectMap.get("detail_applyid")));
|
||||
regTransitSampleDetail.setApplyDetailId(String.valueOf(xh));
|
||||
regTransitSampleDetailList.add(regTransitSampleDetail);
|
||||
|
||||
jymd = stringObjectMap.get("detail_OrderItemName").toString();
|
||||
|
||||
//写条码主表
|
||||
regTransitSample = new RegTransitSample();
|
||||
k++;
|
||||
regTransitSample.setPatId(LisUtil.isBank(stringObjectMap.get("sample_PatId")));
|
||||
regTransitSample.setPatCardType(LisUtil.isBank(stringObjectMap.get("sample_PatCardType")));
|
||||
regTransitSample.setPatCardNo(LisUtil.isBank(stringObjectMap.get("sample_PatCardNo")));
|
||||
regTransitSample.setPatType(LisUtil.isBank(stringObjectMap.get("sample_PatType")));
|
||||
regTransitSample.setRegNo(LisUtil.isBank(stringObjectMap.get("sample_RegNo")));
|
||||
regTransitSample.setPatName(LisUtil.isBank(stringObjectMap.get("sample_PatName")));
|
||||
regTransitSample.setPatSex(LisUtil.isBank(stringObjectMap.get("sample_PatSex")));
|
||||
regTransitSample.setPatAge(LisUtil.isBank(stringObjectMap.get("sample_PatAge")));
|
||||
regTransitSample.setAgeUnit(LisUtil.isBank(stringObjectMap.get("sample_AgeUnit")));
|
||||
regTransitSample.setPatAgeShow(LisUtil.isBank(stringObjectMap.get("sample_PatAgeShow")));
|
||||
regTransitSample.setPatBirthday(DateUtil.parse(LisUtil.isBank(stringObjectMap.get("sample_PatBirthday")), "yyyy-MM-dd HH:mm:ss"));
|
||||
regTransitSample.setPatIdentity(LisUtil.isBank(stringObjectMap.get("sample_PatIdentity")));
|
||||
regTransitSample.setPhone(LisUtil.isBank(stringObjectMap.get("sample_Phone")));
|
||||
regTransitSample.setAddress(LisUtil.isBank(stringObjectMap.get("sample_Address")));
|
||||
regTransitSample.setPatFeeType(LisUtil.isBank(stringObjectMap.get("sample_PatFeeType")));
|
||||
regTransitSample.setDepartCode(LisUtil.isBank(stringObjectMap.get("sample_DepartCode")));
|
||||
regTransitSample.setDepartName(LisUtil.isBank(stringObjectMap.get("sample_DepartName")));
|
||||
regTransitSample.setAreaCode(LisUtil.isBank(stringObjectMap.get("sample_AreaCode")));
|
||||
regTransitSample.setAreaName(LisUtil.isBank(stringObjectMap.get("sample_AreaName")));
|
||||
regTransitSample.setPatBed(LisUtil.isBank(stringObjectMap.get("sample_PatBed")));
|
||||
regTransitSample.setDiagnosisCode(LisUtil.isBank(stringObjectMap.get("sample_DiagnosisCode")));
|
||||
regTransitSample.setOrderUserCode(LisUtil.isBank(stringObjectMap.get("sample_OrderUserCode")));
|
||||
regTransitSample.setOrderUserName(LisUtil.isBank(stringObjectMap.get("sample_OrderUserName")));
|
||||
regTransitSample.setOrderTime(DateUtil.parse(LisUtil.isBank(stringObjectMap.get("sample_OrderTime")), "yyyy-MM-dd HH:mm:ss"));
|
||||
regTransitSample.setSrcHospCode(LisUtil.isBank(stringObjectMap.get("sample_SrcHospCode")));
|
||||
regTransitSample.setSrcHospName(LisUtil.isBank(stringObjectMap.get("sample_SrcHospName")));
|
||||
regTransitSample.setSampleTypeCode(LisUtil.isBank(stringObjectMap.get("sample_SampleTypeCode")));
|
||||
regTransitSample.setSampleTypeName(LisUtil.isBank(stringObjectMap.get("sample_SampleTypeName")));
|
||||
regTransitSample.setIsER(LisUtil.isBank(stringObjectMap.get("sample_IsER")));
|
||||
regTransitSample.setStatus(LisUtil.isBank(stringObjectMap.get("sample_Status")));
|
||||
regTransitSample.setSrcHospBarcode(LisUtil.isBank(stringObjectMap.get("sample_SrcHospBarcode")));
|
||||
regTransitSample.setBarcode(barcode);
|
||||
regTransitSample.setCheckPUR(jymd);
|
||||
regTransitSample.setCreate_by(LisUtil.isBank(stringObjectMap.get("sample_UserCode")));
|
||||
regTransitSample.setCreate_time(commonUtil.getCurrentTime());
|
||||
regTransitSampleList.add(regTransitSample);
|
||||
}
|
||||
|
||||
//保存数据
|
||||
applicationContext.getBean(RegRequestInfoServiceImpl.class).saveTransitSample(regTransitSampleList, regTransitSampleDetailList);
|
||||
|
||||
|
||||
if(!ls_nopriceitems.equals("")){
|
||||
return new Result("-1","有如下项目未分类无法生成条码,请先分类:"+ls_nopriceitems);
|
||||
}
|
||||
|
||||
return new Result("0","生成条码成功!");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveTransitSample(List<RegTransitSample> regTransitSampleList, List<RegTransitSampleDetail> regTransitSampleDetailList) {
|
||||
for (RegTransitSample regTransitSample : regTransitSampleList) {
|
||||
regTransitSampleMapper.addRegTransitSample(regTransitSample);
|
||||
}
|
||||
for (RegTransitSampleDetail regTransitSampleDetail : regTransitSampleDetailList) {
|
||||
regTransitSampleMapper.addRegTransitSampleDetail(regTransitSampleDetail);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateApply(RegApply regApply, List<RegApplyDetail> regApplyDetailList){
|
||||
regApplyMapper.delete(regApply.getApplyid());
|
||||
regApplyMapper.insert(regApply);
|
||||
for (RegApplyDetail regApplyDetail : regApplyDetailList) {
|
||||
regApplyDetailMapper.delete(regApplyDetail.getApplyid());
|
||||
regApplyDetailMapper.insert(regApplyDetail);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -118,5 +118,9 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getInfoOne" resultMap="RegDictResult">
|
||||
select * from reg_dict where dict_type = #{dict_type}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -14,8 +14,8 @@
|
||||
select * from reg_apply_detail where applyid = #{applyId}
|
||||
</select>
|
||||
|
||||
<select id="getItemInfo" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegItem">
|
||||
select * from reg_item where Status = '1'
|
||||
<select id="getItemInfo" resultType="map">
|
||||
select b.classid, a.* from reg_item a,reg_itemclass b where a.itemclass = b.itemclass_code and a.status = '0'
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -204,6 +204,34 @@
|
||||
<update id="updateRegTransitSample">
|
||||
update reg_TransitSample
|
||||
<set>
|
||||
<if test="PatId != null and PatId != ''">PatId = #{PatId},</if>
|
||||
<if test="PatCardType != null and PatCardType != ''">PatCardType = #{PatCardType},</if>
|
||||
<if test="PatCardNo != null and PatCardNo != ''">PatCardNo = #{PatCardNo},</if>
|
||||
<if test="PatType != null and PatType != ''">PatType = #{PatType},</if>
|
||||
<if test="PatName != null and PatName != ''">PatName = #{PatName},</if>
|
||||
<if test="PatSex != null and PatSex != ''">PatSex = #{PatSex},</if>
|
||||
<if test="PatAge != null and PatAge != ''">PatAge = #{PatAge},</if>
|
||||
<if test="AgeUnit != null and AgeUnit != ''">AgeUnit = #{AgeUnit},</if>
|
||||
<if test="PatAgeShow != null and PatAgeShow != ''">PatAgeShow = #{PatAgeShow},</if>
|
||||
<if test="PatBirthday != null">PatBirthday = #{PatBirthday},</if>
|
||||
<if test="PatIdentity != null and PatIdentity != ''">PatIdentity = #{PatIdentity},</if>
|
||||
<if test="Phone != null and Phone != ''">Phone = #{Phone},</if>
|
||||
<if test="Address != null and Address != ''">Address = #{Address},</if>
|
||||
<if test="PatFeeType != null and PatFeeType != ''">PatFeeType = #{PatFeeType},</if>
|
||||
<if test="DepartCode != null and DepartCode != ''">DepartCode = #{DepartCode},</if>
|
||||
<if test="DepartName != null and DepartName != ''">DepartName = #{DepartName},</if>
|
||||
<if test="AreaCode != null and AreaCode != ''">AreaCode = #{AreaCode},</if>
|
||||
<if test="AreaName != null and AreaName != ''">AreaName = #{AreaName},</if>
|
||||
<if test="PatBed != null and PatBed != ''">PatBed = #{PatBed},</if>
|
||||
<if test="DiagnosisCode != null and DiagnosisCode != ''">DiagnosisCode = #{DiagnosisCode},</if>
|
||||
<if test="DiagnosisName != null and DiagnosisName != ''">DiagnosisName = #{DiagnosisName},</if>
|
||||
<if test="OrderPatId != null and OrderPatId != ''">OrderPatId = #{OrderPatId},</if>
|
||||
<if test="OrderUserCode != null and OrderUserCode != ''">OrderUserCode = #{OrderUserCode},</if>
|
||||
<if test="OrderUserName != null and OrderUserName != ''">OrderUserName = #{OrderUserName},</if>
|
||||
<if test="OrderTime != null">OrderTime = #{OrderTime},</if>
|
||||
<if test="SampleTypeCode != null and SampleTypeCode != ''">SampleTypeCode = #{SampleTypeCode},</if>
|
||||
<if test="SampleTypeName != null and SampleTypeName != ''">SampleTypeName = #{SampleTypeName},</if>
|
||||
<if test="RegNo != null and RegNo != ''">RegNo = #{RegNo},</if>
|
||||
<if test="Status != null and Status != ''">Status = #{Status},</if>
|
||||
<if test="BackReasons != null and BackReasons != ''">BackReasons = #{BackReasons},</if>
|
||||
<if test="SignInTime != null">SignInTime = #{SignInTime},</if>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user