Compare commits
No commits in common. "c959b4292f1798aacadd731af7602568a6d44729" and "e0ce8e5a68430da02144469cd8426591887a6046" have entirely different histories.
c959b4292f
...
e0ce8e5a68
|
|
@ -188,7 +188,7 @@ public class SocialRequest {
|
|||
}
|
||||
|
||||
public OM2207A call2207A(IM2207A im2207A) {
|
||||
JSONObject data = httpUtil.callBackMsgId("2207A",im2207A.buildToMap(),10000);
|
||||
JSONObject data = httpUtil.callBackMsgId("2207A",im2207A.buildToMap());
|
||||
OM2207A om2207A=new OM2207A();
|
||||
om2207A.setMsgId(data.get("msgid").toString());
|
||||
om2207A.setSetlinfo(JSONObject.parseObject(data.get("setlinfo").toString(), OM2207A.Setlinfo.class));
|
||||
|
|
@ -227,7 +227,7 @@ public class SocialRequest {
|
|||
|
||||
|
||||
public void call3506(IM3506 im3506) {
|
||||
httpUtil.callBackMsgId("3506", im3506.buildToMap(),10000);
|
||||
httpUtil.callBackMsgId("3506", im3506.buildToMap());
|
||||
}
|
||||
|
||||
public void call2202(IM2202 im2202) {
|
||||
|
|
@ -235,9 +235,8 @@ public class SocialRequest {
|
|||
}
|
||||
|
||||
public OM2208 call2208(IM2208 im2208) {
|
||||
JSONObject jsonObject = httpUtil.callBackMsgId("2208", "data", im2208.buildToMap(), 10000);
|
||||
JSONObject jsonObject = httpUtil.call("2208", "data", im2208.buildToMap(), 10000);
|
||||
OM2208 om2208=new OM2208();
|
||||
om2208.setMsgId(jsonObject.get("msgid").toString());
|
||||
om2208.setSetlinfo(JSONObject.parseObject(jsonObject.get("setlinfo").toString(), OM2208.Setlinfo.class));
|
||||
om2208.setSetldetail(JSONArray.parseArray(jsonObject.get("setldetail").toString(), OM2208.Setldetail.class));
|
||||
return om2208;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ public class HttpUtil {
|
|||
logger.info("上个版本号:" + pre_version_name);
|
||||
JSONObject result = null;
|
||||
try {
|
||||
result = callBackMsgId(infno, "data", input,10000);
|
||||
result = callBackMsgId(infno, "data", input);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -217,22 +217,19 @@ public class HttpUtil {
|
|||
JSONObject output = post(config.get("social", "url"), JSON.toJSONString(getparms(infno, tag, input)),timeout);
|
||||
return output;
|
||||
}
|
||||
|
||||
public JSONObject callBackMsgId(String infno, Map<String, Object> input,int timeout) {
|
||||
public JSONObject callBackMsgId(String infno, Map<String, Object> input) {
|
||||
Map<String, Object> parmsMap = getparms(infno, input);
|
||||
return callBackMsgIdDo(parmsMap);
|
||||
}
|
||||
public JSONObject callBackMsgId(String infno, String tag, Map<String, Object> input,int timeout) {
|
||||
Map<String, Object> parmsMap = getparms(infno,tag, input);
|
||||
return callBackMsgIdDo(parmsMap);
|
||||
}
|
||||
public JSONObject callBackMsgIdDo(Map<String,Object> parmsMap) {
|
||||
String msgId =parmsMap.get("msgid").toString();
|
||||
|
||||
JSONObject output = post(config.get("social", "url"), JSON.toJSONString(parmsMap));
|
||||
output.put("msgid",msgId);
|
||||
return output;
|
||||
}
|
||||
public JSONObject callBackMsgId(String infno, String tag, Map<String, Object> input) {
|
||||
|
||||
JSONObject output = post(config.get("social", "url"), JSON.toJSONString(getparms(infno, tag, input)));
|
||||
return output;
|
||||
}
|
||||
public JSONObject callWithOutLog(String infno, String tag, Map<String, Object> input) {
|
||||
|
||||
JSONObject output = post(config.get("social", "url"), JSON.toJSONString(getparms(infno, tag, input)));
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ public class ChargeController extends BaseController {
|
|||
*/
|
||||
@RequestMapping("/refund")
|
||||
public Result<Object> refund() {
|
||||
String changeOrderCode = parmsUtil.getString("changeOrderCode","订单号为空");
|
||||
String changeOrderCode = parmsUtil.getString("changeOrderCode");
|
||||
chargeService.refund(changeOrderCode);
|
||||
return success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
|
|||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-05-16
|
||||
* @since 2025-05-12
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -120,7 +120,4 @@ public class ChargeSocialPayLog implements Serializable {
|
|||
|
||||
@ApiModelProperty("证件号码")
|
||||
private String certno;
|
||||
|
||||
@ApiModelProperty("医疗费总额")
|
||||
private BigDecimal medfeeSumamt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import lombok.Setter;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
@ -27,8 +26,8 @@ public class ReconciliationItemDto {
|
|||
// 对账结果
|
||||
private String reconciliationResult;
|
||||
//对账开始时间
|
||||
private LocalDateTime beginTime;
|
||||
private LocalDate beginTime;
|
||||
//对账结束时间
|
||||
private LocalDateTime endTime;
|
||||
private LocalDate endTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -820,7 +820,6 @@ public class ChargeService extends BaseService {
|
|||
socialPayLog.setMsgid(om2102A.getMsgId());
|
||||
socialPayLog.setChargeType(ChargeTypeEnum.CHARGE.getChargeType());
|
||||
socialPayLog.setOriginalBalc(setlinfo.getBalc().add(setlinfo.getAcct_pay()));
|
||||
socialPayLog.setMedfeeSumamt(setlinfo.getMedfee_sumamt());
|
||||
chargeSocialPayLogMapper.insert(socialPayLog);
|
||||
}
|
||||
|
||||
|
|
@ -860,7 +859,6 @@ public class ChargeService extends BaseService {
|
|||
socialPayLog.setMsgid(om2208.getMsgId());
|
||||
socialPayLog.setChargeType(ChargeTypeEnum.REFUND.getChargeType());
|
||||
socialPayLog.setOriginalBalc(setlinfo.getBalc().add(payLog.getAcctPay()));
|
||||
socialPayLog.setMedfeeSumamt(setlinfo.getMedfee_sumamt());
|
||||
chargeSocialPayLogMapper.insert(socialPayLog);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,9 +136,6 @@ public class PatientInfoService extends BaseService {
|
|||
}
|
||||
Integer beforeIntegral = patientInfo.getIntegralBalance();
|
||||
Integer finalIntegral = beforeIntegral + addIntegral;
|
||||
if (finalIntegral < 0){
|
||||
throw new MessageException("剩余积分积分不足");
|
||||
}
|
||||
PatientInfo updatePatient = new PatientInfo();
|
||||
updatePatient.setId(patientId);
|
||||
updatePatient.setIntegralBalance(finalIntegral);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import com.syjiaer.clinic.server.common.api.output.OM3202;
|
|||
import com.syjiaer.clinic.server.common.api.output.OM9101;
|
||||
import com.syjiaer.clinic.server.common.api.request.SocialRequest;
|
||||
import com.syjiaer.clinic.server.common.config.Config;
|
||||
import com.syjiaer.clinic.server.common.enums.ChargeTypeEnum;
|
||||
import com.syjiaer.clinic.server.common.exception.MessageException;
|
||||
import com.syjiaer.clinic.server.common.util.FileUtil;
|
||||
import com.syjiaer.clinic.server.common.util.HttpUtil;
|
||||
|
|
@ -34,7 +33,6 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SocialReconciliationService extends BaseService {
|
||||
|
|
@ -50,7 +48,6 @@ public class SocialReconciliationService extends BaseService {
|
|||
private Config config;
|
||||
@Autowired
|
||||
private HttpUtil httpUtil;
|
||||
|
||||
public List<ReconciliationItemVo> getList(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
QueryWrapper<ChargeSocialPayLog> clrQuery = new QueryWrapper<>();
|
||||
clrQuery.select("clr_type,insutype,clr_optins,count(0) as count");
|
||||
|
|
@ -79,7 +76,7 @@ public class SocialReconciliationService extends BaseService {
|
|||
vo.setHandlingInstitution(clr_optins);
|
||||
vo.setSettlementCount(logs.size());
|
||||
for (ChargeSocialPayLog log : logs){
|
||||
vo.setTotalMedicalCost(log.getMedfeeSumamt().add(vo.getTotalMedicalCost()));
|
||||
vo.setTotalMedicalCost(log.getPsnPartAmt().add(vo.getTotalMedicalCost()));
|
||||
vo.setTotalFundPayment(log.getFundPaySumamt().add(vo.getTotalFundPayment()));
|
||||
vo.setTotalPersonalAccountPayment(log.getAcctPay().add(vo.getTotalPersonalAccountPayment()));
|
||||
}
|
||||
|
|
@ -90,7 +87,6 @@ public class SocialReconciliationService extends BaseService {
|
|||
|
||||
/**
|
||||
* 对总账
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -111,8 +107,7 @@ public class SocialReconciliationService extends BaseService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 明细对账
|
||||
*
|
||||
* 明显对账
|
||||
* @param dto
|
||||
*/
|
||||
public List<ReconciliationDetailVo> detailDo(ReconciliationItemDto dto) {
|
||||
|
|
@ -140,17 +135,14 @@ public class SocialReconciliationService extends BaseService {
|
|||
//生成文件
|
||||
FileWriter writer = new FileWriter(file);
|
||||
for (ChargeSocialPayLog log : logs){
|
||||
String refd_setl_flag = "0";
|
||||
if (ChargeTypeEnum.REFUND.getChargeType().equals(log.getChargeType())){
|
||||
refd_setl_flag = "1";
|
||||
}
|
||||
//TODO 退费标志
|
||||
QueryWrapper<ChargeOrder> orderQuery = new QueryWrapper<>();
|
||||
orderQuery.eq("code",log.getChargeOrderCode());
|
||||
orderQuery.last("limit 1");
|
||||
ChargeOrder dbOrder = chargeOrderMapper.selectOne(orderQuery);
|
||||
String line = log.getSetlId()+"\t"+log.getMdtrtId()+"\t"+
|
||||
log.getPsnNo() + "\t" + log.getMedfeeSumamt() + "\t" + log.getFundPaySumamt() + "\t" + log.getAcctPay() + "\t"
|
||||
+ refd_setl_flag+ "\n";
|
||||
log.getPsnNo()+"\t"+dbOrder.getTotalPrice()+"\t"+log.getFundPaySumamt()+"\t" +log.getAcctPay()+"\t"
|
||||
+"0"+"\n";
|
||||
writer.write(line);
|
||||
}
|
||||
writer.flush();
|
||||
|
|
@ -208,13 +200,15 @@ public class SocialReconciliationService extends BaseService {
|
|||
log.error("创建文件失败");
|
||||
throw new MessageException("创建文件失败");
|
||||
|
||||
}catch (Exception e){
|
||||
log.error("未知错误",e);
|
||||
throw new MessageException("未知错误");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试明细对账
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<ReconciliationDetailVo> testDetailDo() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue