|
@@ -7,11 +7,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import thyyxxk.webserver.constants.sidicts.MedType;
|
|
|
import thyyxxk.webserver.dao.his.medicalinsurance.AutoUploadBillDao;
|
|
|
import thyyxxk.webserver.entity.querydata.AutoUploadBill;
|
|
|
+import thyyxxk.webserver.service.redislike.RedisLikeService;
|
|
|
import thyyxxk.webserver.utils.ListUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -23,6 +26,8 @@ import java.util.stream.Collectors;
|
|
|
*/
|
|
|
@Service
|
|
|
public class AutoUploadBillService extends ServiceImpl<AutoUploadBillDao,AutoUploadBill> {
|
|
|
+ @Resource
|
|
|
+ private RedisLikeService redisLikeService;
|
|
|
@Async
|
|
|
public void asyncSaveData(List<AutoUploadBill> list){
|
|
|
if(CollUtil.isNotEmpty(list)){
|
|
@@ -60,6 +65,20 @@ public class AutoUploadBillService extends ServiceImpl<AutoUploadBillDao,AutoUpl
|
|
|
condition =" join (select pat_no,times,ledger_sn ,max(created_date) created_date from t_auto_upload_bill group by pat_no,times,ledger_sn)t3 on t1.pat_no=t3.pat_no and t1.times=t3.times and t1.ledger_sn=t3.ledger_sn and t1.created_date=t3.created_date ";
|
|
|
}
|
|
|
List<AutoUploadBill> records = baseMapper.listPage(query, autoUploadBill.getCurrentPage(), autoUploadBill.getPageSize(),condition);
|
|
|
+ for(AutoUploadBill item : records){
|
|
|
+ item.setInsuplcAdmdvsName(redisLikeService.getRegionName(item.getInsuplcAdmdvs()));
|
|
|
+ if(item.getClrOptinsName() == null){
|
|
|
+ if("439900".equals(item.getClrOptins())){
|
|
|
+ item.setClrOptinsName("省本级");
|
|
|
+ }else if("430199".equals(item.getClrOptins())){
|
|
|
+ item.setClrOptinsName("市本级");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ MedType medType = MedType.get(item.getMedType());
|
|
|
+ if (null != medType) {
|
|
|
+ item.setMedTypeName(medType.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
page.setRecords(records);
|
|
|
Integer total = baseMapper.pageTotal(query,condition);
|
|
|
page.setTotal(total);
|