|
@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
import com.yihu.jw.doctor.dao.BaseDoctorDao;
|
|
import com.yihu.jw.door.dao.*;
|
|
import com.yihu.jw.door.dao.*;
|
|
import com.yihu.jw.door.util.MessageUtil;
|
|
import com.yihu.jw.door.util.MessageUtil;
|
|
|
|
import com.yihu.jw.door.util.StreamUtil;
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
|
|
import com.yihu.jw.entity.base.im.ConsultDo;
|
|
import com.yihu.jw.entity.base.im.ConsultDo;
|
|
import com.yihu.jw.entity.base.im.ConsultTeamDo;
|
|
import com.yihu.jw.entity.base.im.ConsultTeamDo;
|
|
@ -23,7 +24,6 @@ import com.yihu.jw.util.date.DateUtil;
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
import jxl.Workbook;
|
|
import jxl.Workbook;
|
|
import jxl.write.*;
|
|
import jxl.write.*;
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
|
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
|
|
import org.jsoup.Jsoup;
|
|
import org.jsoup.Jsoup;
|
|
@ -32,7 +32,6 @@ import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@ -544,25 +543,7 @@ public class DoorOrderService {
|
|
logger.error(e.getMessage());
|
|
logger.error(e.getMessage());
|
|
}
|
|
}
|
|
// 待接单消息设为已操作, 434 医生接单-- 王五接受了服务工单12345678
|
|
// 待接单消息设为已操作, 434 医生接单-- 王五接受了服务工单12345678
|
|
List<SystemMessageDO> messages = systemMessageDao.queryByRelationCodeAndTypeIn(orderId,new String[]{"403","407"});
|
|
|
|
if (CollectionUtils.isEmpty(messages)){
|
|
|
|
logger.error("当前工单没有医生待接单消息!orderId:" + orderId);
|
|
|
|
}else {
|
|
|
|
messages.forEach(message->{
|
|
|
|
systemMessageDao.orderMessageDel(message.getReceiver(),message.getRelationCode());
|
|
|
|
if (message.getType().equals("403") ) {
|
|
|
|
BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doorServiceOrder.getDispatcher());//·
|
|
|
|
String msg=doorServiceOrder.getDispatcherName() + "接受了服务工单"+ doorServiceOrder.getNumber();
|
|
|
|
messageUtil.saveSystemMessage(message.getId(),message.getRelationCode(),"医生接单","434",doorServiceOrder.getDoctor(),doorServiceOrder.getDoctorName(),
|
|
|
|
doorServiceOrder.getDispatcher(),doorServiceOrder.getDispatcherName(),null,msg,message.getOver());
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
message.setOver("0");
|
|
|
|
systemMessageDao.save(message);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
messageUtil.updateMessage(doorServiceOrder,new String[]{"403","407"},"434",null,null);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@ -586,15 +567,7 @@ public class DoorOrderService {
|
|
BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doorServiceOrder.getDispatcher());//·
|
|
BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doorServiceOrder.getDispatcher());//·
|
|
this.createMessage("服务工单拒单待重新派单","404","system","system", doorServiceOrder.getId(), doorServiceOrder.getDispatcher(),baseDoctorDO.getName() , null,doorServiceOrder.getDoctorName() + "拒绝了" + doorServiceOrder.getProxyPatientName() + "的服务预约申请,请重新派单");
|
|
this.createMessage("服务工单拒单待重新派单","404","system","system", doorServiceOrder.getId(), doorServiceOrder.getDispatcher(),baseDoctorDO.getName() , null,doorServiceOrder.getDoctorName() + "拒绝了" + doorServiceOrder.getProxyPatientName() + "的服务预约申请,请重新派单");
|
|
// 调度员-派单-实时工单消息:435 医生拒单-- 王五拒绝了服务工单12345678
|
|
// 调度员-派单-实时工单消息:435 医生拒单-- 王五拒绝了服务工单12345678
|
|
List<SystemMessageDO> messages = systemMessageDao.queryByRelationCodeAndTypeIn(orderId,new String[]{"431","433"});
|
|
|
|
if (CollectionUtils.isEmpty(messages)) {
|
|
|
|
logger.error("当前工单没有医生待接单消息!orderId:" + orderId);
|
|
|
|
} else {
|
|
|
|
SystemMessageDO message = messages.get(0);
|
|
|
|
String msg=doorServiceOrder.getDoctorName() + "拒绝了服务工单" + doorServiceOrder.getNumber() + ", 请重新派单";
|
|
|
|
messageUtil.saveSystemMessage(message.getId(),message.getRelationCode(),"医生拒单","435",doorServiceOrder.getDoctor(),doorServiceOrder.getDoctorName(),
|
|
|
|
doorServiceOrder.getDispatcher(),doorServiceOrder.getDispatcherName(),null,msg,message.getOver());
|
|
|
|
}
|
|
|
|
|
|
messageUtil.updateMessage(doorServiceOrder,new String[]{"431","433"},"435",null,null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
doorServiceOrder.setDoctor(null);
|
|
doorServiceOrder.setDoctor(null);
|
|
@ -618,17 +591,9 @@ public class DoorOrderService {
|
|
messageDO.setRelationCode(relationCode);
|
|
messageDO.setRelationCode(relationCode);
|
|
messageDO.setReceiver(Receiver);
|
|
messageDO.setReceiver(Receiver);
|
|
messageDO.setReceiverName(ReceiverName);
|
|
messageDO.setReceiverName(ReceiverName);
|
|
net.sf.json.JSONObject data = new net.sf.json.JSONObject();
|
|
|
|
data.put("name", ReceiverName);
|
|
|
|
data.put("age", IdCardUtil.getAgeForIdcard(idCard));
|
|
|
|
try {
|
|
|
|
data.put("gender", IdCardUtil.getSexForIdcard(idCard));
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
data.put("msg", msg);
|
|
|
|
messageDO.setData(msg);
|
|
messageDO.setData(msg);
|
|
messageDO.setDel("1");
|
|
messageDO.setDel("1");
|
|
|
|
messageDO.setOver("1");
|
|
messageDO.setCreateTime(new Date());
|
|
messageDO.setCreateTime(new Date());
|
|
systemMessageDao.save(messageDO);
|
|
systemMessageDao.save(messageDO);
|
|
}
|
|
}
|
|
@ -804,15 +769,14 @@ public class DoorOrderService {
|
|
}
|
|
}
|
|
|
|
|
|
public void doorOrderOutExcel(String orderId,String patientName,String patientPhone,String hospitalCode,
|
|
public void doorOrderOutExcel(String orderId,String patientName,String patientPhone,String hospitalCode,
|
|
Integer status,String createTimeStart,String createTimeEnd,String serverDoctorName,String doctorCode,Integer examPaperStatus, HttpServletResponse response)throws Exception{
|
|
|
|
|
|
Integer[] status,String createTimeStart,String createTimeEnd,String serverDoctorName,String doctorCode,Integer examPaperStatus, HttpServletResponse response)throws Exception{
|
|
WritableWorkbook book = null;
|
|
WritableWorkbook book = null;
|
|
OutputStream os = null;
|
|
OutputStream os = null;
|
|
try {
|
|
try {
|
|
String sql = "select DISTINCT o.id as orderId,o.number,o.status,f.hospital,f.hospital_name as hospitalName1,o.is_trans_other_org," +
|
|
|
|
" o.transed_org_code,h.name as hospitalName2,o.patient_name,f.idcard,o.doctor_sign_time,o.total_fee," +
|
|
|
|
|
|
String sql = "select DISTINCT o.id as orderId,o.number,o.status,o.is_trans_other_org," +
|
|
|
|
" o.transed_org_code,o.patient_name,p.idcard,o.doctor_sign_time,o.total_fee," +
|
|
" o.patient_phone,o.remark,o.create_time,o.patient as patientCode from wlyy_door_service_order o " +
|
|
" o.patient_phone,o.remark,o.create_time,o.patient as patientCode from wlyy_door_service_order o " +
|
|
" LEFT JOIN wlyy_sign_family f ON f.patient = o.patient AND f. STATUS = 1 AND f.expenses_status = 1 " +
|
|
|
|
" LEFT JOIN base_org h on h.code=o.transed_org_code and h.del=1 " ;
|
|
|
|
|
|
" LEFT JOIN base_patient p on p.id=o.patient " ;
|
|
if(!StringUtils.isEmpty(serverDoctorName)){
|
|
if(!StringUtils.isEmpty(serverDoctorName)){
|
|
sql+=" RIGHT JOIN wlyy_door_doctor d on d.order_id = o.id";
|
|
sql+=" RIGHT JOIN wlyy_door_doctor d on d.order_id = o.id";
|
|
}
|
|
}
|
|
@ -827,13 +791,15 @@ public class DoorOrderService {
|
|
if (!StringUtils.isEmpty(patientPhone)) {
|
|
if (!StringUtils.isEmpty(patientPhone)) {
|
|
sql += " and o.patient_phone ='" + patientPhone + "'";
|
|
sql += " and o.patient_phone ='" + patientPhone + "'";
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(hospitalCode) && !hospitalCode.contains("%")) {
|
|
|
|
sql += " and (f.hospital = '" + hospitalCode + "' or o.transed_org_code='" + hospitalCode + "') ";
|
|
|
|
|
|
/* if (StringUtils.isNotBlank(hospitalCode) && !hospitalCode.contains("%")) {
|
|
|
|
// sql += " and (h.code = '" + hospitalCode + "' or o.transed_org_code='" + hospitalCode + "') ";
|
|
|
|
sql += " and ( o.transed_org_code='" + hospitalCode + "') ";
|
|
}else if(StringUtils.isNotBlank(hospitalCode) && hospitalCode.contains("%")){
|
|
}else if(StringUtils.isNotBlank(hospitalCode) && hospitalCode.contains("%")){
|
|
sql += " and (f.hospital like '" + hospitalCode + "' or o.transed_org_code like '" + hospitalCode + "') ";
|
|
|
|
}
|
|
|
|
|
|
// sql += " and (h.code like '" + hospitalCode + "' or o.transed_org_code like '" + hospitalCode + "') ";
|
|
|
|
sql += " and ( o.transed_org_code like '" + hospitalCode + "') ";
|
|
|
|
}*/
|
|
if (status != null) {
|
|
if (status != null) {
|
|
sql += " and o.status ='" + status + "'";
|
|
|
|
|
|
sql += " and o.status in ("+StringUtils.strip(Arrays.toString(status),"[]")+") ";
|
|
}
|
|
}
|
|
if (!StringUtils.isEmpty(createTimeStart)) {
|
|
if (!StringUtils.isEmpty(createTimeStart)) {
|
|
sql += " and o.create_time >='" + createTimeStart + "'";
|
|
sql += " and o.create_time >='" + createTimeStart + "'";
|
|
@ -923,14 +889,7 @@ public class DoorOrderService {
|
|
sheet.addCell(new Label(1, b + 1, statusName,cellFormat));//工单状态
|
|
sheet.addCell(new Label(1, b + 1, statusName,cellFormat));//工单状态
|
|
//工单是否转给其他机构,0-不转,1-已转
|
|
//工单是否转给其他机构,0-不转,1-已转
|
|
String transOtherOrg = list.get(i).get("is_trans_other_org") + "";
|
|
String transOtherOrg = list.get(i).get("is_trans_other_org") + "";
|
|
String hospitalName = null;
|
|
|
|
if ("0".equals(transOtherOrg)) {
|
|
|
|
hospitalName = list.get(i).get("hospitalName1") + "";//签约表中的机构
|
|
|
|
} else if ("1".equals(transOtherOrg)) {
|
|
|
|
hospitalName = list.get(i).get("hospitalName2") + "";//转机构中的机构
|
|
|
|
}else if("null".equals(transOtherOrg)){
|
|
|
|
hospitalName = list.get(i).get("hospitalName1") + "";//签约表中的机构
|
|
|
|
}
|
|
|
|
|
|
String hospitalName = "泰安市中医医院";
|
|
|
|
|
|
sheet.addCell(new Label(2, b + 1, hospitalName,cellFormat));//服务机构
|
|
sheet.addCell(new Label(2, b + 1, hospitalName,cellFormat));//服务机构
|
|
Date createTime = (Date) list.get(i).get("create_time");
|
|
Date createTime = (Date) list.get(i).get("create_time");
|
|
@ -1080,8 +1039,7 @@ public class DoorOrderService {
|
|
// 更新记录
|
|
// 更新记录
|
|
this.setUpdateColumnInfo(one);
|
|
this.setUpdateColumnInfo(one);
|
|
doorServiceOrderDao.save(one);
|
|
doorServiceOrderDao.save(one);
|
|
// 更新居民签约服务包服务项次数
|
|
|
|
this.reduceServiceItemTimes(serverPackagePriceByOrderId(orderId), one.getPatient());
|
|
|
|
|
|
|
|
// 发送微信消息通知--用户评价//·
|
|
// 发送微信消息通知--用户评价//·
|
|
BasePatientDO patient = patientInfoService.findById(one.getPatient());
|
|
BasePatientDO patient = patientInfoService.findById(one.getPatient());
|
|
// 获取微信模板 fwyspf-服务医生评分
|
|
// 获取微信模板 fwyspf-服务医生评分
|
|
@ -1285,13 +1243,6 @@ public class DoorOrderService {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
BigDecimal serverPackagePrice = new BigDecimal("0.00");
|
|
BigDecimal serverPackagePrice = new BigDecimal("0.00");
|
|
BigDecimal cashPrice = new BigDecimal("0.00");
|
|
BigDecimal cashPrice = new BigDecimal("0.00");
|
|
//获取居民签约服务项及次数
|
|
|
|
// SignFamily signFamily = signFamilyDao.findByPatient(patient);
|
|
|
|
String sql = "SELECT ip.service_item_code as itemCode, sum(ip.service_times) as times FROM wlyy_server_package_patient pp , wlyy_server_package_item_patient ip " +
|
|
|
|
"where pp.`code` = ip.server_package_patient_code and pp.patient = '" + patient + "' and pp.hospital = '" + "" + "' and pp.`status` = 1 " +
|
|
|
|
// "where pp.`code` = ip.server_package_patient_code and pp.patient = '" + patient + "' and pp.hospital = '" + signFamily.getHospital() + "' and pp.`status` = 1 " +
|
|
|
|
"GROUP BY ip.service_item_code ";
|
|
|
|
List<Map<String, Object>> list =jdbcTemplate.query(sql, new BeanPropertyRowMapper(String.class));
|
|
|
|
|
|
|
|
JSONArray jsonArray = JSONArray.parseArray(jsonData);
|
|
JSONArray jsonArray = JSONArray.parseArray(jsonData);
|
|
for(Object o : jsonArray){
|
|
for(Object o : jsonArray){
|
|
@ -1301,67 +1252,13 @@ public class DoorOrderService {
|
|
String itemCode = jsonObject.getString("itemCode");
|
|
String itemCode = jsonObject.getString("itemCode");
|
|
BigDecimal fee = jsonObject.getBigDecimal("fee");
|
|
BigDecimal fee = jsonObject.getBigDecimal("fee");
|
|
BigDecimal number = jsonObject.getBigDecimal("number");
|
|
BigDecimal number = jsonObject.getBigDecimal("number");
|
|
//遍历是否是居民签约的服务项,如果是,看还剩多少次数
|
|
|
|
for(Map<String, Object> m : list){
|
|
|
|
if((m.get(itemCode) + "").equals(itemCode)){
|
|
|
|
b = true;
|
|
|
|
times = (BigDecimal)map.get("times");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//判断服务包里面的次数是否够抵扣,不够的仍需支付
|
|
|
|
if(b){
|
|
|
|
if(times.compareTo(number) > -1) {
|
|
|
|
serverPackagePrice = serverPackagePrice.add(fee.multiply(number));
|
|
|
|
}else {
|
|
|
|
//还需另外支付次数
|
|
|
|
BigDecimal t = number.subtract(times);
|
|
|
|
cashPrice = cashPrice.add(fee.multiply(t));
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
cashPrice = cashPrice.add(fee.multiply(number));
|
|
|
|
}
|
|
|
|
|
|
cashPrice = cashPrice.add(fee.multiply(number));
|
|
}
|
|
}
|
|
map.put("serverPackagePrice", serverPackagePrice);
|
|
map.put("serverPackagePrice", serverPackagePrice);
|
|
map.put("cashPrice", cashPrice);
|
|
map.put("cashPrice", cashPrice);
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
* 更新居民签约服务包服务项次数
|
|
|
|
* @param itemInfo 格式[{"itemCode":"","fee":"","number":""}]
|
|
|
|
* @param patient 居民code
|
|
|
|
*/
|
|
|
|
public void reduceServiceItemTimes(String itemInfo, String patient){
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
//获取居民签约服务项及次数
|
|
|
|
// SignFamily signFamily = signFamilyDao.findByPatient(patient);
|
|
|
|
String sql = "SELECT ip.`code`,ip.service_item_code as itemCode, ip.service_times as times FROM wlyy_server_package_patient pp , wlyy_server_package_item_patient ip " +
|
|
|
|
// "where pp.`code` = ip.server_package_patient_code and pp.patient = '" + patient + "' and pp.hospital = '" + signFamily.getHospital() + "' and pp.`status` = 1 " +
|
|
|
|
"where pp.`code` = ip.server_package_patient_code and pp.patient = '" + patient + "' and pp.hospital = '" + "" + "' and pp.`status` = 1 " +
|
|
|
|
"order BY pp.end_time ";
|
|
|
|
List<Map<String, Object>> list =jdbcTemplate.query(sql, new BeanPropertyRowMapper(String.class));
|
|
|
|
|
|
|
|
JSONArray jsonArray = JSONArray.parseArray(itemInfo);
|
|
|
|
for(Object o : jsonArray) {
|
|
|
|
JSONObject jsonObject = (JSONObject) o;
|
|
|
|
String itemCode = jsonObject.getString("itemCode");
|
|
|
|
Integer number = jsonObject.getInteger("number");
|
|
|
|
//遍历是否是居民签约的服务项,如果是,看服务项次数够不够减,不够减的继续遍历其他服务项,够减则跳出循环更新次数
|
|
|
|
for (Map<String, Object> m : list) {
|
|
|
|
if ((m.get(itemCode) + "").equals(itemCode)) {
|
|
|
|
String itemPatientCode = map.get("code") + "";
|
|
|
|
Integer times = (Integer) map.get("times");
|
|
|
|
if (number <= times) {
|
|
|
|
// serverPackageItemPatientDao.updateTimesByCode(itemPatientCode, times - number);
|
|
|
|
break;
|
|
|
|
} else {
|
|
|
|
// serverPackageItemPatientDao.updateTimesByCode(itemPatientCode, 0);
|
|
|
|
number -= times;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取订单下服务包数量、单价
|
|
* 获取订单下服务包数量、单价
|
|
@ -1559,6 +1456,7 @@ public class DoorOrderService {
|
|
html = html.replace("${diagnosticrecord}", conclusionDO.getDiagnosticRecord() == null ? "" : conclusionDO.getDiagnosticRecord());
|
|
html = html.replace("${diagnosticrecord}", conclusionDO.getDiagnosticRecord() == null ? "" : conclusionDO.getDiagnosticRecord());
|
|
html = html.replace("${examresult}",conclusionDO.getExamResult() == null ? "" : conclusionDO.getExamResult());
|
|
html = html.replace("${examresult}",conclusionDO.getExamResult() == null ? "" : conclusionDO.getExamResult());
|
|
String imgsString = "";
|
|
String imgsString = "";
|
|
|
|
|
|
if(StringUtils.isNotBlank(conclusionDO.getImgs())) {
|
|
if(StringUtils.isNotBlank(conclusionDO.getImgs())) {
|
|
String imgs = conclusionDO.getImgs();
|
|
String imgs = conclusionDO.getImgs();
|
|
String[] imgsArray;
|
|
String[] imgsArray;
|
|
@ -1660,11 +1558,13 @@ public class DoorOrderService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
public File writeWordFile(List<String> orderId,HttpServletResponse response) throws Exception {
|
|
|
|
String zipFileName = "服务小结";
|
|
|
|
long time = System.currentTimeMillis();
|
|
|
|
String exportConclusionList = time+"exportList";
|
|
|
|
String path = this.getClass().getResource("/").getPath() + exportConclusionList;
|
|
|
|
|
|
public File writeWordFile(List<String> orderId,HttpServletResponse response,String doctorCode) throws Exception {
|
|
|
|
String zipFileName = "service_summary";
|
|
|
|
String exportConclusionList = doctorCode+"exportList";
|
|
|
|
String path = System.getProperty("user.dir") +"/service_summary/" + exportConclusionList;
|
|
|
|
|
|
|
|
System.out.println("path :" +path);
|
|
|
|
|
|
File file = new File(path);
|
|
File file = new File(path);
|
|
// 删除文件夹、文件
|
|
// 删除文件夹、文件
|
|
if (file.exists()) {
|
|
if (file.exists()) {
|
|
@ -1691,11 +1591,15 @@ public class DoorOrderService {
|
|
fileName = java.net.URLEncoder.encode(fileName,"UTF-8");
|
|
fileName = java.net.URLEncoder.encode(fileName,"UTF-8");
|
|
fileName = java.net.URLDecoder.decode(fileName,"UTF-8");
|
|
fileName = java.net.URLDecoder.decode(fileName,"UTF-8");
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
|
String pathName = this.getClass().getResource("/").getPath() + "conclusion.mht";
|
|
|
|
System.out.println("路径pathName:" + pathName);
|
|
|
|
Document doc = Jsoup.parse(new File(pathName), "UTF-8");
|
|
|
|
|
|
// String pathName = this.getClass().getResource("/").getPath() + "conclusion.mht";
|
|
|
|
// System.out.println("路径pathName:" + pathName);
|
|
|
|
// Document doc = Jsoup.parse(new File(pathName), "UTF-8");
|
|
|
|
Document doc = Jsoup.parse(StreamUtil.readResources());
|
|
|
|
|
|
String html = this.handleData(doc, orderId.get(i));//16
|
|
String html = this.handleData(doc, orderId.get(i));//16
|
|
|
|
|
|
BufferedWriter bw = new BufferedWriter(new FileWriter(path+"/"+fileName));//创建的文件
|
|
BufferedWriter bw = new BufferedWriter(new FileWriter(path+"/"+fileName));//创建的文件
|
|
|
|
|
|
bw.write(html);
|
|
bw.write(html);
|
|
bw.close();
|
|
bw.close();
|
|
File zipFile = new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
|
|
File zipFile = new File(path.replace(exportConclusionList, "") + zipFileName + ".zip");
|
|
@ -1710,6 +1614,15 @@ public class DoorOrderService {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
String str = "file:/data/wlyy2.0/svr-door-service/svr-door-service.jar!/BOOT-INF/classes!/1609894996524exportList/";
|
|
|
|
String c2=str.substring(0,str.indexOf("!"));// !前面的
|
|
|
|
String c1=str.substring(str.lastIndexOf("!")+1);// !後面的
|
|
|
|
String cc = c2 + c1 ;
|
|
|
|
System.out.println(cc.replace("svr-door-service.jar/",""));
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 打包文件夹
|
|
* 打包文件夹
|
|
*
|
|
*
|
|
@ -1807,12 +1720,11 @@ public class DoorOrderService {
|
|
public List<Map<String,Object>> getOrderIdList(Integer status,String doctorCode){
|
|
public List<Map<String,Object>> getOrderIdList(Integer status,String doctorCode){
|
|
String sqlList = "select DISTINCT o.id as orderId";
|
|
String sqlList = "select DISTINCT o.id as orderId";
|
|
String sql = " from wlyy_door_service_order o " +
|
|
String sql = " from wlyy_door_service_order o " +
|
|
" LEFT JOIN wlyy_sign_family f ON f.patient = o.patient AND f. STATUS = 1 AND f.expenses_status = 1 " +
|
|
|
|
" LEFT JOIN base_org h on h.code=o.hospital and h.del=1 "
|
|
" LEFT JOIN base_org h on h.code=o.hospital and h.del=1 "
|
|
+" LEFT JOIN wlyy_door_doctor d on d.order_id = o.id ";
|
|
+" LEFT JOIN wlyy_door_doctor d on d.order_id = o.id ";
|
|
sql+= " where 1=1 ";
|
|
sql+= " where 1=1 ";
|
|
if(status == 6){//已完成状态
|
|
if(status == 6){//已完成状态
|
|
sql+=" and o.status ='"+status+"'";
|
|
|
|
|
|
sql+=" and o.status in (5,6) ";
|
|
}else {//5是待补录状态
|
|
}else {//5是待补录状态
|
|
sql+=" and o.conclusion_status =1 ";
|
|
sql+=" and o.conclusion_status =1 ";
|
|
}
|
|
}
|