Merge branch 'test' of https://git.will-way.cn/zgty/zt-qms into test
This commit is contained in:
@@ -276,7 +276,7 @@ public class ReportDocumentAssistService {
|
||||
|
||||
private Map<String, Object> buildCreatePayload(String billNo, String workflowId, JSONObject payload) {
|
||||
LinkedHashMap var2 = new LinkedHashMap();
|
||||
var2.put("requestName", "用印-" + billNo);
|
||||
var2.put("requestName", "公司用印申请(新版)-" + billNo);
|
||||
var2.put("workflowId", workflowId);
|
||||
var2.put("mainData", this.buildSealMainData(payload));
|
||||
return var2;
|
||||
|
||||
@@ -106,8 +106,8 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得设备-业务配置分页")
|
||||
public CommonResult<PageResult<DeviceConfigBusinessRuleRespVO>> getDeviceConfigBusinessRulePage(@Valid DeviceConfigBusinessRulePageReqVO pageReqVO) {
|
||||
PageResult<DeviceConfigBusinessRuleDO> pageResult = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DeviceConfigBusinessRuleRespVO.class));
|
||||
PageResult<DeviceConfigBusinessRuleRespVO> pageResult = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@@ -116,9 +116,9 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDeviceConfigBusinessRuleExcel(@Valid DeviceConfigBusinessRulePageReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DeviceConfigBusinessRuleDO> list = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(pageReqVO).getList();
|
||||
List<DeviceConfigBusinessRuleRespVO> list = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "设备-业务配置.xls", "数据", DeviceConfigBusinessRuleRespVO.class, BeanUtils.toBean(list, DeviceConfigBusinessRuleRespVO.class));
|
||||
ExcelUtils.write(response, "设备-业务配置.xls", "数据", DeviceConfigBusinessRuleRespVO.class, list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -94,18 +94,21 @@ public class DeviceProductController extends AbstractFileUploadController implem
|
||||
}
|
||||
|
||||
List<Long> productIdList = list.stream().filter(item -> item.getNodeType().equals(DataTypeConstant.DATA_TYPE_DATA)).map(DeviceProductDO::getId).toList();
|
||||
|
||||
List<DeviceConfigBusinessRuleDO> ruleList = deviceConfigBusinessRuleService.getByProductIdListAndBusinessDomain(productIdList, "");
|
||||
DeviceConfigBusinessRulePageReqVO reqVO = new DeviceConfigBusinessRulePageReqVO();
|
||||
reqVO.setProductIdList(productIdList);
|
||||
reqVO.setPageNo(1);
|
||||
reqVO.setPageSize(-1);
|
||||
List<DeviceConfigBusinessRuleRespVO> ruleList = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(reqVO).getList();
|
||||
for(DeviceProductDO product: list){
|
||||
Long id = product.getId();
|
||||
JSONObject jsonObject = jsonArray.getJSONObject(jsonArray.indexOf(product));
|
||||
for(DeviceConfigBusinessRuleDO rule: ruleList){
|
||||
for(DeviceConfigBusinessRuleRespVO rule: ruleList){
|
||||
Long productId = rule.getProductId();
|
||||
if(!Objects.equals(productId, id))
|
||||
continue;
|
||||
String businessDomain = rule.getBusinessDomain();
|
||||
String key = businessDomain + "_on";
|
||||
jsonObject.put(key, "1");
|
||||
jsonObject.put(businessDomain + "_on", "1");
|
||||
jsonObject.put(businessDomain + "_count", rule.getItemCount());
|
||||
}
|
||||
jsonArray.set(jsonArray.indexOf(product), jsonObject);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -61,4 +62,9 @@ public class DeviceConfigBusinessRulePageReqVO extends PageParam {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
|
||||
//========扩展字段=====
|
||||
@Schema(description = "设备大类id列表")
|
||||
List<Long> productIdList;
|
||||
|
||||
}
|
||||
@@ -79,4 +79,9 @@ public class DeviceConfigBusinessRuleRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
//====================扩展字段============
|
||||
@Schema(description = "配置项数量")
|
||||
@ExcelProperty("配置项数量")
|
||||
private Long itemCount;
|
||||
|
||||
}
|
||||
@@ -3,7 +3,13 @@ package com.zt.plat.module.qms.resource.device.dal.mapper;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
|
||||
import com.zt.plat.module.qms.business.reportdoc.controller.vo.ReportDocumentMainRespVO;
|
||||
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.resource.device.controller.vo.DeviceConfigBusinessRulePageReqVO;
|
||||
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigBusinessRuleRespVO;
|
||||
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceConfigBusinessItemDO;
|
||||
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceConfigBusinessRuleDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@@ -15,9 +21,13 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface DeviceConfigBusinessRuleMapper extends BaseMapperX<DeviceConfigBusinessRuleDO> {
|
||||
|
||||
default PageResult<DeviceConfigBusinessRuleDO> selectPage(DeviceConfigBusinessRulePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DeviceConfigBusinessRuleDO>()
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getProductId, reqVO.getProductId())
|
||||
default PageResult<DeviceConfigBusinessRuleRespVO> selectPage(DeviceConfigBusinessRulePageReqVO reqVO) {
|
||||
MPJLambdaWrapperX<DeviceConfigBusinessRuleDO> wrapper = new MPJLambdaWrapperX<>();
|
||||
wrapper.selectAll(DeviceConfigBusinessRuleDO.class);
|
||||
wrapper.selectSub(DeviceConfigBusinessItemDO.class, s->
|
||||
s.selectCount(DeviceConfigBusinessItemDO::getRuleId).eq(DeviceConfigBusinessItemDO::getRuleId, DeviceConfigBusinessRuleDO::getId), DeviceConfigBusinessRuleRespVO::getItemCount);
|
||||
wrapper.eqIfPresent(DeviceConfigBusinessRuleDO::getProductId, reqVO.getProductId())
|
||||
.inIfPresent(DeviceConfigBusinessRuleDO::getProductId, reqVO.getProductIdList())
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getBusinessDomain, reqVO.getBusinessDomain())
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getRequireFlag, reqVO.getRequireFlag())
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getSubitemDomainType, reqVO.getSubitemDomainType())
|
||||
@@ -32,8 +42,11 @@ public interface DeviceConfigBusinessRuleMapper extends BaseMapperX<DeviceConfig
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getStandard, reqVO.getStandard())
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.eqIfPresent(DeviceConfigBusinessRuleDO::getRemark, reqVO.getRemark())
|
||||
|
||||
.betweenIfPresent(DeviceConfigBusinessRuleDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(DeviceConfigBusinessRuleDO::getId));
|
||||
.orderByDesc(DeviceConfigBusinessRuleDO::getId);
|
||||
// return selectPage(reqVO, new LambdaQueryWrapperX<DeviceConfigBusinessRuleDO>()
|
||||
return selectJoinPage(reqVO, DeviceConfigBusinessRuleRespVO.class, wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -66,6 +66,6 @@ public interface DeviceConfigBusinessRuleService {
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 设备-业务配置分页
|
||||
*/
|
||||
PageResult<DeviceConfigBusinessRuleDO> getDeviceConfigBusinessRulePage(DeviceConfigBusinessRulePageReqVO pageReqVO);
|
||||
PageResult<DeviceConfigBusinessRuleRespVO> getDeviceConfigBusinessRulePage(DeviceConfigBusinessRulePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class DeviceConfigBusinessRuleServiceImpl implements DeviceConfigBusiness
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<DeviceConfigBusinessRuleDO> getDeviceConfigBusinessRulePage(DeviceConfigBusinessRulePageReqVO pageReqVO) {
|
||||
public PageResult<DeviceConfigBusinessRuleRespVO> getDeviceConfigBusinessRulePage(DeviceConfigBusinessRulePageReqVO pageReqVO) {
|
||||
return deviceConfigBusinessRuleMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,7 @@ import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.datapermission.core.annotation.DeptDataPermissionIgnore;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.framework.security.core.LoginUser;
|
||||
import com.zt.plat.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.zt.plat.module.qms.common.service.BusinessFileService;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordapply.vo.RecordApplyJoinPageVO;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordapply.vo.RecordApplyPageReqVO;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordapply.vo.RecordApplyRespVO;
|
||||
import com.zt.plat.module.qms.resource.record.controller.admin.recordapply.vo.RecordApplySaveReqVO;
|
||||
|
||||
@@ -4,10 +4,13 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
@@ -44,8 +47,8 @@ public class RecordApplyPageReqVO extends PageParam {
|
||||
@Schema(description = "评审范围")
|
||||
private String reviewRange;
|
||||
|
||||
// @Schema(description = "分发目标")
|
||||
// private String assignTarget;
|
||||
@Schema(description = "修改标识")
|
||||
private String modifyFlag;
|
||||
|
||||
@Schema(description = "参加评审部门")
|
||||
private String targetDepartmentIds;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user