Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test
This commit is contained in:
@@ -64,14 +64,14 @@ public class BusinessSampleDispatchController implements BusinessControllerMarke
|
|||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/addOrRemoveSample")
|
@PostMapping("/addOrRemoveSample")
|
||||||
@Operation(summary = "增加或移除样品")
|
@Operation(summary = "增加或移除样品")
|
||||||
public CommonResult<Boolean> addOrRemoveSample(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> addOrRemoveSample(@Valid @RequestBody BusinessSampleDispatchSaveReqVO updateReqVO) {
|
||||||
businessSampleDispatchService.addOrRemoveSample(updateReqVO);
|
businessSampleDispatchService.addOrRemoveSample(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/addBySampleCode")
|
@PostMapping("/addBySampleCode")
|
||||||
@Operation(summary = "增加或移除样品")
|
@Operation(summary = "增加或移除样品")
|
||||||
public CommonResult<Boolean> addBySampleCode(HttpServletRequest request) {
|
public CommonResult<Boolean> addBySampleCode(HttpServletRequest request) {
|
||||||
String id = request.getParameter("id");
|
String id = request.getParameter("id");
|
||||||
|
|||||||
@@ -35,17 +35,15 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
|||||||
.leftJoin(ConfigSubSampleDO.class, ConfigSubSampleDO::getId, BusinessSubSampleDO::getConfigSubSampleId)
|
.leftJoin(ConfigSubSampleDO.class, ConfigSubSampleDO::getId, BusinessSubSampleDO::getConfigSubSampleId)
|
||||||
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
|
.leftJoin(DictionaryBusinessDO.class, DictionaryBusinessDO::getId, BusinessSubSampleDO::getDictionaryBusinessId)
|
||||||
//库位
|
//库位
|
||||||
// .leftJoin(ConfigWarehouseLocationDO.class, ConfigWarehouseLocationDO::getId, BusinessSubSampleDO::getConfigWarehouseLocationInfomationId, w->{
|
.leftJoin(ConfigWarehouseLocationDO.class, ConfigWarehouseLocationDO::getId, BusinessSubSampleDO::getConfigWarehouseLocationInfomationId)
|
||||||
// w.eq(ConfigWarehouseLocationDO::getWarehouseType, QmsWarehouseLocationConstant.WAREHOUSE_TYPE_SAMPLE);
|
//仓库
|
||||||
// })
|
.leftJoin(ConfigWarehouseLocationParDO.class, ConfigWarehouseLocationParDO::getId, ConfigWarehouseLocationDO::getParentId)
|
||||||
// //仓库
|
|
||||||
// .leftJoin(ConfigWarehouseLocationParDO.class, ConfigWarehouseLocationParDO::getId, ConfigWarehouseLocationDO::getParentId)
|
|
||||||
.selectAll(BusinessSubSampleDO.class)
|
.selectAll(BusinessSubSampleDO.class)
|
||||||
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
|
.selectAs(DictionaryBusinessDO::getName, BusinessSubSampleExtendRespVO::getDictionaryBusinessName)
|
||||||
.selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint)
|
.selectAs(ConfigSubSampleDO::getIsPrint, BusinessSubSampleExtendRespVO::getIsPrint)
|
||||||
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
|
.selectAs(ConfigSubSampleDO::getPrintTemplate, BusinessSubSampleExtendRespVO::getPrintTemplate)
|
||||||
// .selectAs(ConfigWarehouseLocationDO::getCode, BusinessSubSampleExtendRespVO::getWarehouseLocationCode)
|
.selectAs(ConfigWarehouseLocationDO::getCode, BusinessSubSampleExtendRespVO::getWarehouseLocationCode)
|
||||||
// .selectAs(ConfigWarehouseLocationParDO::getName, BusinessSubSampleExtendRespVO::getWarehouseName)
|
.selectAs(ConfigWarehouseLocationParDO::getName, BusinessSubSampleExtendRespVO::getWarehouseName)
|
||||||
.eqIfPresent(BusinessSubSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
.eqIfPresent(BusinessSubSampleDO::getBusinessBaseSampleId, reqVO.getBusinessBaseSampleId())
|
||||||
.eqIfPresent(BusinessSubSampleDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
.eqIfPresent(BusinessSubSampleDO::getBusinessSubParentSampleId, reqVO.getBusinessSubParentSampleId())
|
||||||
.eqIfPresent(BusinessSubSampleDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
.eqIfPresent(BusinessSubSampleDO::getConfigSubSampleId, reqVO.getConfigSubSampleId())
|
||||||
@@ -83,7 +81,7 @@ public interface BusinessSubSampleMapper extends BaseMapperX<BusinessSubSampleDO
|
|||||||
.eqIfPresent(BusinessSubSampleDO::getUpdateCount, reqVO.getUpdateCount())
|
.eqIfPresent(BusinessSubSampleDO::getUpdateCount, reqVO.getUpdateCount())
|
||||||
.eqIfPresent(BusinessSubSampleDO::getRemark, reqVO.getRemark())
|
.eqIfPresent(BusinessSubSampleDO::getRemark, reqVO.getRemark())
|
||||||
.eqIfPresent(BusinessSubSampleDO::getUpSampleRecordId, reqVO.getUpSampleRecordId())
|
.eqIfPresent(BusinessSubSampleDO::getUpSampleRecordId, reqVO.getUpSampleRecordId())
|
||||||
// .likeIfPresent(ConfigWarehouseLocationDO::getCode, reqVO.getWarehouseLocationCode())
|
.likeIfPresent(ConfigWarehouseLocationDO::getCode, reqVO.getWarehouseLocationCode())
|
||||||
.orderByDesc(BusinessSubSampleDO::getSampleFlowNodeTime).orderByAsc(BusinessSubSampleDO::getSampleCode));
|
.orderByDesc(BusinessSubSampleDO::getSampleFlowNodeTime).orderByAsc(BusinessSubSampleDO::getSampleCode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ public class ReportDocumentMainController extends AbstractFileUploadController i
|
|||||||
if(typeDO == null){
|
if(typeDO == null){
|
||||||
return error(REPORT_DOCUMENT_TYPE_NOT_EXISTS, "报告类型不存在,请刷新后重试");
|
return error(REPORT_DOCUMENT_TYPE_NOT_EXISTS, "报告类型不存在,请刷新后重试");
|
||||||
}
|
}
|
||||||
|
vo.setDocumentTitle(typeDO.getName());
|
||||||
vo.setFlowKey(typeDO.getFlowKey());
|
vo.setFlowKey(typeDO.getFlowKey());
|
||||||
vo.setDocumentType(typeDO.getDocumentType());
|
vo.setDocumentType(typeDO.getDocumentType());
|
||||||
vo.setConfigReportTypeId(typeDO.getConfigReportTypeId());
|
vo.setConfigReportTypeId(typeDO.getConfigReportTypeId());
|
||||||
@@ -244,8 +245,8 @@ public class ReportDocumentMainController extends AbstractFileUploadController i
|
|||||||
@Operation(summary = "获得检测报告业务分页")
|
@Operation(summary = "获得检测报告业务分页")
|
||||||
//@PreAuthorize("@ss.hasPermission('qms:report-document-main:query')")
|
//@PreAuthorize("@ss.hasPermission('qms:report-document-main:query')")
|
||||||
public CommonResult<PageResult<ReportDocumentMainRespVO>> getReportDocumentMainPage(@Valid ReportDocumentMainPageReqVO pageReqVO) {
|
public CommonResult<PageResult<ReportDocumentMainRespVO>> getReportDocumentMainPage(@Valid ReportDocumentMainPageReqVO pageReqVO) {
|
||||||
PageResult<ReportDocumentMainDO> pageResult = reportDocumentMainService.getReportDocumentMainPage(pageReqVO);
|
PageResult<ReportDocumentMainRespVO> pageResult = reportDocumentMainService.getReportDocumentMainPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, ReportDocumentMainRespVO.class));
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@@ -255,10 +256,9 @@ public class ReportDocumentMainController extends AbstractFileUploadController i
|
|||||||
public void exportReportDocumentMainExcel(@Valid ReportDocumentMainPageReqVO pageReqVO,
|
public void exportReportDocumentMainExcel(@Valid ReportDocumentMainPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<ReportDocumentMainDO> list = reportDocumentMainService.getReportDocumentMainPage(pageReqVO).getList();
|
List<ReportDocumentMainRespVO> list = reportDocumentMainService.getReportDocumentMainPage(pageReqVO).getList();
|
||||||
// 导出 Excel
|
// 导出 Excel
|
||||||
ExcelUtils.write(response, "检测报告业务.xls", "数据", ReportDocumentMainRespVO.class,
|
ExcelUtils.write(response, "检测报告业务.xls", "数据", ReportDocumentMainRespVO.class, list);
|
||||||
BeanUtils.toBean(list, ReportDocumentMainRespVO.class));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -113,4 +113,10 @@ public class ReportDocumentMainRespVO {
|
|||||||
@Schema(description = "表单设计器模板id")
|
@Schema(description = "表单设计器模板id")
|
||||||
@ExcelProperty("表单设计器模板id")
|
@ExcelProperty("表单设计器模板id")
|
||||||
private Long dataTemplateId;
|
private Long dataTemplateId;
|
||||||
|
|
||||||
|
//==============================扩展字段=======================================
|
||||||
|
@Schema(description = "记录数")
|
||||||
|
@ExcelProperty("记录数")
|
||||||
|
private Long detailDataCount;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,7 +3,9 @@ package com.zt.plat.module.qms.business.reportdoc.dal.mapper;
|
|||||||
import com.zt.plat.framework.common.pojo.PageResult;
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
import com.zt.plat.module.qms.business.reportdoc.controller.vo.*;
|
||||||
|
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentDataDO;
|
||||||
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentMainDO;
|
import com.zt.plat.module.qms.business.reportdoc.dal.dataobject.ReportDocumentMainDO;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
@@ -21,10 +23,13 @@ import java.util.List;
|
|||||||
public interface ReportDocumentMainMapper extends BaseMapperX<ReportDocumentMainDO> {
|
public interface ReportDocumentMainMapper extends BaseMapperX<ReportDocumentMainDO> {
|
||||||
|
|
||||||
|
|
||||||
default PageResult<ReportDocumentMainDO> selectPage(ReportDocumentMainPageReqVO reqVO) {
|
default PageResult<ReportDocumentMainRespVO> selectPage(ReportDocumentMainPageReqVO reqVO) {
|
||||||
String flowStatus = reqVO.getFlowStatus();
|
String flowStatus = reqVO.getFlowStatus();
|
||||||
|
|
||||||
LambdaQueryWrapperX<ReportDocumentMainDO> wrapper = new LambdaQueryWrapperX<>();
|
MPJLambdaWrapperX<ReportDocumentMainDO> wrapper = new MPJLambdaWrapperX<>();
|
||||||
|
wrapper.selectSub(ReportDocumentDataDO.class, s->
|
||||||
|
s.selectCount(ReportDocumentDataDO::getMainId).eq(ReportDocumentDataDO::getMainId, ReportDocumentMainDO::getId), ReportDocumentMainRespVO::getDetailDataCount);
|
||||||
|
wrapper.selectAll(ReportDocumentMainDO.class);
|
||||||
wrapper.ne(ReportDocumentMainDO::getCancelFlag, -1); //-1为临时数据
|
wrapper.ne(ReportDocumentMainDO::getCancelFlag, -1); //-1为临时数据
|
||||||
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowInstanceId, reqVO.getFlowInstanceId());
|
wrapper.eqIfPresent(ReportDocumentMainDO::getFlowInstanceId, reqVO.getFlowInstanceId());
|
||||||
wrapper.eqIfPresent(ReportDocumentMainDO::getReportDocumentTypeId, reqVO.getReportDocumentTypeId());
|
wrapper.eqIfPresent(ReportDocumentMainDO::getReportDocumentTypeId, reqVO.getReportDocumentTypeId());
|
||||||
@@ -49,7 +54,7 @@ public interface ReportDocumentMainMapper extends BaseMapperX<ReportDocumentMain
|
|||||||
wrapper.betweenIfPresent(ReportDocumentMainDO::getCreateTime, reqVO.getCreateTime());
|
wrapper.betweenIfPresent(ReportDocumentMainDO::getCreateTime, reqVO.getCreateTime());
|
||||||
wrapper.eqIfPresent(ReportDocumentMainDO::getRemark, reqVO.getRemark());
|
wrapper.eqIfPresent(ReportDocumentMainDO::getRemark, reqVO.getRemark());
|
||||||
wrapper.orderByDesc(ReportDocumentMainDO::getId);
|
wrapper.orderByDesc(ReportDocumentMainDO::getId);
|
||||||
return selectPage(reqVO, wrapper);
|
return selectJoinPage(reqVO, ReportDocumentMainRespVO.class, wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,7 @@ public interface ReportDocumentDataService {
|
|||||||
CommonResult<List<JSONObject>> assembleDynamicData(ReportDocumentMainDO mainData, ReportDocumentTypeDO reportConfig);
|
CommonResult<List<JSONObject>> assembleDynamicData(ReportDocumentMainDO mainData, ReportDocumentTypeDO reportConfig);
|
||||||
|
|
||||||
CommonResult<List<ReportDocumentDataDO>> listByMainDataId(Long mainDataId);
|
CommonResult<List<ReportDocumentDataDO>> listByMainDataId(Long mainDataId);
|
||||||
|
CommonResult<Long> countMainDataId(Long mainDataId);
|
||||||
CommonResult<String> removeByMainIdAndDetailIds(Long mainDataId, List<Long> detailIds);
|
CommonResult<String> removeByMainIdAndDetailIds(Long mainDataId, List<Long> detailIds);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -77,7 +77,7 @@ public interface ReportDocumentMainService {
|
|||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 检测报告业务分页
|
* @return 检测报告业务分页
|
||||||
*/
|
*/
|
||||||
PageResult<ReportDocumentMainDO> getReportDocumentMainPage(ReportDocumentMainPageReqVO pageReqVO);
|
PageResult<ReportDocumentMainRespVO> getReportDocumentMainPage(ReportDocumentMainPageReqVO pageReqVO);
|
||||||
|
|
||||||
//发起流程
|
//发起流程
|
||||||
CommonResult<ReportDocumentMainRespVO> createProcessInstance(ReportDocumentMainSaveReqVO entity);
|
CommonResult<ReportDocumentMainRespVO> createProcessInstance(ReportDocumentMainSaveReqVO entity);
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ public class ReportDocumentMainServiceImpl implements ReportDocumentMainService,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<ReportDocumentMainDO> getReportDocumentMainPage(ReportDocumentMainPageReqVO pageReqVO) {
|
public PageResult<ReportDocumentMainRespVO> getReportDocumentMainPage(ReportDocumentMainPageReqVO pageReqVO) {
|
||||||
return reportDocumentMainMapper.selectPage(pageReqVO);
|
return reportDocumentMainMapper.selectPage(pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user