修改了一些BUG
This commit is contained in:
+12
-9
@@ -2,6 +2,7 @@ package digital.laboratory.platform.reagent.controller;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@@ -115,19 +116,17 @@ public class AcceptanceRecordFormController {
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = acceptanceRecordFormService.getAcceptanceRecordFormVOPage(page, Wrappers.<AcceptanceRecordForm>query()
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.eq(status != null, "status", status)
|
||||
.orderByDesc("create_time")
|
||||
, acceptanceSignForId);
|
||||
.like(StrUtil.isNotBlank(reagentConsumableName), "reagent_consumable_name", reagentConsumableName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.eq(status != null, "status", status)
|
||||
.orderByDesc("create_time")
|
||||
.eq("acceptance_sign_for_id", acceptanceSignForId));
|
||||
return R.ok(acceptanceRecordFormVOPage);
|
||||
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 录入(验收记录表)
|
||||
*
|
||||
@@ -286,7 +285,11 @@ public class AcceptanceRecordFormController {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
IPage<AcceptanceSignFor> page1 = acceptanceSignForService.page(page);
|
||||
QueryWrapper<AcceptanceSignFor> queryWrapper = Wrappers.<AcceptanceSignFor>query().ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time");
|
||||
|
||||
IPage<AcceptanceSignFor> page1 = acceptanceSignForService.page(page, queryWrapper);
|
||||
|
||||
return R.ok(page1);
|
||||
// return R.ok(acceptanceRecordFormService.page(page, Wrappers.query(acceptanceRecordForm)));
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@ public class ApplicationForUseController {
|
||||
@SysLog("批量提交试剂耗材领用申请表")
|
||||
@PostMapping("/batch/commit")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_application_for_use_commit')")
|
||||
public R<ApplicationForUseVO> batchCommit(ApplicationForUseBatchDTO applicationForUseBatchDTO, HttpServletRequest theHttpServletRequest) {
|
||||
public R<ApplicationForUseVO> batchCommit(@RequestBody ApplicationForUseBatchDTO applicationForUseBatchDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
|
||||
+5
-2
@@ -45,6 +45,7 @@ import java.io.IOException;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -393,14 +394,16 @@ public class ComplianceCheckController {
|
||||
|
||||
Configure config = Configure.builder().
|
||||
bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("dateOfInspection", LocalDateTimeUtil.format(complianceCheckVO.getDateOfInspection(), "yyyy年MM月dd日"));
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("reagentConsumableName", complianceCheckVO.getReagentConsumableName());
|
||||
put("brand", complianceCheckVO.getBrand());
|
||||
put("specificationAndModel", complianceCheckVO.getSpecificationAndModel());
|
||||
|
||||
+27
-3
@@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import digital.laboratory.platform.common.core.util.R;
|
||||
import digital.laboratory.platform.common.log.annotation.SysLog;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.dto.DecentralizedRequestDTO;
|
||||
import digital.laboratory.platform.reagent.dto.PurchaseListDTO;
|
||||
@@ -33,6 +34,7 @@ import org.springframework.security.oauth2.provider.OAuth2Authentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.security.Principal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -64,6 +66,9 @@ public class DecentralizedRequestController {
|
||||
@Autowired
|
||||
private PurchaseListService purchaseListService;
|
||||
|
||||
@Autowired
|
||||
private OssFile ossFile;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -344,13 +349,32 @@ public class DecentralizedRequestController {
|
||||
|
||||
DecentralizedRequest decentralizedRequest = decentralizedRequestService.approveRequest(dlpUser, auditAndApproveDto);
|
||||
|
||||
|
||||
|
||||
|
||||
if (decentralizedRequest != null) {
|
||||
return R.ok(decentralizedRequest, "审批成功");
|
||||
} else return R.failed("审批失败");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "试剂/耗材分散采购申请表打印", notes = "试剂/耗材分散采购申请表打印")
|
||||
@SysLog("试剂/耗材分散采购申请表打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('purchase_request_print')")
|
||||
public void bizGetPDFInventory(String id, String type,HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
String applyFileName = "试剂耗材分散采购申请表-" + id;
|
||||
|
||||
String pdfFilePath = "document" + "/" + "DecentralizeRequest" + "/" + id + "/" + applyFileName + ".pdf";
|
||||
try {
|
||||
//直接调用pdf方法
|
||||
decentralizedRequestService.purchaseRequestTablePDF(id,type, theHttpServletRequest, httpServletResponse);
|
||||
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||
httpServletResponse.setContentType(applyFileName);
|
||||
} catch (Exception e) {
|
||||
System.out.println(String.format("minioFile objectExist() Exception. %s", e.getLocalizedMessage()));
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
-19
@@ -47,14 +47,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* (采购目录)
|
||||
@@ -94,13 +90,13 @@ public class PurchaseCatalogueController {
|
||||
@ApiOperation(value = "分页查询已发布的采购目录明细", notes = "分页查询已发布的采购目录明细")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchase_catalogue_pages')")
|
||||
public R<List<CatalogueDetails>> getPurchaseCataloguePage(String name,Integer category, HttpServletRequest theHttpServletRequest) {
|
||||
public R<List<CatalogueDetails>> getPurchaseCataloguePage(String name, Integer category, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
List<CatalogueDetails> list = purchaseCatalogueService.getList(name,category);
|
||||
List<CatalogueDetails> list = purchaseCatalogueService.getList(name, category);
|
||||
|
||||
return R.ok(list);
|
||||
|
||||
@@ -398,14 +394,6 @@ public class PurchaseCatalogueController {
|
||||
if (voList.isEmpty()) {
|
||||
throw new RuntimeException("未查询到相关信息");
|
||||
}
|
||||
Collections.sort(voList, new Comparator<CatalogueDetails>() {
|
||||
|
||||
|
||||
@Override
|
||||
public int compare(CatalogueDetails o1, CatalogueDetails o2) {
|
||||
return Integer.valueOf(o1.getPurchaseCatalogueNumber().substring(5))- Integer.valueOf(o2.getPurchaseCatalogueNumber().substring(5));
|
||||
}
|
||||
});
|
||||
|
||||
String id = IdWorker.get32UUID().toUpperCase();
|
||||
|
||||
@@ -446,14 +434,17 @@ public class PurchaseCatalogueController {
|
||||
|
||||
Configure config = Configure.builder().
|
||||
bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", purchaseCatalogueVO.getPurchaseCatalogueId());
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("secondaryAuditorName", purchaseCatalogueVO.getAuditorName());
|
||||
put("auditTimeOfSecondary", LocalDateTimeUtil.format(purchaseCatalogueVO.getAuditTime(), "yyyy年MM月dd日 "));
|
||||
put("name", LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy年") + "~" + LocalDateTimeUtil.format(LocalDateTime.now().plusYears(1), "yyyy年"));
|
||||
@@ -471,9 +462,10 @@ public class PurchaseCatalogueController {
|
||||
|
||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
|
||||
fisWord.close();
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
|
||||
+27
-24
@@ -45,6 +45,7 @@ import java.security.Principal;
|
||||
import java.sql.Date;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -123,7 +124,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_get')")
|
||||
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime,
|
||||
public R<IPage<PurchasingPlanVO>> getPurchasingPlanPage(Page<PurchasingPlan> page, @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime startTime,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") DateTime endTime, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
|
||||
@@ -138,14 +139,14 @@ public class PurchasingPlanController {
|
||||
.le("create_time", endTime).orderByDesc("create_time"));
|
||||
|
||||
return R.ok(purchasingPlanVOPage);
|
||||
}else {
|
||||
} else {
|
||||
|
||||
IPage<PurchasingPlanVO> purchasingPlanVOPage = purchasingPlanService.getPurchasingPlanVOPage(page, Wrappers.<PurchasingPlan>query()
|
||||
.orderByDesc("create_time"));
|
||||
IPage<PurchasingPlanVO> purchasingPlanVOPage = purchasingPlanService.getPurchasingPlanVOPage(page, Wrappers.<PurchasingPlan>query()
|
||||
.orderByDesc("create_time"));
|
||||
|
||||
return R.ok(purchasingPlanVOPage);
|
||||
return R.ok(purchasingPlanVOPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增(采购计划)
|
||||
@@ -156,7 +157,7 @@ public class PurchasingPlanController {
|
||||
@ApiOperation(value = "新增(采购计划)", notes = "新增(采购计划) 参数DTO:(detailsOfCentralizedId,quantity = ,)")
|
||||
@SysLog("新增(采购计划)")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_add')")
|
||||
public R<PurchasingPlanVO> postAddObject(@RequestBody List<PurchasingPlanDTO> purchasingPlanDTOList, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -348,13 +349,12 @@ public class PurchasingPlanController {
|
||||
* 采购计划打印
|
||||
*
|
||||
* @param purchasingPlanId
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "采购计划打印", notes = "采购计划打印")
|
||||
@SysLog("采购计划打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_print')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_purchasing_plan_print')")
|
||||
public void bizGetPDFInventory(String purchasingPlanId, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -370,12 +370,12 @@ public class PurchasingPlanController {
|
||||
|
||||
String id = purchasingPlanVO.getPurchasingPlanId();
|
||||
|
||||
String applyFileName = "采购计划-"+id;
|
||||
String applyFileName = "采购计划-" + id;
|
||||
|
||||
String pdfFilePath = "document" + "/"+"purchasingPlan" + "/" + id + "/" + applyFileName + ".pdf";
|
||||
String pdfFilePath = "document" + "/" + "purchasingPlan" + "/" + id + "/" + applyFileName + ".pdf";
|
||||
try {
|
||||
//直接调用pdf方法
|
||||
purchasingPlanTablePDF(purchasingPlanVO,id,theHttpServletRequest,httpServletResponse);
|
||||
purchasingPlanTablePDF(purchasingPlanVO, id, theHttpServletRequest, httpServletResponse);
|
||||
ossFile.fileGet(pdfFilePath, httpServletResponse.getOutputStream());
|
||||
httpServletResponse.setContentType(applyFileName);
|
||||
} catch (Exception e) {
|
||||
@@ -392,11 +392,15 @@ public class PurchasingPlanController {
|
||||
|
||||
ArrayList<ProcurementContentVO> voList = new ArrayList<>();
|
||||
|
||||
double appropriationBudget = 0;
|
||||
|
||||
for (ProcurementContentVO procurementContentVO : procurementContentVOList) {
|
||||
|
||||
ReagentConsumables byId = reagentConsumablesService.getById(procurementContentVO.getReagentConsumableId());
|
||||
|
||||
if (byId.getCategory().equals("试剂")|byId.getCategory().equals("耗材")){
|
||||
if (byId.getCategory().equals("试剂") | byId.getCategory().equals("耗材")) {
|
||||
|
||||
appropriationBudget = appropriationBudget + procurementContentVO.getSubtotal();
|
||||
|
||||
voList.add(procurementContentVO);
|
||||
}
|
||||
@@ -406,7 +410,7 @@ public class PurchasingPlanController {
|
||||
//-----------------------------
|
||||
// 生成 word 版本的 采购目录
|
||||
|
||||
String applyFileName = "采购计划-"+id;
|
||||
String applyFileName = "采购计划-" + id;
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ossFile.fileGet("template" + "/" + "试剂耗材采购计划表模板.docx", bos);
|
||||
@@ -420,21 +424,24 @@ public class PurchasingPlanController {
|
||||
|
||||
Configure config = Configure.builder().
|
||||
bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
double finalAppropriationBudget = appropriationBudget;
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("appropriationBudget",purchasingPlanVO.getAppropriationBudget());
|
||||
put("id",id);
|
||||
put("size",1);
|
||||
put("appropriationBudget", finalAppropriationBudget);
|
||||
put("year", year);
|
||||
put("createName", purchasingPlanVO.getCreateName());
|
||||
put("primaryAuditorName", purchasingPlanVO.getPrimaryAuditorName());
|
||||
put("approverName", purchasingPlanVO.getApproverName());
|
||||
put("createTime",LocalDateTimeUtil.format(purchasingPlanVO.getCommitTime(),"yyyy年MM月dd日"));
|
||||
put("auditTimeOfPrimary",LocalDateTimeUtil.format(purchasingPlanVO.getAuditTimeOfPrimary(),"yyyy年MM月dd日"));
|
||||
put("approvalTime",LocalDateTimeUtil.format(purchasingPlanVO.getApprovalTime(),"yyyy年MM月dd日"));
|
||||
put("createTime", LocalDateTimeUtil.format(purchasingPlanVO.getCommitTime(), "yyyy年MM月dd日"));
|
||||
put("auditTimeOfPrimary", LocalDateTimeUtil.format(purchasingPlanVO.getAuditTimeOfPrimary(), "yyyy年MM月dd日"));
|
||||
put("approvalTime", LocalDateTimeUtil.format(purchasingPlanVO.getApprovalTime(), "yyyy年MM月dd日"));
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
@@ -452,21 +459,17 @@ public class PurchasingPlanController {
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
outPDF.close();
|
||||
|
||||
|
||||
ossFile.fileSave("document" + "/" + "purchasingPlan" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-3
@@ -326,10 +326,7 @@ public class ReagentConsumableInventoryController {
|
||||
return R.failed("未能查询到该标准物质的详细信息");
|
||||
}
|
||||
}
|
||||
|
||||
ReagentConsumableInventoryFullVO byCode = reagentConsumableInventoryService.getByCode(id);
|
||||
|
||||
|
||||
return R.ok(byCode);
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -67,7 +67,7 @@ public class StandardMaterialApprovalFormController {
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询", notes = "通过id查询")
|
||||
@GetMapping()
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_get')")
|
||||
public R<StandardMaterialApprovalFormVO> getById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -86,7 +86,7 @@ public class StandardMaterialApprovalFormController {
|
||||
*/
|
||||
@ApiOperation(value = "分页查询", notes = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_page')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_page')")
|
||||
public R<IPage<StandardMaterialApprovalFormVO>> getStandardMaterialApprovalFormPage(Page<StandardMaterialApprovalForm> page, String referenceMaterialName, @JsonFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate startTime,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd") LocalDate endTime, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
@@ -96,6 +96,7 @@ public class StandardMaterialApprovalFormController {
|
||||
.like(StrUtil.isNotBlank(referenceMaterialName), "reference_material_name", referenceMaterialName)
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time")
|
||||
|
||||
);
|
||||
return R.ok(standardMaterialApprovalFormSList);
|
||||
@@ -112,7 +113,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)", notes = "新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@SysLog("新增(标准物质停用/报废销毁/恢复/降级使用审批表)")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_add')")
|
||||
public R<StandardMaterialApprovalForm> postAddObject(@RequestBody StandardMaterialApprovalFormDTO standardMaterialApprovalFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
@@ -127,7 +128,6 @@ public class StandardMaterialApprovalFormController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 审核(标准物质停用/报废销毁/恢复/降级使用审批表)
|
||||
*
|
||||
@@ -177,25 +177,25 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "标准物质停用", notes = "标准物质停用")
|
||||
@SysLog("标准物质停用")
|
||||
@PostMapping("/deactivate")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_deactivate')" )
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_deactivate')")
|
||||
public R<String> editById(String id, HttpServletRequest theHttpServletRequest) {
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
DLPUser dlpUser = (DLPUser) ((OAuth2Authentication) principal).getUserAuthentication().getPrincipal();
|
||||
|
||||
ReferenceMaterial byId = referenceMaterialService.getById(id);
|
||||
|
||||
if (byId.getStatus()==-3){
|
||||
if (byId.getStatus() == -3) {
|
||||
throw new RuntimeException(String.format("该标准物质已被领用,请先归还后再停用"));
|
||||
}
|
||||
|
||||
byId.setStatus(-1);
|
||||
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
return R.ok("停用成功");
|
||||
} else {
|
||||
return R.failed("停用失败");
|
||||
}
|
||||
if (referenceMaterialService.updateById(byId)) {
|
||||
return R.ok("停用成功");
|
||||
} else {
|
||||
return R.failed("停用失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**-------标准物质停用报废销毁恢复降级使用审批表打印*/
|
||||
/**
|
||||
@@ -207,7 +207,7 @@ public class StandardMaterialApprovalFormController {
|
||||
@ApiOperation(value = "标准物质停用报废销毁恢复降级使用审批表打印", notes = "标准物质停用报废销毁恢复降级使用审批表打印")
|
||||
@SysLog("标准物质停用报废销毁恢复降级使用审批表打印")
|
||||
@PostMapping("/print")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_print')")
|
||||
@PreAuthorize("@pms.hasPermission('reagent_standard_material_approval_form_print')")
|
||||
public void bizGetPDFInventory(String id, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) {
|
||||
System.out.println("bizApplyWord.................");
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
+3
-2
@@ -95,7 +95,8 @@ public class WarehousingRecordFormController {
|
||||
IPage<WarehousingRecordFormVO> warehousingRecordFormVOList = warehousingRecordFormService.getWarehousingRecordFormVOPage(page, Wrappers.<WarehousingRecordForm>query()
|
||||
.ge(startTime != null, "create_time", startTime)
|
||||
.eq(StrUtil.isNotBlank(status), "status", status)
|
||||
.le(endTime != null, "create_time", endTime));
|
||||
.le(endTime != null, "create_time", endTime)
|
||||
.orderByDesc("create_time"));
|
||||
|
||||
return R.ok(warehousingRecordFormVOList);
|
||||
|
||||
@@ -137,7 +138,7 @@ public class WarehousingRecordFormController {
|
||||
@SysLog("新增签收记录表")
|
||||
@PostMapping
|
||||
// @PreAuthorize("@pms.hasPermission('reagent_warehousing_record_form_add')")
|
||||
public R<WarehousingRecordFormVO> postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
public R<WarehousingRecordFormVO> postAddObject(@RequestBody WarehousingRecordFormDTO warehousingRecordFormDTO, HttpServletRequest theHttpServletRequest) {
|
||||
|
||||
Principal principal = theHttpServletRequest.getUserPrincipal();
|
||||
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class AcceptanceRecordFormAuditDTO {
|
||||
|
||||
private List<String> uuId;
|
||||
|
||||
private Boolean auditResult;
|
||||
|
||||
private String auditOpinion;
|
||||
}
|
||||
+1
-1
@@ -8,5 +8,5 @@ public class ApplicationForUseBatchDTO {
|
||||
|
||||
List<ApplicationForUseDTO> applicationForUseDTOList;
|
||||
|
||||
String templateId;
|
||||
String experimentId;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public class AcceptanceRecordForm extends BaseEntity {
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(0:未提交,1:已提交,2:一级审核通过,3:二级审核通过,4:三级审核通过)")
|
||||
@ApiModelProperty(value = "状态(0:未提交,1:一级待审核,2:二级待审核,3:三级待审核,6:审核通过,-2 一级审核不不通过,-3:二级审核不通过,-4 三级审核不通过)")
|
||||
private Integer status;
|
||||
/**
|
||||
* (签收物品明细Id)
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package digital.laboratory.platform.reagent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@TableName(value = "acceptance_sign_for", autoResultMap = true)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(验收中间表)")
|
||||
public class AcceptanceSignFor extends BaseEntity {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private String id;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "验收种数")
|
||||
private Integer quantity;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "签收记录表ID")
|
||||
private String warehousingRecordFormId;
|
||||
|
||||
@ApiModelProperty(value = "状态 0 未开始签收 1 进行中 2 已完成 ")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import digital.laboratory.platform.common.mybatis.base.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -27,42 +29,42 @@ public class CentralizedRequest extends BaseEntity {
|
||||
/**
|
||||
* (编号)
|
||||
*/
|
||||
@ApiModelProperty(value="编号")
|
||||
@ApiModelProperty(value = "编号")
|
||||
private String number;
|
||||
|
||||
/**
|
||||
* (申请人ID)
|
||||
*/
|
||||
@ApiModelProperty(value="申请人ID")
|
||||
@ApiModelProperty(value = "申请人ID")
|
||||
private String applicantId;
|
||||
|
||||
/**
|
||||
* (申请日期)
|
||||
*/
|
||||
@ApiModelProperty(value="申请日期")
|
||||
@ApiModelProperty(value = "申请日期")
|
||||
private LocalDateTime dateOfApplication;
|
||||
|
||||
/**
|
||||
* 采购计划ID
|
||||
*/
|
||||
@ApiModelProperty(value="采购计划ID")
|
||||
@ApiModelProperty(value = "采购计划ID")
|
||||
private String purchasingPlanId;
|
||||
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value="状态(0:未提交,1:已提交,2:已审核 3:已被制定采购计划 ,4:已被制定采购清单)")
|
||||
@ApiModelProperty(value = "状态(0:未提交,1:待审核,6:审核通过 3:已被制定采购计划 ,4:已被制定采购清单,-2审核不通过)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
/**
|
||||
* (申请人名称)
|
||||
*/
|
||||
@ApiModelProperty(value="申请人名称")
|
||||
private String applicantName;
|
||||
@ApiModelProperty(value = "申请人名称")
|
||||
private String applicantName;
|
||||
|
||||
private boolean auditResult;
|
||||
|
||||
private String auditOpinion;
|
||||
private String auditOpinion;
|
||||
|
||||
private String auditId;
|
||||
|
||||
@@ -72,7 +74,7 @@ public class CentralizedRequest extends BaseEntity {
|
||||
* centralizedRequestId
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value="集中采购申请ID")
|
||||
@ApiModelProperty(value = "集中采购申请ID")
|
||||
private String id;
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ComplianceCheck extends BaseEntity {
|
||||
/**
|
||||
* (状态)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(-1:计划创建,0:已录入方案,1:已提交,2:一级审核通过,3:二级审核通过,-2:审核不通过)")
|
||||
@ApiModelProperty(value = "状态(-1:计划创建,0:已录入方案,1:一级待审核,2:二级待审核,6:审核通过,-2:一级审核不通过,-3二级审核不通过)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,6 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "分散采购申请明细")
|
||||
public class DecentralizeDetails extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (品牌)
|
||||
*/
|
||||
@@ -167,7 +166,10 @@ public class DecentralizeDetails extends BaseEntity {
|
||||
@ApiModelProperty(value = "CAS-号")
|
||||
private String casNumber;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "物品编码")
|
||||
private String code;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "(试剂耗材集合)")
|
||||
public class ReagentConsumablesSet extends BaseEntity {
|
||||
|
||||
/**
|
||||
* (试剂耗材领用申请表ID)
|
||||
*/
|
||||
@@ -77,7 +76,7 @@ public class ReagentConsumablesSet extends BaseEntity {
|
||||
*/
|
||||
@ApiModelProperty(value = "(批次)")
|
||||
private String batchDetailsId;
|
||||
|
||||
|
||||
/**
|
||||
* reagentConsumablesSetId
|
||||
*/
|
||||
|
||||
@@ -66,7 +66,7 @@ public class RequisitionRecord extends BaseEntity {
|
||||
@ApiModelProperty(value="编号")
|
||||
private String number;
|
||||
|
||||
private String id;
|
||||
private String deliveryRegistrationFormId;
|
||||
|
||||
private String reagentConsumableName;
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface AcceptanceRecordFormMapper extends BaseMapper<AcceptanceRecordForm> {
|
||||
|
||||
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, @Param(Constants.WRAPPER)QueryWrapper<AcceptanceRecordForm> qw,String acceptanceSignForId);
|
||||
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, @Param(Constants.WRAPPER)QueryWrapper<AcceptanceRecordForm> qw);
|
||||
AcceptanceRecordFormVO getAcceptanceRecordFormVO(String acceptanceRecordFormId);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package digital.laboratory.platform.reagent.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceSignFor;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface AcceptanceSignForMapper extends BaseMapper<AcceptanceSignFor> {
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@ public interface AcceptanceRecordFormService extends IService<AcceptanceRecordFo
|
||||
|
||||
AcceptanceRecordForm addForm(String reagentConsumableId, String supplierId,String acceptanceSignForId);
|
||||
|
||||
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, QueryWrapper<AcceptanceRecordForm>qw,String acceptanceSignForId);
|
||||
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, QueryWrapper<AcceptanceRecordForm>qw);
|
||||
|
||||
IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVORecordPage(IPage<AcceptanceRecordForm> page);
|
||||
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package digital.laboratory.platform.reagent.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceSignFor;
|
||||
|
||||
public interface AcceptanceSignForService extends IService<AcceptanceSignFor> {
|
||||
}
|
||||
+4
@@ -12,6 +12,8 @@ import digital.laboratory.platform.reagent.entity.DecentralizedRequest;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -46,4 +48,6 @@ public interface DecentralizedRequestService extends IService<DecentralizedReque
|
||||
DecentralizedRequest threeLevelAuditRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto);
|
||||
|
||||
DecentralizedRequest approveRequest(DLPUser dlpUser, AuditAndApproveDTO auditAndApproveDto);
|
||||
|
||||
void purchaseRequestTablePDF(String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception;
|
||||
}
|
||||
|
||||
+60
-7
@@ -17,13 +17,11 @@ import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormAuditDTO;
|
||||
import digital.laboratory.platform.reagent.entity.WarehousingRecordForm;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.utils.PageUtils;
|
||||
import digital.laboratory.platform.reagent.dto.AcceptanceRecordFormDTO;
|
||||
import digital.laboratory.platform.reagent.dto.AuditAndApproveDTO;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceRecordForm;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.mapper.AcceptanceRecordFormMapper;
|
||||
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormFullVO;
|
||||
import digital.laboratory.platform.reagent.vo.AcceptanceRecordFormVO;
|
||||
@@ -41,6 +39,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -57,6 +56,9 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
@Autowired
|
||||
private BlacklistService blacklistService;
|
||||
|
||||
@Autowired
|
||||
private AcceptanceSignForService acceptanceSignForService;
|
||||
|
||||
@Autowired
|
||||
private ReagentConsumablesService reagentConsumablesService;
|
||||
|
||||
@@ -193,9 +195,9 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, QueryWrapper<AcceptanceRecordForm> qw,String acceptanceSignForId) {
|
||||
public IPage<AcceptanceRecordFormVO> getAcceptanceRecordFormVOPage(IPage<AcceptanceRecordForm> page, QueryWrapper<AcceptanceRecordForm> qw) {
|
||||
|
||||
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = baseMapper.getAcceptanceRecordFormVOPage(page, qw,acceptanceSignForId);
|
||||
IPage<AcceptanceRecordFormVO> acceptanceRecordFormVOPage = baseMapper.getAcceptanceRecordFormVOPage(page, qw);
|
||||
|
||||
List<AcceptanceRecordFormVO> records = acceptanceRecordFormVOPage.getRecords();
|
||||
|
||||
@@ -317,13 +319,24 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
@Transactional
|
||||
public boolean threeLevelAudit(AcceptanceRecordFormAuditDTO acceptanceRecordFormAuditDTO, DLPUser dlpUser) {
|
||||
|
||||
|
||||
List<String> uuId = acceptanceRecordFormAuditDTO.getUuId();
|
||||
List<AcceptanceRecordForm> acceptanceRecordForms = new ArrayList<>();
|
||||
|
||||
List<String> stringList = new ArrayList<>();
|
||||
|
||||
|
||||
for (String s : uuId) {
|
||||
|
||||
|
||||
AcceptanceRecordForm byId = this.getById(s);
|
||||
|
||||
if (!stringList.contains(byId.getAcceptanceSignForId())) {
|
||||
|
||||
stringList.add(byId.getAcceptanceSignForId());
|
||||
|
||||
}
|
||||
|
||||
if (byId.getStatus() != 3) {
|
||||
throw new RuntimeException(String.format("当前状态不能审核"));
|
||||
}
|
||||
@@ -341,8 +354,46 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
byId.setStatus(6);
|
||||
} else byId.setStatus(-4);
|
||||
acceptanceRecordForms.add(byId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (this.updateBatchById(acceptanceRecordForms)) {
|
||||
|
||||
|
||||
//判断是否验收完毕
|
||||
|
||||
for (String s : stringList) {
|
||||
|
||||
AcceptanceSignFor acceptanceSignFor = acceptanceSignForService.getById(s);
|
||||
|
||||
List<WarehousingContent> warehousing_record_form_id = warehousingContentService.list(Wrappers.<WarehousingContent>query().eq("warehousing_record_form_id", warehousingRecordFormService.getById(acceptanceSignFor.getWarehousingRecordFormId()).getId()));
|
||||
|
||||
List<AcceptanceRecordForm> recordFormList = this.list(Wrappers.<AcceptanceRecordForm>query().eq("acceptance_sign_for_id", s));
|
||||
|
||||
if (warehousing_record_form_id.size() == recordFormList.size()) {
|
||||
|
||||
int x = 0;
|
||||
|
||||
for (AcceptanceRecordForm acceptanceRecordForm : recordFormList) {
|
||||
|
||||
if (acceptanceRecordForm.getStatus() == 6) {
|
||||
|
||||
x = x + 1;
|
||||
|
||||
}
|
||||
}
|
||||
if (x == recordFormList.size()) {
|
||||
|
||||
AcceptanceSignFor byId = acceptanceSignForService.getById(s);
|
||||
|
||||
byId.setStatus(2);
|
||||
|
||||
acceptanceSignForService.updateById(byId);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
@@ -409,6 +460,9 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
@@ -431,8 +485,7 @@ public class AcceptanceRecordFormServiceImpl extends ServiceImpl<AcceptanceRecor
|
||||
put("threeLevelAuditorName", acceptanceRecordFormVO.getThreeLevelAuditorName());
|
||||
put("auditOpinionOfThreeLevel", acceptanceRecordFormVO.getAuditOpinionOfThreeLevel());
|
||||
put("auditTimeOfThreeLevel", LocalDateTimeUtil.format(acceptanceRecordFormVO.getAuditTimeOfThreeLevel(), "yyyy年MM月dd日"));
|
||||
put("id", acceptanceRecordFormVO.getId());
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("bam_remarks", acceptanceRecordFormVO.getBam_remarks());
|
||||
put("cq_remarks", acceptanceRecordFormVO.getCq_remarks());
|
||||
put("pgc_remarks", acceptanceRecordFormVO.getPgc_remarks());
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.AcceptanceSignFor;
|
||||
import digital.laboratory.platform.reagent.mapper.AcceptanceSignForMapper;
|
||||
import digital.laboratory.platform.reagent.service.AcceptanceSignForService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class AcceptanceSignForServiceImpl extends ServiceImpl<AcceptanceSignForMapper,AcceptanceSignFor> implements AcceptanceSignForService {
|
||||
}
|
||||
+4
-3
@@ -251,7 +251,7 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
|
||||
applicationForUse.setRecipientId(dlpUser.getId());
|
||||
|
||||
applicationForUse.setExperimentId(applicationForUseBatchDTO.getTemplateId());
|
||||
applicationForUse.setExperimentId(applicationForUseBatchDTO.getExperimentId());
|
||||
|
||||
List<ReagentConsumablesSet> reagentConsumablesSets = new ArrayList<>();
|
||||
|
||||
@@ -273,7 +273,9 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
}
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, applicationForUseDTO.getReagentConsumableId());
|
||||
ReferenceMaterial referenceMaterial = referenceMaterialService.getById(applicationForUseDTO.getReferenceMaterialId());
|
||||
|
||||
reagentConsumableInventoryLambdaQueryWrapper.eq(ReagentConsumableInventory::getReagentConsumableId, referenceMaterial.getReagentConsumableId());
|
||||
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
@@ -308,7 +310,6 @@ public class ApplicationForUseServiceImpl extends ServiceImpl<ApplicationForUseM
|
||||
List<ReagentConsumablesSetVO> list = reagentConsumablesSetService.getList(applicationForUse.getId());
|
||||
|
||||
reagentConsumablesSetList.addAll(list);
|
||||
|
||||
}
|
||||
return reagentConsumablesSetList;
|
||||
}
|
||||
|
||||
-3
@@ -21,8 +21,6 @@ import java.util.List;
|
||||
@Service
|
||||
@SuppressWarnings("all")
|
||||
public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, CategoryTable> implements CategoryTableService {
|
||||
|
||||
|
||||
@Override
|
||||
public CategoryTable addSpecies(String category, String species) {
|
||||
|
||||
@@ -51,7 +49,6 @@ public class CategoryTableServiceImpl extends ServiceImpl<CategoryTableMapper, C
|
||||
return one;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean delSpeciesById(String categoryTableId) {
|
||||
|
||||
|
||||
+21
-2
@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -287,6 +288,11 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
CentralizedRequestVO centralizedRequest = this.getCentralizedRequestVO(id);
|
||||
|
||||
if (centralizedRequest.getStatus()!=4){
|
||||
|
||||
throw new RuntimeException(String.format("当前采购还未被制定为清单,无法打印"));
|
||||
}
|
||||
|
||||
List<DetailsOfCentralizedVO> detailsOfCentralizedVOList = centralizedRequest.getDetailsOfCentralizedVOList();
|
||||
|
||||
|
||||
@@ -314,6 +320,10 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
|
||||
|
||||
if (requestById.getStatus()!=6){
|
||||
throw new RuntimeException(String.format("当前采购还未被制定为清单,无法打印"));
|
||||
}
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : requestById.getDecentralizeDetailsVOList()) {
|
||||
|
||||
if (decentralizeDetails.getCategory().equals("标准物质")) {
|
||||
@@ -363,6 +373,9 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
if (type.equals("集中采购申请")) {
|
||||
|
||||
CentralizedRequestVO centralizedRequestVO = this.getCentralizedRequestVO(id);
|
||||
if (centralizedRequestVO.getStatus() != 4) {
|
||||
throw new RuntimeException(String.format("还未被制定为采购清单,无法打印"));
|
||||
}
|
||||
PurchasingPlanVO byId = purchasingPlanService.getPurchasingPlanVO(centralizedRequestVO.getPurchasingPlanId());
|
||||
firstAuditName = centralizedRequestVO.getAuditorName();
|
||||
secondAuditName = byId.getCreateName();
|
||||
@@ -372,6 +385,9 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
|
||||
} else {
|
||||
DecentralizedRequestVO requestById = decentralizedRequestService.getRequestById(id);
|
||||
if (requestById.getStatus() != 6) {
|
||||
throw new RuntimeException(String.format("还未被制定为采购清单,无法打印"));
|
||||
}
|
||||
firstAuditName = requestById.getPrimaryAuditorName();
|
||||
secondAuditName = requestById.getSecondaryAuditorName();
|
||||
thirdAuditName = requestById.getThreeLevelAuditName();
|
||||
@@ -402,11 +418,14 @@ public class CentralizedRequestServiceImpl extends ServiceImpl<CentralizedReques
|
||||
String finalThirdAuditName = thirdAuditName;
|
||||
String finalFirstAuditName = firstAuditName;
|
||||
String finalCommitTime = commitTime;
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
|
||||
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("total", finalTotal);
|
||||
put("finalFirstAuditName", finalFirstAuditName);
|
||||
put("finalSecondAuditName", finalSecondAuditName);
|
||||
|
||||
+4
-2
@@ -37,6 +37,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -262,14 +263,15 @@ public class CheckScheduleServiceImpl extends ServiceImpl<CheckScheduleMapper, C
|
||||
|
||||
builder.bind("voList",policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList",voList);
|
||||
put("id",id);
|
||||
put("size",1);
|
||||
put("year",year);
|
||||
put("managerName",checkScheduleVO.getManagerName());
|
||||
put("technicalDirectorName",checkScheduleVO.getTechnicalDirectorName());
|
||||
put("auditTimeOfTechnical", LocalDateTimeUtil.format(checkScheduleVO.getAuditTimeOfTechnical(),"yyyy年MM月dd日"));
|
||||
|
||||
+158
-16
@@ -1,26 +1,42 @@
|
||||
package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.config.ConfigureBuilder;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import digital.laboratory.platform.common.feign.RemoteWord2PDFService;
|
||||
import digital.laboratory.platform.common.mybatis.security.service.DLPUser;
|
||||
import digital.laboratory.platform.common.oss.service.OssFile;
|
||||
import digital.laboratory.platform.reagent.dto.*;
|
||||
import digital.laboratory.platform.reagent.entity.*;
|
||||
import digital.laboratory.platform.reagent.mapper.DecentralizedRequestMapper;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.DecentralizedRequestVO;
|
||||
import feign.Response;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -46,6 +62,11 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
@Autowired
|
||||
private PurchaseListDetailsService purchaseListDetailsService;
|
||||
@Autowired
|
||||
|
||||
private OssFile ossFile;
|
||||
@Autowired
|
||||
private RemoteWord2PDFService remoteWord2PDFService;
|
||||
|
||||
@Override//分散采购申请分页
|
||||
public IPage<DecentralizedRequestVO> getDecentralizedRequestVOPage
|
||||
@@ -287,30 +308,30 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
|
||||
if (auditAndApproveDto.getApproveResult() == true) {
|
||||
|
||||
//如果未购入过该物品,则将该物品信息更新至试剂耗材类
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
//如果未购入过该物品,则将该物品信息更新至试剂耗材类
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId());
|
||||
decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, byId.getId());
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
||||
List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
||||
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
||||
|
||||
if (decentralizeDetails.getReagentConsumableId() == null) {
|
||||
if (decentralizeDetails.getReagentConsumableId() == null) {
|
||||
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails);
|
||||
ReagentConsumables reagentConsumables = reagentConsumablesService.addReagentConsumables(decentralizeDetails);
|
||||
|
||||
decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
decentralizeDetails.setReagentConsumableId(reagentConsumables.getReagentConsumableId());
|
||||
|
||||
decentralizeDetailsService.updateById(decentralizeDetails);
|
||||
} else {
|
||||
ReagentConsumables byId1 = reagentConsumablesService.getById(decentralizeDetails.getReagentConsumableId());
|
||||
byId1.setTechnicalParameter(decentralizeDetails.getTechnicalParameter());
|
||||
reagentConsumablesService.updateById(byId1);
|
||||
}
|
||||
decentralizeDetailsService.updateById(decentralizeDetails);
|
||||
} else {
|
||||
ReagentConsumables byId1 = reagentConsumablesService.getById(decentralizeDetails.getReagentConsumableId());
|
||||
byId1.setTechnicalParameter(decentralizeDetails.getTechnicalParameter());
|
||||
reagentConsumablesService.updateById(byId1);
|
||||
}
|
||||
}
|
||||
|
||||
//创建采购清单
|
||||
LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||
@@ -320,10 +341,11 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
List<DecentralizeDetails> list = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper1);
|
||||
|
||||
PurchaseList purchaseList = new PurchaseList();
|
||||
purchaseList.setId(byId.getCreateBy());
|
||||
purchaseList.setName(DateTime.now() + "采购清单");
|
||||
purchaseList.setStatus(0);
|
||||
purchaseList.setCreateBy(byId.getCreateBy());
|
||||
purchaseList.setType("分散采购申请");
|
||||
purchaseList.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
byId.setPurchaseListId(purchaseList.getId());
|
||||
this.updateById(byId);
|
||||
@@ -354,6 +376,126 @@ public class DecentralizedRequestServiceImpl extends ServiceImpl<DecentralizedRe
|
||||
} else return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void purchaseRequestTablePDF(String id, String type, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("purchaseRequestTablePDF.................");
|
||||
|
||||
int x = 1;
|
||||
|
||||
double total = 0;
|
||||
|
||||
|
||||
String firstAuditName = null;
|
||||
String secondAuditName = null;
|
||||
String thirdAuditName = null;
|
||||
String fourthAuditName = null;
|
||||
String commitTime = null;
|
||||
|
||||
//-----------------------------
|
||||
// 生成 word 版本的 采购目录
|
||||
|
||||
DecentralizedRequestVO requestById = this.getRequestById(id);
|
||||
|
||||
List<DecentralizeDetails> decentralizeDetailsList = requestById.getDecentralizeDetailsVOList();
|
||||
|
||||
if (decentralizeDetailsList == null) {
|
||||
|
||||
throw new RuntimeException(String.format("未查询到相关信息"));
|
||||
}
|
||||
|
||||
List<DecentralizeDetails> voList = new ArrayList<>();
|
||||
|
||||
for (DecentralizeDetails decentralizeDetails : decentralizeDetailsList) {
|
||||
|
||||
if (!decentralizeDetails.getCategory().equals("标准物质")) {
|
||||
voList.add(decentralizeDetails);
|
||||
}
|
||||
}
|
||||
|
||||
firstAuditName = requestById.getPrimaryAuditorName();
|
||||
secondAuditName = requestById.getSecondaryAuditorName();
|
||||
thirdAuditName = requestById.getThreeLevelAuditName();
|
||||
fourthAuditName = requestById.getApproverName();
|
||||
commitTime = LocalDateTimeUtil.format(requestById.getCommitTime(), "yyyy年MM月dd日");
|
||||
|
||||
|
||||
String applyFileName = "试剂耗材分散采购申请表-" + id;
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ossFile.fileGet("template" + "/" + "试剂耗材分散采购申请表.docx", bos);
|
||||
|
||||
byte[] templateArray = bos.toByteArray();
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(templateArray);
|
||||
bos.close();
|
||||
|
||||
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
|
||||
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
builder.bind("voList", policy).
|
||||
|
||||
build();
|
||||
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
double finalTotal = total;
|
||||
String finalFourthAuditName = fourthAuditName;
|
||||
String finalSecondAuditName = secondAuditName;
|
||||
String finalThirdAuditName = thirdAuditName;
|
||||
String finalFirstAuditName = firstAuditName;
|
||||
String finalCommitTime = commitTime;
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
|
||||
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("finalFirstAuditName", finalFirstAuditName);
|
||||
put("finalSecondAuditName", finalSecondAuditName);
|
||||
put("finalThirdAuditName", finalThirdAuditName);
|
||||
put("finalFourthAuditName", finalFourthAuditName);
|
||||
put("applicantName", requestById.getApplicantName());
|
||||
put("commitTme", LocalDateTimeUtil.format(requestById.getCommitTime(), "yyyy年MM月dd日"));
|
||||
put("auditTimeOfPrimary", LocalDateTimeUtil.format(requestById.getAuditTimeOfPrimary(), "yyyy年MM月dd日"));
|
||||
put("auditTimeOfSecondary", LocalDateTimeUtil.format(requestById.getAuditTimeOfSecondary(), "yyyy年MM月dd日"));
|
||||
put("auditTimeOfThreeLeve", LocalDateTimeUtil.format(requestById.getAuditTimeOfThreeLevel(), "yyyy年MM月dd日"));
|
||||
put("approvalOfTime", LocalDateTimeUtil.format(requestById.getApprovalOfTime(), "yyyy年MM月dd日"));
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
|
||||
ByteArrayOutputStream fosWord = new ByteArrayOutputStream();
|
||||
template.write(fosWord);
|
||||
template.close();
|
||||
|
||||
//------------
|
||||
ByteArrayInputStream fisWord = new ByteArrayInputStream(fosWord.toByteArray());
|
||||
fosWord.close();
|
||||
|
||||
//MockMultipartFile mockMultipartFile = new MockMultipartFile("file", entrustmentLetterFileName + ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", fisWord);
|
||||
MockMultipartFile mockMultipartFile = new MockMultipartFile("file", applyFileName + ".docx", "image/jpg", fisWord);
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().
|
||||
|
||||
asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
outPDF.close();
|
||||
|
||||
|
||||
ossFile.fileSave("document" + "/" + "DecentralizeRequest" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -126,7 +126,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
outgoingContents.setLocation(referenceMaterial.getLocation());
|
||||
outgoingContents.setLatticeId(referenceMaterial.getLatticeId());
|
||||
outgoingContents.setBoxId(referenceMaterial.getBoxId());
|
||||
outgoingContents.setCode(referenceMaterial.getCode());
|
||||
outgoingContents.setCode(referenceMaterial.getNumber());
|
||||
outgoingContents.setReagentConsumablesSetId(reagentConsumablesSet.getId());
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
@Override//提交出库登记表
|
||||
@Transactional
|
||||
public DeliveryRegistrationForm commitForm(List<OutgoingContentsDTO> outgoingContentsDTOS, DLPUser dlpUser) {
|
||||
|
||||
//得到出库登记表
|
||||
DeliveryRegistrationForm byId = this.getById(outgoingContentsDTOS.get(0).getDeliveryRegistrationFormId());
|
||||
|
||||
@@ -403,7 +404,7 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
requisitionRecord.setDateOfClaim(LocalDateTime.now());
|
||||
requisitionRecord.setRecipientId(one.getRecipientId());
|
||||
requisitionRecord.setId(byId.getId());
|
||||
requisitionRecord.setDeliveryRegistrationFormId(byId.getId());
|
||||
|
||||
|
||||
requisitionRecordService.updateById(requisitionRecord);
|
||||
@@ -498,7 +499,6 @@ public class DeliveryRegistrationFormServiceImpl extends ServiceImpl<DeliveryReg
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getOne(Wrappers.<ApplicationForUse>query()
|
||||
.eq("claim_code", claimCode));
|
||||
|
||||
|
||||
+5
-10
@@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -220,15 +221,12 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
} else throw new RuntimeException(String.format("审核失败"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void periodVerificationImplementationTablePDF(PeriodVerificationImplementationVO periodVerificationImplementationVO, HttpServletRequest theHttpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
|
||||
System.out.println("periodVerificationImplementationTablePDF.................");
|
||||
|
||||
String id = periodVerificationImplementationVO.getId();
|
||||
|
||||
|
||||
String applyFileName = "标准物质期间核查实施情况及结果记录表" + id;
|
||||
//-----------------------------
|
||||
// 生成 word 版本的 验收记录表
|
||||
@@ -249,13 +247,14 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("referenceMaterialName", periodVerificationImplementationVO.getReferenceMaterialName());
|
||||
put("referenceMaterialNumber", periodVerificationImplementationVO.getReferenceMaterialNumber());
|
||||
put("standardValueOrPurity", periodVerificationImplementationVO.getStandardValueOrPurity());
|
||||
@@ -265,12 +264,11 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
put("implementationAndResults", periodVerificationImplementationVO.getImplementationAndResults());
|
||||
put("causeOfDissatisfactionResult", periodVerificationImplementationVO.isCauseOfDissatisfactionResult());
|
||||
put("causeOfDissatisfaction", periodVerificationImplementationVO.getCauseOfDissatisfaction());
|
||||
put("auditOpinionOfTechnical", periodVerificationImplementationVO.getAuditTimeOfTechnical());
|
||||
put("auditOpinionOfTechnical", periodVerificationImplementationVO.getAuditOpinionOfTechnical());
|
||||
put("technicalDirectorName", periodVerificationImplementationVO.getTechnicalDirectorName());
|
||||
put("remarks", periodVerificationImplementationVO.getRemarks());
|
||||
put("checkingTime", LocalDateTimeUtil.format(periodVerificationImplementationVO.getCheckingTime(), "yyyy年MM月dd日"));
|
||||
put("auditTimeOfTechnical", LocalDateTimeUtil.format(periodVerificationImplementationVO.getAuditTimeOfTechnical(), "yyyy年MM月dd日"));
|
||||
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
@@ -288,17 +286,14 @@ public class PeriodVerificationImplementationServiceImpl extends ServiceImpl<Per
|
||||
Response response = remoteWord2PDFService.word2pdf(mockMultipartFile);
|
||||
fisWord.close();
|
||||
|
||||
|
||||
ByteArrayOutputStream outPDF = new ByteArrayOutputStream();
|
||||
IoUtil.copy(response.body().asInputStream(), outPDF, IoUtil.DEFAULT_MIDDLE_BUFFER_SIZE);
|
||||
ByteArrayInputStream isPDF = new ByteArrayInputStream(outPDF.toByteArray());
|
||||
outPDF.close();
|
||||
|
||||
|
||||
ossFile.fileSave("document" + "/" + "periodVerificationImplementation" + "/" + id + "/" + applyFileName + ".pdf", isPDF);
|
||||
isPDF.close();
|
||||
|
||||
|
||||
System.out.println(String.format("转换为 PDF 结束"));
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -261,6 +261,7 @@ public class PurchaseCatalogueServiceImpl extends ServiceImpl<PurchaseCatalogueM
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getAlias()), "alias", catalogueDetails.getAlias())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getPurityGrade()), "purity_grade", catalogueDetails.getPurityGrade())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getDeviationOrUncertainty()), "deviation_or_uncertainty", catalogueDetails.getDeviationOrUncertainty())
|
||||
.eq(StrUtil.isNotBlank(catalogueDetails.getMinimumUnit()), "minimum_unit", catalogueDetails.getMinimumUnit())
|
||||
);
|
||||
|
||||
if (one == null) {
|
||||
|
||||
+8
-8
@@ -184,18 +184,10 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(Wrappers.<ReagentConsumableInventory>query()
|
||||
.eq("reagent_consumable_id", byId.getReagentConsumableId()));
|
||||
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId())
|
||||
.orderByDesc("create_time"));
|
||||
|
||||
|
||||
WarehousingContent warehousingContent = new WarehousingContent();
|
||||
|
||||
if (batchDetailsList.size() != 0 && batchDetailsList != null) {
|
||||
|
||||
warehousingContent.setLastStorageLocation(batchDetailsList.get(0).getLocation());
|
||||
warehousingContent.setBoxId(batchDetailsList.get(0).getBoxId());
|
||||
warehousingContent.setLatticeId(batchDetailsList.get(0).getLatticeId());
|
||||
}
|
||||
//完善入库内容信息
|
||||
warehousingContent.setId(IdWorker.get32UUID().toUpperCase());
|
||||
|
||||
@@ -216,7 +208,15 @@ public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListMapper, Pur
|
||||
warehousingContent.setPurchaseListDetailsId(purchaseListDetails.getId());
|
||||
|
||||
if (one != null) {
|
||||
List<BatchDetails> batchDetailsList = batchDetailsService.list(Wrappers.<BatchDetails>query().eq("reagent_consumable_inventory_id", one.getReagentConsumableInventoryId())
|
||||
.orderByDesc("create_time"));
|
||||
warehousingContent.setWarningValue(one.getWarningValue());
|
||||
if (batchDetailsList.size() != 0 && batchDetailsList != null) {
|
||||
|
||||
warehousingContent.setLastStorageLocation(batchDetailsList.get(0).getLocation());
|
||||
warehousingContent.setBoxId(batchDetailsList.get(0).getBoxId());
|
||||
warehousingContent.setLatticeId(batchDetailsList.get(0).getLatticeId());
|
||||
}
|
||||
}
|
||||
LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
+5
-11
@@ -31,10 +31,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 试剂耗材库存服务实现类
|
||||
@@ -528,14 +525,15 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
ConfigureBuilder builder = Configure.builder().buildGramer("${", "}").useSpringEL(false);
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
@@ -623,7 +621,7 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
BeanUtils.copyProperties(referenceMaterialServiceById, referenceMaterial);
|
||||
//完善打印信息
|
||||
referenceMaterial.setReferenceMaterialName(byId.getReagentConsumableName());
|
||||
referenceMaterial.setTime(byId1.getExpirationDate());
|
||||
referenceMaterial.setTime("到期:"+byId1.getExpirationDate());
|
||||
data.put("referenceMaterial", referenceMaterial);
|
||||
String templateFileName = "标准物质标签模板.vm";
|
||||
|
||||
@@ -634,13 +632,9 @@ public class ReagentConsumableInventoryServiceImpl extends ServiceImpl<ReagentCo
|
||||
public String printSolutionTag(String id) {
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = standardReserveSolutionService.getStandardReserveSolutionVOById(id);
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
|
||||
String qrCodeImageBase64 = QRCodeUtils.getQRCodeImageBase64(standardReserveSolutionVOById.getSolutionName(), 12, 12);
|
||||
data.put("standardReserveSolution", standardReserveSolutionVOById);
|
||||
String templateFileName = "标准储备溶液标签模板.vm";
|
||||
|
||||
return remoteTemplate2htmlService.getHtml(templateFileName, data);
|
||||
}
|
||||
|
||||
|
||||
+15
-8
@@ -2,14 +2,12 @@ package digital.laboratory.platform.reagent.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import digital.laboratory.platform.reagent.entity.ApplicationForUse;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumableInventory;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumables;
|
||||
import digital.laboratory.platform.reagent.entity.ReagentConsumablesSet;
|
||||
import digital.laboratory.platform.reagent.mapper.ReagentConsumablesSetMapper;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumableInventoryService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesService;
|
||||
import digital.laboratory.platform.reagent.service.ReagentConsumablesSetService;
|
||||
import digital.laboratory.platform.reagent.service.ReferenceMaterialService;
|
||||
import digital.laboratory.platform.reagent.service.*;
|
||||
import digital.laboratory.platform.reagent.vo.ReagentConsumablesSetVO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -37,9 +35,14 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
@Autowired
|
||||
private ReferenceMaterialService referenceMaterialService;
|
||||
|
||||
@Autowired
|
||||
private ApplicationForUseService applicationForUseService;
|
||||
|
||||
@Override
|
||||
public List<ReagentConsumablesSetVO> getList(String applicationForUseId) {
|
||||
|
||||
ApplicationForUse applicationForUse = applicationForUseService.getById(applicationForUseId);
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumablesSet> reagentConsumablesSetLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
reagentConsumablesSetLambdaQueryWrapper.eq(ReagentConsumablesSet::getApplicationForUseId, applicationForUseId);
|
||||
@@ -68,14 +71,18 @@ public class ReagentConsumablesSetServiceImpl extends ServiceImpl<ReagentConsuma
|
||||
ReagentConsumableInventory one = reagentConsumableInventoryService.getOne(reagentConsumableInventoryLambdaQueryWrapper);
|
||||
|
||||
reagentConsumablesSetVO.setTotalQuantity(one.getTotalQuantity());
|
||||
|
||||
}
|
||||
|
||||
//赋值领取码
|
||||
if (applicationForUse.getClaimCode() != null) {
|
||||
reagentConsumablesSetVO.setClaimCode(applicationForUse.getClaimCode());
|
||||
}
|
||||
reagentConsumablesSetVO.setReagentConsumables(byId);
|
||||
|
||||
if (reagentConsumablesSetVO.getReferenceMaterialId()!=null){
|
||||
reagentConsumablesSetVO.setReferenceMaterialNumber(referenceMaterialService.getById(reagentConsumablesSetVO.getReferenceMaterialId()).getNumber()
|
||||
);}
|
||||
if (reagentConsumablesSetVO.getReferenceMaterialId() != null) {
|
||||
reagentConsumablesSetVO.setReferenceMaterialNumber(referenceMaterialService.getById(reagentConsumablesSetVO.getReferenceMaterialId()).getNumber()
|
||||
);
|
||||
}
|
||||
|
||||
reagentConsumablesSetVOS.add(reagentConsumablesSetVO);
|
||||
}
|
||||
|
||||
+5
-3
@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -137,15 +138,16 @@ public class RequisitionRecordServiceImpl extends ServiceImpl<RequisitionRecordM
|
||||
|
||||
Configure config = Configure.builder().
|
||||
bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id",id);
|
||||
put("size",1);
|
||||
|
||||
put("year",year);
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
|
||||
-20
@@ -652,27 +652,7 @@ public class ReviewAndApproveServiceImpl extends ServiceImpl<ReviewAndApproveMap
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购目录已审核列表
|
||||
if (permissions.contains("reagent_purchase_catalogue_audit")) {
|
||||
|
||||
LambdaQueryWrapper<PurchaseCatalogue> purchaseCatalogueLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
purchaseCatalogueLambdaQueryWrapper.eq(PurchaseCatalogue::getAuditorId, dlpUser.getId());
|
||||
|
||||
List<PurchaseCatalogue> list = purchaseCatalogueService.list(purchaseCatalogueLambdaQueryWrapper);
|
||||
|
||||
ArrayList<PurchaseCatalogueVO> purchaseCatalogueVOArrayList = new ArrayList<>();
|
||||
|
||||
for (PurchaseCatalogue purchaseCatalogue : list) {
|
||||
|
||||
PurchaseCatalogueVO purchaseCatalogueVO = purchaseCatalogueService.getPurchaseCatalogueVO(purchaseCatalogue.getPurchaseCatalogueId());
|
||||
|
||||
purchaseCatalogueVOArrayList.add(purchaseCatalogueVO);
|
||||
|
||||
}
|
||||
purchaseCatalogueVOList.addAll(purchaseCatalogueVOArrayList);
|
||||
|
||||
}
|
||||
//采购计划已审核列表
|
||||
if (permissions.contains("reagent_purchasing_plan_audit")) {
|
||||
|
||||
|
||||
+4
-2
@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -234,14 +235,15 @@ public class StandardMaterialApplicationServiceImpl extends ServiceImpl<Standard
|
||||
|
||||
Configure config = Configure.builder().
|
||||
bind("voList", policy).build();
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, config).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("ids", ids);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
}}
|
||||
);
|
||||
bis.close();
|
||||
|
||||
+4
-2
@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
@@ -236,13 +237,14 @@ public class StandardMaterialApprovalFormServiceImpl extends ServiceImpl<Standar
|
||||
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("referenceMaterialName",standardMaterialApprovalFormVO.getReferenceMaterialName());
|
||||
put("referenceMaterialNumber",standardMaterialApprovalFormVO.getReferenceMaterialNumber());
|
||||
put("batchNumber",standardMaterialApprovalFormVO.getBatchNumber());
|
||||
|
||||
+12
-13
@@ -85,6 +85,8 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
public StandardReserveSolutionVO getStandardReserveSolutionVOById(String id) {
|
||||
|
||||
StandardReserveSolutionVO standardReserveSolutionVOById = baseMapper.getStandardReserveSolutionVOById(id);
|
||||
|
||||
standardReserveSolutionVOById.setConfigurationDatePrint("配置日期:"+LocalDateTimeUtil.format(standardReserveSolutionVOById.getConfigurationDate(), "yyyy-MM-dd"));
|
||||
//查出该标准储备溶液对应的所有使用记录
|
||||
List<SolutionUseFormVO> solutionUseFormVOList = solutionUseFormService.getSolutionUseFormVOList(standardReserveSolutionVOById.getId());
|
||||
|
||||
@@ -121,7 +123,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
//计算浓度
|
||||
Double v = standardReserveSolution.getReferenceMaterialScale() / standardReserveSolution.getConstantVolume();
|
||||
|
||||
standardReserveSolution.setConfigurationConcentration(String.format("%.02f", v));
|
||||
standardReserveSolution.setConfigurationConcentration(String.format("%.05f", v));
|
||||
|
||||
LambdaQueryWrapper<ReagentConsumableInventory> reagentConsumableInventoryLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
@@ -160,14 +162,10 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
//创建标准储备溶液对象
|
||||
ReferenceMaterial referenceMaterial = new ReferenceMaterial();
|
||||
//获取当前年月日
|
||||
LocalDate date = LocalDate.now(); // get the current date
|
||||
//获取当前年月日
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
String format = date.format(formatter);
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
|
||||
String prefix = reagentConsumableInventory.getAlias() + "-" + format+"-";
|
||||
String prefix = referenceMaterialServiceById.getNumber()+"--";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -191,7 +189,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
referenceMaterial.setId(IdWorker.get32UUID().toUpperCase());
|
||||
referenceMaterial.setReagentConsumableId(reagentConsumableInventory.getReagentConsumableId());
|
||||
referenceMaterial.setReagentConsumableInventoryId(reagentConsumableInventory.getReagentConsumableInventoryId());
|
||||
referenceMaterial.setNumber(reagentConsumableInventory.getAlias() + "-" + format + "-" + newNo);
|
||||
referenceMaterial.setNumber(prefix+ newNo);
|
||||
|
||||
ReferenceMaterial byId1 = referenceMaterialService.getById(standardReserveSolution.getReferenceMaterialId());
|
||||
|
||||
@@ -236,9 +234,9 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
ReferenceMaterial referenceMaterialServiceById = referenceMaterialService.getById(standardReserveSolutionDTO.getReferenceMaterialId());
|
||||
|
||||
String prefix = one.getAlias() + "-" + format+"-";
|
||||
String prefix = referenceMaterialServiceById.getNumber()+"--";
|
||||
|
||||
List<ReferenceMaterial> list = referenceMaterialService.list(Wrappers.<ReferenceMaterial>query()
|
||||
.likeRight("number", prefix)
|
||||
@@ -258,7 +256,7 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
}
|
||||
}
|
||||
|
||||
referenceMaterial.setNumber(one.getAlias() + "-" + format + "-" + newNo);
|
||||
referenceMaterial.setNumber(prefix + newNo);
|
||||
|
||||
referenceMaterial.setBatchDetailsId(batchDetails.getBatchDetailsId());
|
||||
|
||||
@@ -396,14 +394,15 @@ public class StandardReserveSolutionServiceImpl extends ServiceImpl<StandardRese
|
||||
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("size", 1);
|
||||
put("year", year);
|
||||
put("solutionName", standardReserveSolutionVO.getSolutionName());
|
||||
put("solutionNumbering", standardReserveSolutionVO.getSolutionNumbering());
|
||||
put("referenceMaterialNumber", standardReserveSolutionVO.getReferenceMaterialNumber());
|
||||
|
||||
+4
-1
@@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -145,13 +146,15 @@ public class StandardSolutionCurveServiceImpl extends ServiceImpl<StandardSoluti
|
||||
|
||||
builder.bind("voList", policy).build();
|
||||
|
||||
Calendar instance = Calendar.getInstance();
|
||||
int year = instance.get(Calendar.YEAR);
|
||||
/**
|
||||
* 循环表格
|
||||
*/
|
||||
XWPFTemplate template = XWPFTemplate.compile(bis, builder.build()).render(
|
||||
new HashMap<String, Object>() {{
|
||||
put("voList", voList);
|
||||
put("id", id);
|
||||
put("year", year);
|
||||
put("size", 1);
|
||||
|
||||
|
||||
|
||||
+4
-17
@@ -39,20 +39,13 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
@Transactional
|
||||
public SupplierInformation addInfoById(SupplierInformationDTO supplierInformationDTO) {
|
||||
|
||||
SupplierInformation supplierInformation = new SupplierInformation();
|
||||
SupplierInformation one = this.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", supplierInformationDTO.getSupplierName()));
|
||||
|
||||
LambdaQueryWrapper<SupplierInformation> supplierInformationQueryWrapper = new LambdaQueryWrapper();
|
||||
if (one != null) {
|
||||
|
||||
List<SupplierInformation> list = this.list(supplierInformationQueryWrapper);
|
||||
|
||||
if (list.size() != 0) {
|
||||
|
||||
for (SupplierInformation information : list) {
|
||||
if (information.getSupplierName().equals(supplierInformationDTO.getSupplierName())) {
|
||||
throw new RuntimeException(String.format("该供应商信息已存在"));
|
||||
}
|
||||
}
|
||||
throw new RuntimeException(String.format("该供应商信息已存在"));
|
||||
}
|
||||
SupplierInformation supplierInformation = new SupplierInformation();
|
||||
|
||||
BeanUtils.copyProperties(supplierInformationDTO, supplierInformation);
|
||||
|
||||
@@ -67,12 +60,6 @@ public class SupplierInformationServiceImpl extends ServiceImpl<SupplierInformat
|
||||
@Override
|
||||
public SupplierInformation editInfoById(SupplierInformationDTO supplierInformationDTO) {
|
||||
|
||||
SupplierInformation supplier_name = this.getOne(Wrappers.<SupplierInformation>query().eq("supplier_name", supplierInformationDTO.getSupplierName()));
|
||||
|
||||
if (supplier_name != null) {
|
||||
throw new RuntimeException(String.format("该供应商信息已存在"));
|
||||
}
|
||||
|
||||
SupplierInformation byId = this.getById(supplierInformationDTO.getId());
|
||||
|
||||
BeanUtils.copyProperties(supplierInformationDTO, byId);
|
||||
|
||||
+4
@@ -293,6 +293,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
if (warehousingRecordFormDTO.getCode() != null) {
|
||||
one.setCode(warehousingRecordFormDTO.getCode());
|
||||
ReagentConsumables byId1 = reagentConsumablesService.getById(one.getReagentConsumableId());
|
||||
byId1.setCode(warehousingRecordFormDTO.getCode());
|
||||
reagentConsumablesService.updateById(byId1);
|
||||
}
|
||||
LambdaQueryWrapper<ReagentConsumables> reagentConsumablesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -412,6 +413,7 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
|
||||
WarehousingRecordForm warehousingRecordForm = this.getById(warehousingRecordFormId);
|
||||
|
||||
PurchaseList purchaseList = purchaseListService.getById(purchaseListDetailsService.getById(byId.getPurchaseListDetailsId()).getPurchaseListId());
|
||||
|
||||
//遍历采购内容,判断试剂耗材是否入库完毕
|
||||
for (WarehousingContent warehousingContent : list) {
|
||||
@@ -432,6 +434,8 @@ public class WarehousingRecordFormServiceImpl extends ServiceImpl<WarehousingRec
|
||||
acceptanceSignFor.setWarehousingRecordFormId(warehousingRecordFormId);
|
||||
acceptanceSignFor.setId(IdWorker.get32UUID().toUpperCase());
|
||||
acceptanceSignFor.setQuantity(list.size());
|
||||
acceptanceSignFor.setStatus(1);
|
||||
acceptanceSignFor.setCreateTime(purchaseList.getCreateTime());
|
||||
acceptanceSignForService.save(acceptanceSignFor);
|
||||
AcceptanceRecordForm acceptanceRecordForm = acceptanceRecordFormService.addForm(warehousingContent.getReagentConsumableId(), warehousingContent.getSupplierId(), acceptanceSignFor.getId());
|
||||
warehousingContent.setAcceptanceRecordFormId(acceptanceRecordForm.getId());
|
||||
|
||||
@@ -9,37 +9,40 @@ public class PageUtils {
|
||||
|
||||
/**
|
||||
* 分页函数
|
||||
*
|
||||
* @param currentPage 当前页数
|
||||
* @param pageSize 每一页的数据条数
|
||||
* @param list 要进行分页的数据列表
|
||||
* @return 当前页要展示的数据
|
||||
* @author pochettino
|
||||
* @param currentPage 当前页数
|
||||
* @param pageSize 每一页的数据条数
|
||||
* @param list 要进行分页的数据列表
|
||||
* @return 当前页要展示的数据
|
||||
*/
|
||||
public Page getPages(Integer currentPage, Integer pageSize, List list) {
|
||||
public Page getPages(long currentPage, long pageSize, List list) {
|
||||
Page page = new Page();
|
||||
if(list==null){
|
||||
return null;
|
||||
if (list == null) {
|
||||
return null;
|
||||
}
|
||||
int size = list.size();
|
||||
|
||||
if(pageSize > size) {
|
||||
if (pageSize > size) {
|
||||
pageSize = size;
|
||||
}
|
||||
if (pageSize!=0){
|
||||
if (pageSize != 0) {
|
||||
// 求出最大页数,防止currentPage越界
|
||||
int maxPage = size % pageSize == 0 ? size / pageSize : size / pageSize + 1;
|
||||
long maxPage = size % pageSize == 0 ? size / pageSize : size / pageSize + 1;
|
||||
|
||||
if(currentPage > maxPage) {
|
||||
if (currentPage > maxPage) {
|
||||
currentPage = maxPage;
|
||||
}
|
||||
}
|
||||
// 当前页第一条数据的下标
|
||||
int curIdx = currentPage > 1 ? (currentPage - 1) * pageSize : 0;
|
||||
long x = currentPage > 1 ? (currentPage - 1) * pageSize : 0;
|
||||
|
||||
int curIdx = (int) x;
|
||||
|
||||
List pageList = new ArrayList();
|
||||
|
||||
// 将当前页的数据放进pageList
|
||||
for(int i = 0; i < pageSize && curIdx + i < size; i++) {
|
||||
for (int i = 0; i < pageSize && curIdx + i < size; i++) {
|
||||
pageList.add(list.get(curIdx + i));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package digital.laboratory.platform.reagent.vo;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
public class AcceptanceRecordFormFullVO {
|
||||
|
||||
private String type = "验收任务";
|
||||
|
||||
private LocalDateTime localDateTime;
|
||||
|
||||
List<AcceptanceRecordFormVO> acceptanceRecordFormVOList;
|
||||
|
||||
}
|
||||
@@ -17,4 +17,5 @@ public class ReagentConsumablesSetVO extends ReagentConsumablesSet {
|
||||
|
||||
public Integer totalQuantity;
|
||||
|
||||
public String claimCode;
|
||||
}
|
||||
|
||||
@@ -25,5 +25,5 @@ public class ReferenceMaterialVO extends ReferenceMaterial {
|
||||
|
||||
private String codeName;
|
||||
|
||||
private LocalDate time;
|
||||
private String time;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import digital.laboratory.platform.reagent.entity.StandardReserveSolution;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class StandardReserveSolutionVO extends StandardReserveSolution {
|
||||
@@ -20,4 +21,7 @@ public class StandardReserveSolutionVO extends StandardReserveSolution {
|
||||
private Integer storageLife;
|
||||
|
||||
private String latticeId;
|
||||
|
||||
@ApiModelProperty(value = "配置日期打印")
|
||||
private String configurationDatePrint;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
WHERE user.user_id=arf.three_level_auditor_id
|
||||
) AS three_level_auditor_name
|
||||
FROM acceptance_record_form arf
|
||||
WHERE arf.acceptance_sign_for_id = #{acceptanceSignForId}
|
||||
</sql>
|
||||
|
||||
<select id="getAcceptanceRecordFormVOPage" resultMap="acceptanceRecordFormVO"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="digital.laboratory.platform.reagent.mapper.AcceptanceSignForMapper">
|
||||
|
||||
<resultMap id="acceptanceSignForMap" type="digital.laboratory.platform.reagent.entity.AcceptanceSignFor">
|
||||
<id property="id" column="id"/>
|
||||
<result property="quantity" column="quantity"></result>
|
||||
<result property="warehousingRecordFormId" column="warehousing_record_form_id"></result>
|
||||
<result property="status" column="status"></result>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -17,7 +17,7 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="specificationAndModel" column="specification_and_model"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="id" column="id"/>
|
||||
<result property="deliveryRegistrationFormId" column="delivery_registration_form_id"/>
|
||||
<result property="reagentConsumableName" column="reagent_consumable_name"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
@@ -16,15 +16,19 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="solutionUseFormVO" type="digital.laboratory.platform.reagent.vo.SolutionUseFormVO" extends="solutionUseFormMap">
|
||||
<resultMap id="solutionUseFormVO" type="digital.laboratory.platform.reagent.vo.SolutionUseFormVO"
|
||||
extends="solutionUseFormMap">
|
||||
<result property="userName" column="user_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<select id="getSolutionUseFormVOList" resultMap="solutionUseFormVO" resultType="digital.laboratory.platform.reagent.vo.SolutionUseFormVO">
|
||||
<select id="getSolutionUseFormVOList" resultMap="solutionUseFormVO"
|
||||
resultType="digital.laboratory.platform.reagent.vo.SolutionUseFormVO">
|
||||
select suf.*,
|
||||
(select user.name from dlp_base.sys_user user where user.user_id = suf.user_id) as user_name
|
||||
(select user.name from dlp_base.sys_user user
|
||||
where user.user_id = suf.user_id) as user_name
|
||||
from solution_use_form suf
|
||||
where suf.solution_id = #{solutionId}
|
||||
order by suf.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user