Compare commits
3 Commits
28967b32c1
...
c6f6509d74
| Author | SHA1 | Date |
|---|---|---|
|
|
c6f6509d74 | |
|
|
90c4f85851 | |
|
|
7016488a61 |
|
|
@ -28,6 +28,7 @@ target/
|
||||||
build/
|
build/
|
||||||
!**/src/main/**/build/
|
!**/src/main/**/build/
|
||||||
!**/src/test/**/build/
|
!**/src/test/**/build/
|
||||||
|
test_json
|
||||||
|
|
||||||
### VS Code ###
|
### VS Code ###
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM2206A extends BaseInputModel{
|
||||||
|
@IMField(key = "data", name = "数据", required = true)
|
||||||
|
private Data data;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class Data{
|
||||||
|
@IMField(key = "psn_no", name = "人员编号", required = true)
|
||||||
|
private String psn_no;
|
||||||
|
@IMField(key = "mdtrt_cert_type", name = "就诊凭证类型", required = true)
|
||||||
|
private String mdtrt_cert_type;
|
||||||
|
@IMField(key = "mdtrt_cert_no", name = "就诊凭证编号", required = true)
|
||||||
|
private String mdtrt_cert_no;
|
||||||
|
@IMField(key = "med_type", name = "医疗类别", required = true)
|
||||||
|
private String med_type;
|
||||||
|
@IMField(key = "medfee_sumamt", name = "医疗费总额", required = true)
|
||||||
|
private BigDecimal medfee_sumamt;
|
||||||
|
@IMField(key = "psn_setlway", name = "个人结算方式", required = true)
|
||||||
|
private String psn_setlway;
|
||||||
|
@IMField(key = "mdtrt_id", name = "就诊ID", required = true)
|
||||||
|
private String mdtrt_id;
|
||||||
|
@IMField(key = "chrg_bchno", name = "收费批次号", required = true)
|
||||||
|
private String chrg_bchno;
|
||||||
|
@IMField(key = "acct_used_flag", name = "个人账户使用标志", required = true)
|
||||||
|
private String acct_used_flag;
|
||||||
|
@IMField(key = "insutype", name = "险种类型", required = true)
|
||||||
|
private String insutype;
|
||||||
|
@IMField(key = "exp_content", name = "字段扩展")
|
||||||
|
private ExpContent exp_content;
|
||||||
|
}
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class ExpContent{
|
||||||
|
@IMField(key = "dise_reim_mon", name = "规定病种报销月份")
|
||||||
|
private String dise_reim_mon;
|
||||||
|
@IMField(key = "deve_flag", name = "开发商标志")
|
||||||
|
private String deve_flag;
|
||||||
|
@IMField(key = "otp_reim_flag", name = "门诊报销标志")
|
||||||
|
private String otp_reim_flag;
|
||||||
|
@IMField(key = "birctrl_falg", name = "生育门诊和计划生育门诊患者标识")
|
||||||
|
private String birctrl_falg;
|
||||||
|
@IMField(key = "otp_mulaid_used_flag", name = "门诊共济使用标志")
|
||||||
|
private String otp_mulaid_used_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM2207A extends BaseInputModel{
|
||||||
|
@IMField(key = "data", name = "数据", required = true)
|
||||||
|
private Data data;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class Data{
|
||||||
|
@IMField(key = "psn_no", name = "人员编号", required = true)
|
||||||
|
private String psn_no;
|
||||||
|
@IMField(key = "mdtrt_cert_type", name = "就诊凭证类型", required = true)
|
||||||
|
private String mdtrt_cert_type;
|
||||||
|
@IMField(key = "mdtrt_cert_no", name = "就诊凭证编号", required = true)
|
||||||
|
private String mdtrt_cert_no;
|
||||||
|
@IMField(key = "med_type", name = "医疗类别", required = true)
|
||||||
|
private String med_type;
|
||||||
|
@IMField(key = "medfee_sumamt", name = "医疗费总额", required = true)
|
||||||
|
private BigDecimal medfee_sumamt;
|
||||||
|
@IMField(key = "psn_setlway", name = "个人结算方式", required = true)
|
||||||
|
private String psn_setlway;
|
||||||
|
@IMField(key = "mdtrt_id", name = "就诊ID", required = true)
|
||||||
|
private String mdtrt_id;
|
||||||
|
@IMField(key = "chrg_bchno", name = "收费批次号", required = true)
|
||||||
|
private String chrg_bchno;
|
||||||
|
@IMField(key = "insutype", name = "险种类型", required = true)
|
||||||
|
private String insutype;
|
||||||
|
@IMField(key = "acct_used_flag", name = "个人账户使用标志", required = true)
|
||||||
|
private String acct_used_flag;
|
||||||
|
@IMField(key = "invono", name = "发票号")
|
||||||
|
private String invono;
|
||||||
|
@IMField(key = "fulamt_ownpay_amt", name = "全自费金额")
|
||||||
|
private BigDecimal fulamt_ownpay_amt;
|
||||||
|
@IMField(key = "overlmt_selfpay", name = "超限价金额")
|
||||||
|
private BigDecimal overlmt_selfpay;
|
||||||
|
@IMField(key = "preselfpay_amt", name = "先行自付金额")
|
||||||
|
private BigDecimal preselfpay_amt;
|
||||||
|
@IMField(key = "inscp_scp_amt", name = "符合政策范围金额")
|
||||||
|
private BigDecimal inscp_scp_amt;
|
||||||
|
@IMField(key = "exp_content", name = "字段扩展")
|
||||||
|
private ExpContent exp_content;
|
||||||
|
@IMField(key = "minpacunt_drug_trac_cnt", name = "本次结算应上传最小包装药品追溯码数量")
|
||||||
|
private BigDecimal minpacunt_drug_trac_cnt;
|
||||||
|
@IMField(key = "mcs_trac_cnt", name = "本次结算应上传耗材追溯码数量")
|
||||||
|
private BigDecimal mcs_trac_cnt;
|
||||||
|
}
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class ExpContent{
|
||||||
|
@IMField(key = "dise_reim_mon", name = "规定病种报销月份")
|
||||||
|
private String dise_reim_mon;
|
||||||
|
@IMField(key = "deve_flag", name = "开发商标志")
|
||||||
|
private String deve_flag;
|
||||||
|
@IMField(key = "otp_reim_flag", name = "门诊报销标志")
|
||||||
|
private String otp_reim_flag;
|
||||||
|
@IMField(key = "birctrl_falg", name = "生育门诊和计划生育门诊患者标识")
|
||||||
|
private String birctrl_falg;
|
||||||
|
@IMField(key = "otp_mulaid_used_flag", name = "门诊共济使用标志")
|
||||||
|
private String otp_mulaid_used_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.syjiaer.clinic.server.common.api.input;
|
||||||
|
|
||||||
|
import com.syjiaer.clinic.server.common.api.annotations.IMField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class IM9001 extends BaseInputModel{
|
||||||
|
@IMField(key = "opter_no", name = "操作员编号", required = true)
|
||||||
|
private String opter_no;
|
||||||
|
@IMField(key = "mac", name = "签到MAC地址", required = true)
|
||||||
|
private String mac;
|
||||||
|
@IMField(key = "ip", name = "签到IP地址", required = true)
|
||||||
|
private String ip;
|
||||||
|
}
|
||||||
|
|
@ -173,4 +173,16 @@ public class SocialRequest {
|
||||||
public void call2204(IM2204 im2204) {
|
public void call2204(IM2204 im2204) {
|
||||||
httpUtil.call("2204", im2204.buildToMap());
|
httpUtil.call("2204", im2204.buildToMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void call2206A(IM2206A im2206A) {
|
||||||
|
httpUtil.call("2206A",im2206A.buildToMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void call2207A(IM2207A im2207A) {
|
||||||
|
httpUtil.call("2207A",im2207A.buildToMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void call9001(IM9001 im9001){
|
||||||
|
httpUtil.call("9001","signIn",im9001.buildToMap());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,13 @@ import com.syjiaer.clinic.server.common.util.DictoryUtil;
|
||||||
import com.syjiaer.clinic.server.common.vo.Page;
|
import com.syjiaer.clinic.server.common.vo.Page;
|
||||||
import com.syjiaer.clinic.server.common.vo.Result;
|
import com.syjiaer.clinic.server.common.vo.Result;
|
||||||
import com.syjiaer.clinic.server.controller.BaseController;
|
import com.syjiaer.clinic.server.controller.BaseController;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDiagnose;
|
||||||
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
import com.syjiaer.clinic.server.entity.social.vo.SocialDirectoryView;
|
import com.syjiaer.clinic.server.entity.social.vo.SocialDirectoryView;
|
||||||
|
import com.syjiaer.clinic.server.service.social.SocialDiagnoseService;
|
||||||
import com.syjiaer.clinic.server.service.social.SocialDirectoryService;
|
import com.syjiaer.clinic.server.service.social.SocialDirectoryService;
|
||||||
|
import com.syjiaer.clinic.server.service.social.SocialItemService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
@ -30,6 +34,10 @@ public class SocialDirectoryController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryService socialDirectoryService;
|
private SocialDirectoryService socialDirectoryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private SocialItemService socialItemService;
|
||||||
|
@Autowired
|
||||||
|
private SocialDiagnoseService socialDiagnoseService;
|
||||||
|
@Autowired
|
||||||
private DictoryUtil dictoryUtil;
|
private DictoryUtil dictoryUtil;
|
||||||
|
|
||||||
@RequestMapping("search")
|
@RequestMapping("search")
|
||||||
|
|
@ -62,6 +70,14 @@ public class SocialDirectoryController extends BaseController {
|
||||||
result =socialDirectoryService.download(ver, type);
|
result =socialDirectoryService.download(ver, type);
|
||||||
return success(result);
|
return success(result);
|
||||||
}
|
}
|
||||||
|
if (type ==1307){
|
||||||
|
result =socialDiagnoseService.download(ver);
|
||||||
|
return success(result);
|
||||||
|
}
|
||||||
|
if (type == 1305 || type == 1321){
|
||||||
|
result =socialItemService.download(ver);
|
||||||
|
return success(result);
|
||||||
|
}
|
||||||
|
|
||||||
return error("参数 type 不正确");
|
return error("参数 type 不正确");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
package com.syjiaer.clinic.server.mapper.social;
|
package com.syjiaer.clinic.server.mapper.social;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
||||||
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
public interface SocialItemMapper extends BaseMapper<SocialItem> {
|
public interface SocialItemMapper extends BaseMapper<SocialItem> {
|
||||||
|
@Select("select * from social_item where social_code = #{code}")
|
||||||
|
SocialItem getByCode(String code);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ package com.syjiaer.clinic.server.service.charge;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.syjiaer.clinic.server.common.api.input.IM2204;
|
import com.syjiaer.clinic.server.common.api.input.IM2204;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM2206A;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM2207A;
|
||||||
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||||
|
import com.syjiaer.clinic.server.common.config.Config;
|
||||||
import com.syjiaer.clinic.server.common.constants.Constants;
|
import com.syjiaer.clinic.server.common.constants.Constants;
|
||||||
import com.syjiaer.clinic.server.common.enums.InventorySocialTypeEnum;
|
import com.syjiaer.clinic.server.common.enums.InventorySocialTypeEnum;
|
||||||
import com.syjiaer.clinic.server.common.enums.InventoryTypeEnum;
|
import com.syjiaer.clinic.server.common.enums.InventoryTypeEnum;
|
||||||
|
|
@ -27,6 +30,7 @@ import com.syjiaer.clinic.server.entity.organization.OrganizationMember;
|
||||||
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
import com.syjiaer.clinic.server.entity.organization.OrganizationSection;
|
||||||
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
||||||
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
import com.syjiaer.clinic.server.entity.social.SocialDirectory;
|
||||||
|
import com.syjiaer.clinic.server.entity.social.SocialItem;
|
||||||
import com.syjiaer.clinic.server.mapper.charge.ChargeGoodsListMapper;
|
import com.syjiaer.clinic.server.mapper.charge.ChargeGoodsListMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.charge.ChargeItemListMapper;
|
import com.syjiaer.clinic.server.mapper.charge.ChargeItemListMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.charge.ChargeOrderMapper;
|
import com.syjiaer.clinic.server.mapper.charge.ChargeOrderMapper;
|
||||||
|
|
@ -40,6 +44,7 @@ import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
import com.syjiaer.clinic.server.mapper.patient.PatientRegistrationMapper;
|
||||||
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryMapper;
|
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryMapper;
|
||||||
|
import com.syjiaer.clinic.server.mapper.social.SocialItemMapper;
|
||||||
import com.syjiaer.clinic.server.service.BaseService;
|
import com.syjiaer.clinic.server.service.BaseService;
|
||||||
import com.syjiaer.clinic.server.service.inventory.InventoryService;
|
import com.syjiaer.clinic.server.service.inventory.InventoryService;
|
||||||
import com.syjiaer.clinic.server.service.patient.PatientRegistrationService;
|
import com.syjiaer.clinic.server.service.patient.PatientRegistrationService;
|
||||||
|
|
@ -80,11 +85,15 @@ public class ChargeService extends BaseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryMapper socialDirectoryMapper;
|
private SocialDirectoryMapper socialDirectoryMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private SocialItemMapper socialItemMapper;
|
||||||
|
@Autowired
|
||||||
private InventoryService inventoryService;
|
private InventoryService inventoryService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private InventoryLogMapper inventoryLogMapper;
|
private InventoryLogMapper inventoryLogMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialRequest socialRequest;
|
private SocialRequest socialRequest;
|
||||||
|
@Autowired
|
||||||
|
private Config config;
|
||||||
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
@ -303,9 +312,9 @@ public class ChargeService extends BaseService {
|
||||||
feedetail.setRx_circ_flag("0");
|
feedetail.setRx_circ_flag("0");
|
||||||
feedetail.setFee_ocur_time(LocalDateTime.now());
|
feedetail.setFee_ocur_time(LocalDateTime.now());
|
||||||
Item item = itemMapper.selectById(itemList.getServiceId());
|
Item item = itemMapper.selectById(itemList.getServiceId());
|
||||||
SocialDirectory sdGoods = socialDirectoryMapper.getByCode(item.getItemSocialCode());
|
SocialItem sdGoods = socialItemMapper.getByCode(item.getItemSocialCode());
|
||||||
feedetail.setMed_list_codg(sdGoods.getCode());
|
feedetail.setMed_list_codg(sdGoods.getSocialCode());
|
||||||
feedetail.setMedins_list_codg(sdGoods.getId());
|
feedetail.setMedins_list_codg(String.valueOf(sdGoods.getId()));
|
||||||
BigDecimal totalPrice = itemList.getUnitPrice().multiply(new BigDecimal(itemList.getNumber()));
|
BigDecimal totalPrice = itemList.getUnitPrice().multiply(new BigDecimal(itemList.getNumber()));
|
||||||
feedetail.setDet_item_fee_sumamt(totalPrice);
|
feedetail.setDet_item_fee_sumamt(totalPrice);
|
||||||
feedetail.setCnt(new BigDecimal(itemList.getNumber()));
|
feedetail.setCnt(new BigDecimal(itemList.getNumber()));
|
||||||
|
|
@ -323,4 +332,57 @@ public class ChargeService extends BaseService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保预支付
|
||||||
|
*/
|
||||||
|
public void socialPrePay(String changeOrderCode,String mdtrtCertType,String mdtrtCertNO,String insutype){
|
||||||
|
ChargeOrder order = chargeOrderMapper.selectByCode(changeOrderCode);
|
||||||
|
Diagnosis diagnosis = diagnosisMapper.selectByCode(order.getDiagnosisCode());
|
||||||
|
|
||||||
|
PatientRegistration registration = patientRegistrationMapper.selectById(diagnosis.getRegistrationId());
|
||||||
|
|
||||||
|
IM2206A im2206A = new IM2206A();
|
||||||
|
IM2206A.Data data = new IM2206A.Data();
|
||||||
|
data.setPsn_no(registration.getPsnNo());
|
||||||
|
data.setMdtrt_cert_type(mdtrtCertType);
|
||||||
|
data.setMdtrt_cert_no(mdtrtCertNO);
|
||||||
|
data.setMed_type("12");
|
||||||
|
data.setMedfee_sumamt(order.getTotalPrice());
|
||||||
|
data.setPsn_setlway("01");
|
||||||
|
data.setMdtrt_id(registration.getMdtrtId());
|
||||||
|
data.setChrg_bchno(order.getCode());
|
||||||
|
data.setAcct_used_flag("1");
|
||||||
|
data.setInsutype(insutype);
|
||||||
|
IM2206A.ExpContent expContent = new IM2206A.ExpContent();
|
||||||
|
data.setExp_content(expContent);
|
||||||
|
im2206A.setData(data);
|
||||||
|
socialRequest.call2206A(im2206A);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void socialRealPay(String changeOrderCode,String mdtrtCertType,String mdtrtCertNO,String insutype){
|
||||||
|
ChargeOrder order = chargeOrderMapper.selectByCode(changeOrderCode);
|
||||||
|
Diagnosis diagnosis = diagnosisMapper.selectByCode(order.getDiagnosisCode());
|
||||||
|
|
||||||
|
PatientRegistration registration = patientRegistrationMapper.selectById(diagnosis.getRegistrationId());
|
||||||
|
|
||||||
|
IM2207A im2207A = new IM2207A();
|
||||||
|
IM2207A.Data data = new IM2207A.Data();
|
||||||
|
data.setPsn_no(registration.getPsnNo());
|
||||||
|
data.setMdtrt_cert_type(mdtrtCertType);
|
||||||
|
data.setMdtrt_cert_no(mdtrtCertNO);
|
||||||
|
data.setMed_type("12");
|
||||||
|
data.setMedfee_sumamt(order.getTotalPrice());
|
||||||
|
data.setPsn_setlway("01");
|
||||||
|
data.setMdtrt_id(registration.getMdtrtId());
|
||||||
|
data.setChrg_bchno(order.getCode());
|
||||||
|
data.setAcct_used_flag("1");
|
||||||
|
data.setInsutype(insutype);
|
||||||
|
IM2207A.ExpContent expContent = new IM2207A.ExpContent();
|
||||||
|
data.setExp_content(expContent);
|
||||||
|
im2207A.setData(data);
|
||||||
|
socialRequest.call2207A(im2207A);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class SocialDiagnoseService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryVersionService socialDirectoryVersionService;
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
public String download( String version_name) {
|
public Map<String, Object> download( String version_name) {
|
||||||
List<String[]> tab_list = httpUtil.download(version_name, 1307);
|
List<String[]> tab_list = httpUtil.download(version_name, 1307);
|
||||||
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||||
List<SocialDiagnose> list = new ArrayList<>();
|
List<SocialDiagnose> list = new ArrayList<>();
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,14 @@ public class SocialItemService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryVersionService socialDirectoryVersionService;
|
private SocialDirectoryVersionService socialDirectoryVersionService;
|
||||||
|
|
||||||
public String download(int type, String version_name) {
|
public Map<String, Object> download( String version_name) {
|
||||||
List<String[]> tab_list = httpUtil.download(version_name, type);
|
List<String[]> tab_list = httpUtil.download(version_name, 1305);
|
||||||
List<SocialItem> list = new ArrayList<>();
|
List<SocialItem> list = new ArrayList<>();
|
||||||
String value = String.valueOf(type);
|
String value = String.valueOf(1305);
|
||||||
List<String> codeList = new ArrayList<>();
|
List<String> codeList = new ArrayList<>();
|
||||||
for (String[] line_array : tab_list) {
|
String next_version_name="";
|
||||||
|
for (int i=0;i<tab_list.size();i++) {
|
||||||
|
String[] line_array= tab_list.get(i);
|
||||||
String flag = "";
|
String flag = "";
|
||||||
SocialItem socialItem = new SocialItem();
|
SocialItem socialItem = new SocialItem();
|
||||||
if (value.equals("1305")) {
|
if (value.equals("1305")) {
|
||||||
|
|
@ -45,7 +47,7 @@ public class SocialItemService {
|
||||||
String code = line_array[0];
|
String code = line_array[0];
|
||||||
socialItem.setSocialCode(code);
|
socialItem.setSocialCode(code);
|
||||||
socialItem.setName(line_array[9]);
|
socialItem.setName(line_array[9]);
|
||||||
socialItem.setVersionName(line_array[16]);
|
socialItem.setVersionName(line_array[15]);
|
||||||
socialItem.setUnit(line_array[1]);
|
socialItem.setUnit(line_array[1]);
|
||||||
}else if (value.equals("1321")) {
|
}else if (value.equals("1321")) {
|
||||||
flag = line_array[13];
|
flag = line_array[13];
|
||||||
|
|
@ -55,17 +57,27 @@ public class SocialItemService {
|
||||||
socialItem.setVersionName(line_array[21]);
|
socialItem.setVersionName(line_array[21]);
|
||||||
socialItem.setUnit(line_array[10]);
|
socialItem.setUnit(line_array[10]);
|
||||||
}
|
}
|
||||||
|
if(i==0){
|
||||||
|
next_version_name = line_array[15];
|
||||||
|
}
|
||||||
if (!flag.equals("1")) {
|
if (!flag.equals("1")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
codeList.add(socialItem.getSocialCode());
|
codeList.add(socialItem.getSocialCode());
|
||||||
list.add(socialItem);
|
list.add(socialItem);
|
||||||
}
|
}
|
||||||
|
socialDirectoryVersionService.setSocialDirectoryVersion(1305, version_name, next_version_name, list.size());
|
||||||
|
if(list.isEmpty()){
|
||||||
|
return next_version_name;
|
||||||
|
}
|
||||||
|
if(!codeList.isEmpty()){
|
||||||
QueryWrapper<SocialItem> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<SocialItem> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.in("social_code", codeList);
|
queryWrapper.in("social_code", codeList);
|
||||||
socialItemMapper.delete(queryWrapper);
|
socialItemMapper.delete(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
socialItemMapper.insert(list, 100);
|
socialItemMapper.insert(list, 100);
|
||||||
socialDirectoryVersionService.setSocialDirectoryVersion(type, version_name, list.get(0).getVersionName(), list.size());
|
|
||||||
return list.get(0).getVersionName();
|
return next_version_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
package com.syjiaer.clinic.server;
|
package com.syjiaer.clinic.server;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.syjiaer.clinic.server.common.api.input.IM9001;
|
||||||
|
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||||
import com.syjiaer.clinic.server.service.charge.ChargeService;
|
import com.syjiaer.clinic.server.service.charge.ChargeService;
|
||||||
import com.syjiaer.clinic.server.service.diagnosis.MedicalRecordService;
|
import com.syjiaer.clinic.server.service.diagnosis.MedicalRecordService;
|
||||||
import com.syjiaer.clinic.server.service.social.SocialDiagnoseService;
|
import com.syjiaer.clinic.server.service.social.SocialDiagnoseService;
|
||||||
import com.syjiaer.clinic.server.service.social.SocialDirectoryService;
|
import com.syjiaer.clinic.server.service.social.SocialItemService;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
@ -15,14 +17,33 @@ class ServerApplicationTests {
|
||||||
@Autowired
|
@Autowired
|
||||||
private MedicalRecordService medicalRecordService;
|
private MedicalRecordService medicalRecordService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SocialDirectoryService socialDirectoryService;
|
private SocialDiagnoseService socialDiagnoseService;
|
||||||
|
@Autowired
|
||||||
|
private SocialItemService socialItemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ChargeService chargeService;
|
private ChargeService chargeService;
|
||||||
|
@Autowired
|
||||||
|
private SocialRequest socialRequest;
|
||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
|
chargeService.uploadCostDetails("CO20250424130233778296");
|
||||||
|
String meCode = "AD1537643";
|
||||||
|
String medType = "03";
|
||||||
|
String in = "310";
|
||||||
|
chargeService.socialPrePay("CO20250424130233778296",medType,meCode,"310");
|
||||||
|
|
||||||
socialDirectoryService.download("0", 1301);
|
}
|
||||||
|
@Test
|
||||||
|
void text(){
|
||||||
|
IM9001 im9001 = new IM9001();
|
||||||
|
im9001.setOpter_no("0");
|
||||||
|
im9001.setMac("00-FF-F2-10-61-2D");
|
||||||
|
im9001.setIp("10.42.131.10");
|
||||||
|
socialRequest.call9001(im9001);
|
||||||
|
}
|
||||||
|
@Test
|
||||||
|
void test(){
|
||||||
|
socialItemService.download("F002_20210915000001_A");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue