申请单状态调整
This commit is contained in:
parent
4622859a2b
commit
b1a3fdddce
@ -44,4 +44,5 @@ public class RegGetReportsList {
|
|||||||
private Date jssj;
|
private Date jssj;
|
||||||
private Date confirmtime;
|
private Date confirmtime;
|
||||||
private String lisgroup;
|
private String lisgroup;
|
||||||
|
private String barcode_zt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -199,7 +199,7 @@ public class RegInterfaceImpl {
|
|||||||
regTransitSample20.setAffirmUserName(affirmUserName);
|
regTransitSample20.setAffirmUserName(affirmUserName);
|
||||||
regTransitSample20.setStatus("20");
|
regTransitSample20.setStatus("20");
|
||||||
|
|
||||||
//regApply.setStatus("10");
|
regApply.setStatus("10");
|
||||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample20,null);
|
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample20,null);
|
||||||
break;
|
break;
|
||||||
case "30": //标本送检
|
case "30": //标本送检
|
||||||
@ -223,7 +223,7 @@ public class RegInterfaceImpl {
|
|||||||
regTransitSample.setStatus("30");
|
regTransitSample.setStatus("30");
|
||||||
|
|
||||||
List<RegTransitSample> collect = regTransitSampleList1.stream().filter(regTransitSample2 -> regTransitSample2.getStatus().equals("10") || regTransitSample2.getStatus().equals("20")).collect(Collectors.toList());
|
List<RegTransitSample> collect = regTransitSampleList1.stream().filter(regTransitSample2 -> regTransitSample2.getStatus().equals("10") || regTransitSample2.getStatus().equals("20")).collect(Collectors.toList());
|
||||||
if(collect.size() <= 0){
|
if(collect.size() <= 1){
|
||||||
//全部已送出, 修改状态
|
//全部已送出, 修改状态
|
||||||
regApply.setStatus("20");
|
regApply.setStatus("20");
|
||||||
}
|
}
|
||||||
@ -246,8 +246,16 @@ public class RegInterfaceImpl {
|
|||||||
regTransitSample50.setSignInUserName(signUserName);
|
regTransitSample50.setSignInUserName(signUserName);
|
||||||
regTransitSample50.setStatus("50");
|
regTransitSample50.setStatus("50");
|
||||||
|
|
||||||
|
List<RegTransitSample> collect3 = regTransitSampleList1.stream().filter(regTransitSample2 ->
|
||||||
|
regTransitSample2.getStatus().equals("10") ||
|
||||||
|
regTransitSample2.getStatus().equals("20") ||
|
||||||
|
regTransitSample2.getStatus().equals("30")).collect(Collectors.toList());
|
||||||
|
if(collect3.size() <= 1){
|
||||||
|
//全部已送出, 修改状态
|
||||||
|
regApply.setStatus("20");
|
||||||
|
}
|
||||||
//regApply.setStatus("20");
|
//regApply.setStatus("20");
|
||||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample50,null);
|
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample50,regApply);
|
||||||
break;
|
break;
|
||||||
case "60": //上机检测
|
case "60": //上机检测
|
||||||
break;
|
break;
|
||||||
@ -267,9 +275,7 @@ public class RegInterfaceImpl {
|
|||||||
regTransitSample70.setStatus("70");
|
regTransitSample70.setStatus("70");
|
||||||
|
|
||||||
List<RegTransitSample> collect1 = regTransitSampleList1.stream().filter(regTransitSample2 -> Integer.parseInt(regTransitSample2.getStatus()) < 70).collect(Collectors.toList());
|
List<RegTransitSample> collect1 = regTransitSampleList1.stream().filter(regTransitSample2 -> Integer.parseInt(regTransitSample2.getStatus()) < 70).collect(Collectors.toList());
|
||||||
if(collect1.size() >= 0){
|
if(collect1.size() <= 1){
|
||||||
regApply.setStatus("20");
|
|
||||||
}else{
|
|
||||||
regApply.setStatus("30");
|
regApply.setStatus("30");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +297,7 @@ public class RegInterfaceImpl {
|
|||||||
regTransitSample90.setStatus("90");
|
regTransitSample90.setStatus("90");
|
||||||
|
|
||||||
List<RegTransitSample> collect2 = regTransitSampleList1.stream().filter(regTransitSample2 -> Integer.parseInt(regTransitSample2.getStatus()) != 90).collect(Collectors.toList());
|
List<RegTransitSample> collect2 = regTransitSampleList1.stream().filter(regTransitSample2 -> Integer.parseInt(regTransitSample2.getStatus()) != 90).collect(Collectors.toList());
|
||||||
if(collect2.size() <= 0){
|
if(collect2.size() <= 1){
|
||||||
regApply.setStatus("40");
|
regApply.setStatus("40");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +1,80 @@
|
|||||||
package com.transitPlatForm.transitPF.service.impl;
|
package com.transitPlatForm.transitPF.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.transitPlatForm.common.core.domain.Result;
|
import com.transitPlatForm.common.core.domain.Result;
|
||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegReportFile;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegReportFile;
|
||||||
|
import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
|
||||||
|
import com.transitPlatForm.interfaceCommon.utils.LisUtil;
|
||||||
import com.transitPlatForm.transitPF.mapper.RegLisReportMapper;
|
import com.transitPlatForm.transitPF.mapper.RegLisReportMapper;
|
||||||
import com.transitPlatForm.transitPF.service.RegLisReportService;
|
import com.transitPlatForm.transitPF.service.RegLisReportService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class RegLisReportServiceImpl implements RegLisReportService {
|
public class RegLisReportServiceImpl implements RegLisReportService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
RegLisReportMapper regLisReportMapper;
|
RegLisReportMapper regLisReportMapper;
|
||||||
|
@Autowired
|
||||||
|
private CommonUtil commonUtil;
|
||||||
|
|
||||||
|
@Value("${transitInterface.postURL:}")
|
||||||
|
String postURL;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result printLisReport(String bgdh) {
|
public Result printLisReport(String bgdh) {
|
||||||
|
String isGetPdfdata = commonUtil.selectConfigByKey("IS_GET_PDFDATA");
|
||||||
|
if("1".equals(isGetPdfdata)){
|
||||||
|
//使用接口去查询数据
|
||||||
|
String jsonStr = "{\"method\":\"pdfData\",\"bgdh\":\""+bgdh+"\"}";
|
||||||
|
Result result = postHttp(jsonStr);
|
||||||
|
if(!result.getCode().equals("0")) return result;
|
||||||
|
return new Result("0","查询成功",LisUtil.isBank(result.getData()));
|
||||||
|
}
|
||||||
RegReportFile regReportFile = regLisReportMapper.getRegReportFile(bgdh);
|
RegReportFile regReportFile = regLisReportMapper.getRegReportFile(bgdh);
|
||||||
return new Result("0","查询成功",regReportFile);
|
return new Result("0","查询成功",regReportFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Result postHttp(String json){
|
||||||
|
String url = "";
|
||||||
|
String ret = "";
|
||||||
|
|
||||||
|
url = postURL;
|
||||||
|
|
||||||
|
log.info("调用地址:"+url);
|
||||||
|
//log.info("调用lis接口,入参:"+json);
|
||||||
|
try (HttpResponse httpResponse = HttpRequest.post(url)
|
||||||
|
.header("Content-Type", "application/json;charset=utf-8")
|
||||||
|
.body(json)
|
||||||
|
.execute()) {
|
||||||
|
int status = httpResponse.getStatus();
|
||||||
|
ret = httpResponse.body();
|
||||||
|
if(status != 200){
|
||||||
|
log.error("调用lis的http接口失败!"+ret);
|
||||||
|
return new Result("-1",ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e){
|
||||||
|
log.error("调用lis的http接口失败!"+e.getMessage());
|
||||||
|
return new Result("-1",e.getMessage());
|
||||||
|
}
|
||||||
|
log.info("调用lis的接口,入参:"+json+"\r\n出参:"+ret);
|
||||||
|
//解析出参
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(ret);
|
||||||
|
String resultCode = String.valueOf(jsonObject.get("resultCode"));
|
||||||
|
String message = String.valueOf(jsonObject.get("message"));
|
||||||
|
if(!resultCode.equals("0")){
|
||||||
|
return new Result("-1","调用lis接口失败:"+message);
|
||||||
|
}
|
||||||
|
return new Result("0","调用lis接口成功",message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,6 +38,8 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
|||||||
LisInterfaceUtil lisInterfaceUtil;
|
LisInterfaceUtil lisInterfaceUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
RequestInfoUtil requestInfoUtil;
|
RequestInfoUtil requestInfoUtil;
|
||||||
|
@Autowired
|
||||||
|
RegLisReportServiceImpl regLisReportServiceImpl;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -70,6 +72,9 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
|||||||
return regInterfaceImpl.delReport(jsonStr);
|
return regInterfaceImpl.delReport(jsonStr);
|
||||||
// case "test":
|
// case "test":
|
||||||
// return test();
|
// return test();
|
||||||
|
case "pdfData":
|
||||||
|
String bgdh = jsonObject.getStr("bgdh");
|
||||||
|
return regLisReportServiceImpl.printLisReport(bgdh);
|
||||||
default:
|
default:
|
||||||
return new Result("1","该接口还未实现!",method);
|
return new Result("1","该接口还未实现!",method);
|
||||||
}
|
}
|
||||||
@ -150,7 +155,7 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
|||||||
|
|
||||||
|
|
||||||
List<RegTransitSample> collect = regTransitSampleList1.stream().filter(regTransitSample1 -> regTransitSample1.getStatus().equals("10") || regTransitSample1.getStatus().equals("20")).collect(Collectors.toList());
|
List<RegTransitSample> collect = regTransitSampleList1.stream().filter(regTransitSample1 -> regTransitSample1.getStatus().equals("10") || regTransitSample1.getStatus().equals("20")).collect(Collectors.toList());
|
||||||
if(collect.size() <= 0){
|
if(collect.size() <= 1){
|
||||||
//全部已送出, 修改状态
|
//全部已送出, 修改状态
|
||||||
regApply.setStatus("20");
|
regApply.setStatus("20");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.transitPlatForm.transitPF.mapper.RegLisReportMapper">
|
<mapper namespace="com.transitPlatForm.transitPF.mapper.RegLisReportMapper">
|
||||||
<select id="getLisReportList" resultType="map">
|
<select id="getLisReportList" resultType="map">
|
||||||
<![CDATA[select * from reg_getReportsList where jyrq >= CONVERT(varchar(100), #{st}, 120) and jyrq <= CONVERT(varchar(100), #{et}, 120)]]>
|
<![CDATA[select * from reg_getReportsList where sqsj >= CONVERT(varchar(100), #{st}, 120) and sqsj <= CONVERT(varchar(100), #{et}, 120)]]>
|
||||||
<if test="brxm != null and brxm != ''"> AND brxm like '%'+#{brxm}+'%'</if>
|
<if test="brxm != null and brxm != ''"> AND brxm like '%'+#{brxm}+'%'</if>
|
||||||
<if test="brdh != null and brdh != ''"> AND brdh like '%'+#{brdh}+'%'</if>
|
<if test="brdh != null and brdh != ''"> AND brdh like '%'+#{brdh}+'%'</if>
|
||||||
<if test="sqh != null and sqh != ''"> AND sqh like '%'+#{sqh}+'%'</if>
|
<if test="sqh != null and sqh != ''"> AND sqh like '%'+#{sqh}+'%'</if>
|
||||||
@ -15,6 +15,7 @@
|
|||||||
<if test="jzbz != null">and jzbz = #{jzbz}</if>
|
<if test="jzbz != null">and jzbz = #{jzbz}</if>
|
||||||
<if test="brlyname != null and brlyname != ''"> and brlyname = #{brlyname}</if>
|
<if test="brlyname != null and brlyname != ''"> and brlyname = #{brlyname}</if>
|
||||||
<if test="yljg != null and yljg != ''"> and yljg = #{yljg}</if>
|
<if test="yljg != null and yljg != ''"> and yljg = #{yljg}</if>
|
||||||
|
<if test="barcode_zt != null and barcode_zt !=''">and barcode_zt = #{barcode_zt}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLisReportDetail" resultType="map">
|
<select id="getLisReportDetail" resultType="map">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user