|
|
@ -14,6 +14,7 @@ import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
import com.glxp.api.constant.Constant;
|
|
|
|
import com.glxp.api.constant.ConstantType;
|
|
|
|
import com.glxp.api.constant.ConstantType;
|
|
|
|
import com.glxp.api.controller.BaseController;
|
|
|
|
import com.glxp.api.controller.BaseController;
|
|
|
|
|
|
|
|
import com.glxp.api.dao.dev.DeviceInfoMapper;
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
import com.glxp.api.entity.auth.AuthAdmin;
|
|
|
|
import com.glxp.api.entity.auth.InvWarehouseEntity;
|
|
|
|
import com.glxp.api.entity.auth.InvWarehouseEntity;
|
|
|
|
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
import com.glxp.api.entity.basic.BasicBussinessTypeEntity;
|
|
|
@ -22,6 +23,7 @@ import com.glxp.api.entity.system.CompanyEntity;
|
|
|
|
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
|
|
|
|
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
|
|
|
|
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
|
|
|
|
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
|
|
|
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
|
|
|
import com.glxp.api.entity.thrsys.ThrProductsEntity;
|
|
|
|
|
|
|
|
import com.glxp.api.req.dev.DeviceInfoDetailQuery;
|
|
|
|
import com.glxp.api.req.inout.*;
|
|
|
|
import com.glxp.api.req.inout.*;
|
|
|
|
import com.glxp.api.res.inout.*;
|
|
|
|
import com.glxp.api.res.inout.*;
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
|
import com.glxp.api.service.auth.CustomerService;
|
|
|
@ -37,6 +39,7 @@ import com.glxp.api.service.thrsys.ThrProductsService;
|
|
|
|
import com.glxp.api.util.BeanCopyUtils;
|
|
|
|
import com.glxp.api.util.BeanCopyUtils;
|
|
|
|
import com.glxp.api.util.JasperUtils;
|
|
|
|
import com.glxp.api.util.JasperUtils;
|
|
|
|
import com.glxp.api.util.MsDateUtil;
|
|
|
|
import com.glxp.api.util.MsDateUtil;
|
|
|
|
|
|
|
|
import com.glxp.api.vo.dev.DeviceInfoVo;
|
|
|
|
import net.sf.jasperreports.engine.JRException;
|
|
|
|
import net.sf.jasperreports.engine.JRException;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@ -80,6 +83,8 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
private ThrProductsService thrProductsService;
|
|
|
|
private ThrProductsService thrProductsService;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private IoOrderInvoiceService ioOrderInvoiceService;
|
|
|
|
private IoOrderInvoiceService ioOrderInvoiceService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
DeviceInfoMapper deviceInfoMapper;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询单据扫码明细列表
|
|
|
|
* 查询单据扫码明细列表
|
|
|
@ -363,6 +368,63 @@ public class IoOrderDetailResultController extends BaseController {
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 科室设备明细打印
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param detailQuery
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
|
|
|
@PostMapping("/udiwms/inout/resultDetail/filterDevPrint")
|
|
|
|
|
|
|
|
public BaseResponse filterDevPrint(@RequestBody DeviceInfoDetailQuery detailQuery, HttpServletRequest request, HttpServletResponse response) throws JRException, IOException {
|
|
|
|
|
|
|
|
List<DeviceInfoVo> resList = new ArrayList<>();
|
|
|
|
|
|
|
|
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(detailQuery.getTemplateId());
|
|
|
|
|
|
|
|
//打印单号标签
|
|
|
|
|
|
|
|
Map<String, Object> data = new HashMap<>(1);
|
|
|
|
|
|
|
|
List<Object> list = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//按选入打印
|
|
|
|
|
|
|
|
if (detailQuery.getList() != null && detailQuery.getList().size() > 0) {
|
|
|
|
|
|
|
|
resList = detailQuery.getList();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
resList =deviceInfoMapper.detail(detailQuery);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int i = 1;
|
|
|
|
|
|
|
|
for (DeviceInfoVo item : resList) {
|
|
|
|
|
|
|
|
//组装数据
|
|
|
|
|
|
|
|
Map<String, Object> deviceInfoData = new HashMap<>();
|
|
|
|
|
|
|
|
deviceInfoData.put("index", String.valueOf(i));
|
|
|
|
|
|
|
|
deviceInfoData.put("deviceCode", item.getDeviceCode() == null ? ' ' : item.getDeviceCode());
|
|
|
|
|
|
|
|
deviceInfoData.put("deptName", item.getDeptName() == null ? ' ' : item.getDeptName());
|
|
|
|
|
|
|
|
deviceInfoData.put("statusName", item.getStatusName() == null ? ' ' : item.getStatusName());
|
|
|
|
|
|
|
|
deviceInfoData.put("udi", item.getUdi() == null ? ' ' : item.getUdi());
|
|
|
|
|
|
|
|
deviceInfoData.put("nameCode", item.getNameCode() == null ? ' ' : item.getNameCode());
|
|
|
|
|
|
|
|
deviceInfoData.put("productName", item.getProductName() == null ? ' ' : item.getProductName());
|
|
|
|
|
|
|
|
deviceInfoData.put("ggxh", item.getGgxh() == null ? ' ' : item.getGgxh());
|
|
|
|
|
|
|
|
deviceInfoData.put("batchNo", item.getBatchNo() == null ? ' ' : item.getBatchNo());
|
|
|
|
|
|
|
|
deviceInfoData.put("serialNo", item.getSerialNo() == null ? ' ' : item.getSerialNo());
|
|
|
|
|
|
|
|
deviceInfoData.put("productionDate", item.getProductionDate() == null ? ' ' : item.getProductionDate());
|
|
|
|
|
|
|
|
deviceInfoData.put("expireDate", item.getExpireDate() == null ? ' ' : item.getExpireDate());
|
|
|
|
|
|
|
|
deviceInfoData.put("manufactory", item.getManufactory() == null ? ' ' : item.getManufactory());
|
|
|
|
|
|
|
|
deviceInfoData.put("measname", item.getMeasname() == null ? ' ' : item.getMeasname());
|
|
|
|
|
|
|
|
deviceInfoData.put("zczbhhzbapzbh", item.getZczbhhzbapzbh() == null ? ' ' : item.getZczbhhzbapzbh());
|
|
|
|
|
|
|
|
deviceInfoData.put("supName", item.getSupName() == null ? ' ' : item.getSupName());
|
|
|
|
|
|
|
|
deviceInfoData.put("changeCount", item.getChangeCount() == null ? '0' : item.getChangeCount());
|
|
|
|
|
|
|
|
deviceInfoData.put("repairApplyCount", item.getRepairApplyCount() == null ? '0' : item.getRepairApplyCount());
|
|
|
|
|
|
|
|
deviceInfoData.put("repairCount", item.getRepairCount() == null ? '0' : item.getRepairCount());
|
|
|
|
|
|
|
|
deviceInfoData.put("checkCount", item.getCheckCount() == null ? '0' : item.getCheckCount());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
list.add(deviceInfoData);
|
|
|
|
|
|
|
|
i++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.put("data", list);
|
|
|
|
|
|
|
|
String param = JSON.toJSONString(data);
|
|
|
|
|
|
|
|
JasperUtils.jasperReport(request, response, param, filePath + "pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf");
|
|
|
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
CompanyService companyService;
|
|
|
|
CompanyService companyService;
|
|
|
|
|
|
|
|
|
|
|
|