实体类转移
This commit is contained in:
parent
81af943526
commit
af84dc275f
@ -1,7 +1,9 @@
|
|||||||
package com.czlis.interfaceCommon.utils;
|
package com.czlis.interfaceCommon.utils;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.czlis.common.config.RuoYiConfig;
|
import com.czlis.common.config.RuoYiConfig;
|
||||||
|
|
||||||
import com.czlis.interfaceCommon.mapper.BackPaperMapper;
|
import com.czlis.interfaceCommon.mapper.BackPaperMapper;
|
||||||
@ -15,12 +17,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class ReportUtil {
|
public class ReportUtil {
|
||||||
@ -28,6 +30,8 @@ public class ReportUtil {
|
|||||||
CommonUtil commonUtil;
|
CommonUtil commonUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
BackPaperMapper backPaperMapper;
|
BackPaperMapper backPaperMapper;
|
||||||
|
|
||||||
|
|
||||||
public void printBarCode(MZBarCodeParam mzBarCodeParam) {
|
public void printBarCode(MZBarCodeParam mzBarCodeParam) {
|
||||||
try {
|
try {
|
||||||
//构造数据
|
//构造数据
|
||||||
@ -41,11 +45,13 @@ public class ReportUtil {
|
|||||||
log.error("打印条码报错,条码号:{}", mzBarCodeParam.getSqh(), e);
|
log.error("打印条码报错,条码号:{}", mzBarCodeParam.getSqh(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void printBackpaper(List<String> sqhs) {
|
public void printBackpaper(List<String> sqhs) {
|
||||||
String sqh = sqhs.get(0);
|
String sqh = sqhs.get(0);
|
||||||
BackPaperParam backPaperParam = backPaperMapper.selectReqmian(sqh);
|
BackPaperParam backPaperParam = backPaperMapper.selectReqmian(sqh);
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
// ObjectMapper objectMapper = new ObjectMapper();
|
||||||
Map<String, Object> parameters = objectMapper.convertValue(backPaperParam,Map.class);
|
Map<String, Object> parameters = BeanUtil.beanToMap(backPaperParam);
|
||||||
parameters.put("company", commonUtil.getCompany(backPaperParam.getYljg()));
|
parameters.put("company", commonUtil.getCompany(backPaperParam.getYljg()));
|
||||||
parameters.put("age", AgeUtils.getAge(backPaperParam.getBrsr()));
|
parameters.put("age", AgeUtils.getAge(backPaperParam.getBrsr()));
|
||||||
parameters.put("ksdh", commonUtil.getComDictNameById("DP", backPaperParam.getKsdh()));
|
parameters.put("ksdh", commonUtil.getComDictNameById("DP", backPaperParam.getKsdh()));
|
||||||
@ -74,6 +80,7 @@ public class ReportUtil {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
//构造数据
|
//构造数据
|
||||||
|
System.out.println("入参参数:"+parameters.toString());
|
||||||
JasperReportUtil.print(RuoYiConfig.getMzPrintName(), "backpaper", parameters, detailList);
|
JasperReportUtil.print(RuoYiConfig.getMzPrintName(), "backpaper", parameters, detailList);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.czlis.mzcx.controller;
|
package com.czlis.mzcx.controller;
|
||||||
|
|
||||||
|
import com.czlis.common.annotation.Anonymous;
|
||||||
import com.czlis.common.core.controller.BaseController;
|
import com.czlis.common.core.controller.BaseController;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.core.page.TableDataInfo;
|
import com.czlis.common.core.page.TableDataInfo;
|
||||||
@ -53,6 +54,8 @@ public class MZCXController extends BaseController {
|
|||||||
public Result printAll(@RequestBody List<String> sqhs){
|
public Result printAll(@RequestBody List<String> sqhs){
|
||||||
return mzcxService.printAll(sqhs);
|
return mzcxService.printAll(sqhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Anonymous
|
||||||
@PostMapping("/printBackpaper")
|
@PostMapping("/printBackpaper")
|
||||||
public Result printBackpaper(@RequestBody List<String> sqhs){
|
public Result printBackpaper(@RequestBody List<String> sqhs){
|
||||||
return mzcxService.printBackpaper(sqhs);
|
return mzcxService.printBackpaper(sqhs);
|
||||||
|
|||||||
@ -85,6 +85,13 @@ public class MZCXServiceImpl implements MZCXService {
|
|||||||
}
|
}
|
||||||
return new Result("0", "查询成功!", new OutPatListDTO());
|
return new Result("0", "查询成功!", new OutPatListDTO());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印条码
|
||||||
|
*
|
||||||
|
* @param sqh
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result printSQD(String sqh) {
|
public Result printSQD(String sqh) {
|
||||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
||||||
@ -114,6 +121,7 @@ public class MZCXServiceImpl implements MZCXService {
|
|||||||
reportUtil.printBarCode(mzBarCodeParam);
|
reportUtil.printBarCode(mzBarCodeParam);
|
||||||
return new Result("0", "打印成功!");
|
return new Result("0", "打印成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result printAll(List<String> sqhs) {
|
public Result printAll(List<String> sqhs) {
|
||||||
for (String sqh : sqhs) {
|
for (String sqh : sqhs) {
|
||||||
@ -122,6 +130,12 @@ public class MZCXServiceImpl implements MZCXService {
|
|||||||
return new Result("0", "打印成功!");
|
return new Result("0", "打印成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印回单接口
|
||||||
|
*
|
||||||
|
* @param sqhs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result printBackpaper(List<String> sqhs) {
|
public Result printBackpaper(List<String> sqhs) {
|
||||||
log.info("aaaaa: {}", sqhs);
|
log.info("aaaaa: {}", sqhs);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user