Merge branch 'fea_tongmingxuan_xinjiangbushu' of ssh://git.jizhiweb.cn:2222/clinic-v2/server into fea_tongmingxuan_xinjiangbushu
This commit is contained in:
commit
0cfea1bed0
|
|
@ -34,6 +34,8 @@ public class IM3202 extends BaseInputModel{
|
|||
private BigDecimal cash_payamt;
|
||||
@IMField(key = "fixmedins_setl_cnt", name = "定点医药机构结算笔数", required = true)
|
||||
private BigDecimal fixmedins_setl_cnt;
|
||||
@IMField(key = "clr_type", name = "清算类别", required = true)
|
||||
private String clr_type;
|
||||
@IMField(key = "refd_setl_flag", name = "退费结算标志")
|
||||
private String refd_setl_flag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,4 +24,12 @@ public enum ChrgitmLvEnum {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
public static String getCodeByName(String name) {
|
||||
for (ChrgitmLvEnum chrgitmLvEnum : ChrgitmLvEnum.values()) {
|
||||
if (chrgitmLvEnum.getName().equals(name)) {
|
||||
return chrgitmLvEnum.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ public class ItemController extends BaseController {
|
|||
public Result<?> createItem() {
|
||||
Item item = parmsUtil.getObject("data", Item.class);
|
||||
itemService.save(item);
|
||||
|
||||
return success();
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
|
|
@ -16,6 +17,7 @@ import java.io.Serializable;
|
|||
*/
|
||||
@TableName("goods_cate")
|
||||
@ApiModel(value = "GoodsCate对象", description = "")
|
||||
@Data
|
||||
public class GoodsCate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -27,46 +29,4 @@ public class GoodsCate implements Serializable {
|
|||
private Integer type;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GoodsCate{" +
|
||||
"id = " + id +
|
||||
", name = " + name +
|
||||
", type = " + type +
|
||||
", sort = " + sort +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -539,8 +539,11 @@ public class ChargeService extends BaseService {
|
|||
if (sdGoods == null){
|
||||
throw new MessageException("本地医保目录中未查询到医保码为"+goodsList.getSocialCode()+"的商品信息");
|
||||
}
|
||||
if (sdGoods.getCompareCode() == null){
|
||||
throw new MessageException("医保服务项目"+goodsList.getSocialCode()+"未关联医保目录");
|
||||
}
|
||||
feedetail.setMed_list_codg(goodsList.getSocialCode());
|
||||
feedetail.setMedins_list_codg(String.valueOf(sdGoods.getId()));
|
||||
feedetail.setMedins_list_codg(sdGoods.getCompareCode());
|
||||
BigDecimal totalPrice = goodsList.getUnitPrice().multiply(new BigDecimal(goodsList.getNumber()));
|
||||
feedetail.setDet_item_fee_sumamt(totalPrice);
|
||||
feedetail.setCnt(new BigDecimal(goodsList.getNumber()));
|
||||
|
|
@ -564,8 +567,11 @@ public class ChargeService extends BaseService {
|
|||
if (sdItem == null){
|
||||
throw new MessageException("本地医保目录中未查询到医保码为"+itemList.getSocialCode()+"的医保服务项目");
|
||||
}
|
||||
if (sdItem.getCompareCode() == null){
|
||||
throw new MessageException("医保服务项目"+itemList.getSocialCode()+"未关联医保目录");
|
||||
}
|
||||
feedetail.setMed_list_codg(itemList.getSocialCode());
|
||||
feedetail.setMedins_list_codg(String.valueOf(sdItem.getId()));
|
||||
feedetail.setMedins_list_codg(sdItem.getCompareCode());
|
||||
BigDecimal totalPrice = itemList.getUnitPrice().multiply(new BigDecimal(itemList.getNumber()));
|
||||
feedetail.setDet_item_fee_sumamt(totalPrice);
|
||||
feedetail.setCnt(new BigDecimal(itemList.getNumber()));
|
||||
|
|
@ -632,7 +638,7 @@ public class ChargeService extends BaseService {
|
|||
data.setPsn_no(registration.getPsnNo());
|
||||
data.setMdtrt_cert_type(mdtrtCertType);
|
||||
data.setMdtrt_cert_no(mdtrtCertNo);
|
||||
data.setMed_type("12");
|
||||
data.setMed_type(config.get("social", "medType"));
|
||||
data.setMedfee_sumamt(order.getTotalPrice());
|
||||
data.setPsn_setlway("01");
|
||||
data.setMdtrt_id(registration.getMdtrtId());
|
||||
|
|
@ -652,8 +658,8 @@ public class ChargeService extends BaseService {
|
|||
|
||||
}
|
||||
data.setMinpacunt_drug_trac_cnt(BigDecimal.valueOf(minpacunt_drug_trac_cnt));
|
||||
IM2207A.ExpContent expContent = new IM2207A.ExpContent();
|
||||
data.setExp_content(expContent);
|
||||
// IM2207A.ExpContent expContent = new IM2207A.ExpContent();
|
||||
// data.setExp_content(expContent);
|
||||
im2207A.setData(data);
|
||||
OM2207A om2207A = socialRequest.call2207A(im2207A);
|
||||
//完成订单
|
||||
|
|
|
|||
|
|
@ -69,6 +69,14 @@ public class GoodsCateService {
|
|||
* 参数 cateList 分类列表
|
||||
*/
|
||||
public void save(List<GoodsCate> cateList){
|
||||
for (GoodsCate cate : cateList){
|
||||
if (cate.getName() == null || cate.getName().isEmpty()){
|
||||
throw new RuntimeException("分类名称不能为空");
|
||||
}
|
||||
if (cate.getType() == null){
|
||||
throw new RuntimeException("分类父类型不能为空");
|
||||
}
|
||||
}
|
||||
goodsCateMapper.insertOrUpdate(cateList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import com.syjiaer.clinic.server.mapper.inventory.InventoryMapper;
|
|||
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryMapper;
|
||||
import com.syjiaer.clinic.server.mapper.social.SocialDirectoryUpinfoMapper;
|
||||
import com.syjiaer.clinic.server.service.BaseService;
|
||||
import com.syjiaer.clinic.server.service.item.ItemService;
|
||||
import com.syjiaer.clinic.server.service.social.SocialDirectoryService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -44,6 +45,8 @@ import java.util.Objects;
|
|||
|
||||
@Service
|
||||
public class GoodsService extends BaseService {
|
||||
@Autowired
|
||||
private ItemService itemService;
|
||||
@Autowired
|
||||
private GoodsMapper goodsMapper;
|
||||
@Autowired
|
||||
|
|
@ -132,6 +135,12 @@ public class GoodsService extends BaseService {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
//上传对照消息 3301
|
||||
if (goods.getHilistCode() != null){
|
||||
|
||||
itemService.call3301(goods.getHilistCode(),"goods","create");
|
||||
}
|
||||
return goods;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,12 @@ public class ItemService extends BaseService {
|
|||
item.setPinyinFull(pinyin_full);
|
||||
item.setPinyinFirst(PinYinUtil.getPinyinFirstLetters(item.getName()).toUpperCase());
|
||||
itemMapper.insertOrUpdate(item);
|
||||
|
||||
//上传对照消息 3301
|
||||
if (item.getSocialCode() != null){
|
||||
this.call3301(item.getSocialCode(),"item","create");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -210,6 +216,12 @@ public class ItemService extends BaseService {
|
|||
item.setPinyinFull(pinyin_full);
|
||||
item.setPinyinFirst(PinYinUtil.getPinyinFirstLetters(item.getName()).toUpperCase());
|
||||
itemMapper.updateById(item);
|
||||
|
||||
|
||||
//上传对照消息 3301
|
||||
if (item.getSocialCode() != null){
|
||||
this.call3301(item.getSocialCode(),"item","create");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -328,8 +340,15 @@ public class ItemService extends BaseService {
|
|||
itemGroup.setItemId(itemInfo.getId());
|
||||
itemGroup.setDelFlag(false);
|
||||
itemGroupListMapper.insertOrUpdate(itemGroup);
|
||||
|
||||
//上传对照消息 3301
|
||||
if (itemGroup.getSocialCode() != null){
|
||||
this.call3301(itemGroup.getSocialCode(),"item_group_list","create");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
itemInfo.setUpdateDatetime(LocalDateTime.now());
|
||||
itemInfo.setUnitPrice(unitPrice);
|
||||
itemInfo.setPurchaseUnitPrice(purchaseUnitPrice);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
|
|||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.enums.ChrgitmLvEnum;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||
import com.syjiaer.clinic.server.common.util.DebugUtil;
|
||||
|
|
@ -35,6 +36,7 @@ import java.io.BufferedReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.math.BigInteger;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
|
@ -90,6 +92,10 @@ public class SocialDirectoryService extends BaseService {
|
|||
QueryWrapper<SocialDirectory> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("code", code_list);
|
||||
socialDirectoryMapper.delete(queryWrapper);
|
||||
// 清除upinfo表里的老数据
|
||||
QueryWrapper<SocialDirectoryUpinfo> upinfoQueryWrapper = new QueryWrapper<>();
|
||||
upinfoQueryWrapper.in("code", code_list);
|
||||
socialDirectoryUpinfoMapper.delete(upinfoQueryWrapper);
|
||||
}
|
||||
return insertAll(version_name, type, tab_list);
|
||||
}
|
||||
|
|
@ -97,11 +103,13 @@ public class SocialDirectoryService extends BaseService {
|
|||
private String insertAll(String version_name, int type, List<String[]> tab_list) {
|
||||
Map<String, String> title_map = dictoryUtil.getTitleMap(String.valueOf(type));
|
||||
List<SocialDirectory> list = new ArrayList<>();
|
||||
List<SocialDirectoryUpinfo> upinfoList = new ArrayList<>();
|
||||
HashMap<String, SocialDirectory> tmp_map = new HashMap<>();
|
||||
String next_version_name = "";
|
||||
for (int i = 0; i < tab_list.size(); i++) {
|
||||
String[] line_array = tab_list.get(i);
|
||||
SocialDirectory socialDirectory = new SocialDirectory();
|
||||
SocialDirectoryUpinfo upinfo = new SocialDirectoryUpinfo();
|
||||
socialDirectory.setType(type);
|
||||
String code = line_array[0];
|
||||
socialDirectory.setId(code);
|
||||
|
|
@ -121,6 +129,7 @@ public class SocialDirectoryService extends BaseService {
|
|||
socialDirectory.setName(map.get("name"));
|
||||
socialDirectory.setVersionName(map.get("version_name"));
|
||||
String flag = "";
|
||||
|
||||
DateTimeFormatter dateTimeFormatter = DateUtil.getDateTimeFormatter(DateUtil.DATE_TIME_FORMAT);
|
||||
if (type == 1301) {
|
||||
flag = line_array[78];
|
||||
|
|
@ -128,12 +137,36 @@ public class SocialDirectoryService extends BaseService {
|
|||
socialDirectory.setKeyword(line_array[1] + "," + line_array[3] + "," + line_array[61]+","+socialDirectory.getProducer()+","+socialDirectory.getName()+","+socialDirectory.getCode());
|
||||
socialDirectory.setCreateDatetime(LocalDateTime.parse(line_array[80], dateTimeFormatter));
|
||||
socialDirectory.setUpdateDatetime(LocalDateTime.parse(line_array[81], dateTimeFormatter));
|
||||
|
||||
|
||||
upinfo.setCode(socialDirectory.getCode());
|
||||
upinfo.setBegndate(line_array[36]!=null &&!line_array[36].isEmpty()?DateUtil.getDateTime(line_array[36]):null);
|
||||
upinfo.setEnddate(line_array[37]!=null &&!line_array[37].isEmpty()?DateUtil.getDateTime(line_array[37]):null);
|
||||
upinfo.setWubi(line_array[49]);
|
||||
upinfo.setPinyin(line_array[50]);
|
||||
upinfo.setRid(new BigInteger(line_array[79]));
|
||||
String chrgitm_lv = ChrgitmLvEnum.getCodeByName(line_array[91]);
|
||||
upinfo.setChrgitmLv(chrgitm_lv);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
if (type == 1302) {
|
||||
flag = line_array[13];
|
||||
socialDirectory.setKeyword(line_array[19]+","+socialDirectory.getProducer()+","+socialDirectory.getName()+","+socialDirectory.getCode());
|
||||
socialDirectory.setCreateDatetime(LocalDateTime.parse(DateUtil.parseAndFormatDate(line_array[15]), dateTimeFormatter));
|
||||
socialDirectory.setUpdateDatetime(LocalDateTime.parse(DateUtil.parseAndFormatDate(line_array[16]), dateTimeFormatter));
|
||||
|
||||
|
||||
upinfo.setCode(socialDirectory.getCode());
|
||||
upinfo.setBegndate(line_array[11]!=null &&!line_array[11].isEmpty()?DateUtil.getDateTime(line_array[11]):null);
|
||||
upinfo.setEnddate(line_array[12]!=null &&!line_array[12].isEmpty()?DateUtil.getDateTime(line_array[12]):null);
|
||||
upinfo.setRid(new BigInteger(line_array[14]));
|
||||
|
||||
|
||||
}
|
||||
if (type == 1306) {
|
||||
flag = line_array[67];
|
||||
|
|
@ -159,6 +192,7 @@ public class SocialDirectoryService extends BaseService {
|
|||
next_version_name = socialDirectory.getVersionName();
|
||||
}
|
||||
if (tmp_socialDirectory == null && flag.equals("1")) {
|
||||
upinfoList.add(upinfo);
|
||||
list.add(socialDirectory);
|
||||
tmp_map.put(code, socialDirectory);
|
||||
}
|
||||
|
|
@ -176,6 +210,8 @@ public class SocialDirectoryService extends BaseService {
|
|||
for (int i = 0; i < list.size(); i += 1000) {
|
||||
List<SocialDirectory> subList = list.subList(i, Math.min(i + 1000, list.size()));
|
||||
socialDirectoryMapper.insertAll(subList);
|
||||
List<SocialDirectoryUpinfo> subUpinfoList = upinfoList.subList(i, Math.min(i + 1000, list.size()));
|
||||
socialDirectoryUpinfoMapper.insert(subUpinfoList);
|
||||
}
|
||||
|
||||
socialDirectoryVersionService.saveVersion(type, version_name, next_version_name, list.size());
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.syjiaer.clinic.server.service.social;
|
|||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.syjiaer.clinic.server.common.util.DateUtil;
|
||||
import com.syjiaer.clinic.server.common.util.HttpUtil;
|
||||
import com.syjiaer.clinic.server.common.vo.Page;
|
||||
import com.syjiaer.clinic.server.entity.social.SocialDirectoryLimit;
|
||||
|
|
@ -19,6 +20,11 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.text.DateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -43,13 +49,16 @@ public class SocialItemService extends BaseService {
|
|||
return null;
|
||||
}
|
||||
List<SocialItem> list = new ArrayList<>();
|
||||
List<SocialDirectoryUpinfo> upinfoList = new ArrayList<>();
|
||||
String value = String.valueOf(1305);
|
||||
List<String> codeList = new ArrayList<>();
|
||||
String next_version_name = "";
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
for (int i = 0; i < tab_list.size(); i++) {
|
||||
String[] line_array = tab_list.get(i);
|
||||
String flag = "";
|
||||
SocialItem socialItem = new SocialItem();
|
||||
SocialDirectoryUpinfo upinfo = new SocialDirectoryUpinfo();
|
||||
if (value.equals("1305")) {
|
||||
flag = line_array[6];
|
||||
String code = line_array[0];
|
||||
|
|
@ -57,6 +66,13 @@ public class SocialItemService extends BaseService {
|
|||
socialItem.setName(line_array[9]);
|
||||
socialItem.setVersionName(line_array[15]);
|
||||
socialItem.setUnit(line_array[1]);
|
||||
//upinfo表数据
|
||||
upinfo.setCode(code);
|
||||
upinfo.setBegndate(line_array[11]!=null &&!line_array[11].isEmpty()? DateUtil.getDateTime(line_array[11]):null);
|
||||
upinfo.setEnddate(line_array[12]!=null &&!line_array[12].isEmpty()?DateUtil.getDateTime(line_array[12]):null);
|
||||
upinfo.setRid(new BigInteger(line_array[13]));
|
||||
upinfoList.add(upinfo);
|
||||
|
||||
} else if (value.equals("1321")) {
|
||||
flag = line_array[13];
|
||||
String code = line_array[2];
|
||||
|
|
@ -82,9 +98,14 @@ public class SocialItemService extends BaseService {
|
|||
QueryWrapper<SocialItem> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("code", codeList);
|
||||
socialItemMapper.delete(queryWrapper);
|
||||
|
||||
QueryWrapper<SocialDirectoryUpinfo> upinfoQueryWrapper = new QueryWrapper<>();
|
||||
upinfoQueryWrapper.in("code", codeList);
|
||||
socialDirectoryUpinfoMapper.delete(upinfoQueryWrapper);
|
||||
}
|
||||
|
||||
socialItemMapper.insert(list, 100);
|
||||
socialDirectoryUpinfoMapper.insertOrUpdate(upinfoList, 100);
|
||||
|
||||
return next_version_name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ public class SocialReconciliationService extends BaseService {
|
|||
inData.setInsutype(dto.getInsuranceType());
|
||||
inData.setClr_type(dto.getReconciliationType());
|
||||
inData.setSetl_optins(dto.getHandlingInstitution());
|
||||
inData.setStmt_begndate(dto.getBeginTime().toString());
|
||||
inData.setStmt_enddate(dto.getEndTime().toString());
|
||||
inData.setStmt_begndate(dto.getBeginTime().format(FORMATTER));
|
||||
inData.setStmt_enddate(dto.getEndTime().format(FORMATTER));
|
||||
inData.setMedfee_sumamt(dto.getTotalMedicalCost());
|
||||
inData.setFund_pay_sumamt(dto.getTotalFundPayment());
|
||||
inData.setAcct_pay(dto.getTotalPersonalAccountPayment());
|
||||
|
|
@ -223,13 +223,14 @@ public class SocialReconciliationService extends BaseService {
|
|||
IM3202.Data inData = new IM3202.Data();
|
||||
inData.setSetl_optins(dto.getHandlingInstitution());
|
||||
inData.setFile_qury_no(om9101.getFile_qury_no());
|
||||
inData.setStmt_begndate(dto.getBeginTime().toString());
|
||||
inData.setStmt_enddate(dto.getEndTime().toString());
|
||||
inData.setStmt_begndate(dto.getBeginTime().format(FORMATTER));
|
||||
inData.setStmt_enddate(dto.getEndTime().format(FORMATTER));
|
||||
inData.setMedfee_sumamt(dto.getTotalMedicalCost());
|
||||
inData.setFund_pay_sumamt(dto.getTotalFundPayment());
|
||||
inData.setCash_payamt(new BigDecimal(0));
|
||||
inData.setFixmedins_setl_cnt(BigDecimal.valueOf(dto.getSettlementCount()));
|
||||
inData.setRefd_setl_flag("0");
|
||||
inData.setClr_type(config.get("social", "medType"));
|
||||
|
||||
im3202.setData(inData);
|
||||
OM3202 om3202 = socialRequest.call3202(im3202);
|
||||
Map<String, Object> input_dw = new HashMap<>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue