New file |
| | |
| | | package com.zt.life.modules.contractReview.controller; |
| | | |
| | | |
| | | import com.zt.common.annotation.LogOperation; |
| | | import com.zt.common.constant.Constant; |
| | | import com.zt.common.annotation.QueryParam; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.common.servlet.PageResult; |
| | | import com.zt.common.validator.AssertUtils; |
| | | import com.zt.common.validator.ValidatorUtils; |
| | | import com.zt.common.validator.group.AddGroup; |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.contractReview.dto.ContractReviewDto; |
| | | import com.zt.life.modules.contractReview.model.ContractReview; |
| | | import com.zt.life.modules.contractReview.service.ContractReviewService; |
| | | import com.zt.life.modules.itemCirculatOrder.dto.ItemCirculatOrderDto; |
| | | import com.zt.life.modules.itemCirculatOrder.service.ItemCirculatOrderService; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * contract_review |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/contractReview/ContractReview/") |
| | | @Api(tags="contract_review") |
| | | public class ContractReviewController { |
| | | @Autowired |
| | | private ContractReviewService contractReviewService; |
| | | |
| | | @Autowired |
| | | private SysCodeRuleService sysCodeRuleService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = "reviewPhase", value = "评审阶段", dataType = Constant.QT.STRING, format = "a.review_phase^EQ"), |
| | | @ApiImplicitParam(name = "softwareName", value = "物品名称", dataType = Constant.QT.STRING, format = "p.software_name^EQ"), |
| | | @ApiImplicitParam(name = "softwareIdentity", value = "物品编号", dataType = Constant.QT.STRING, format = "p.software_identity^EQ") |
| | | }) |
| | | public PageResult<ContractReview> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | return PageResult.ok(contractReviewService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("getDto") |
| | | @ApiOperation("信息") |
| | | public Result<ContractReviewDto> getDto(Long projectId, Long reviewId) { |
| | | ContractReviewDto data = contractReviewService.getDto(projectId, reviewId); |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result<Long> insert(@RequestBody ContractReviewDto reviewDto){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(reviewDto.getContractReview(), AddGroup.class, DefaultGroup.class); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "contract_review"); |
| | | map.put("projectId",reviewDto.getProjectId().toString()); |
| | | reviewDto.getContractReview().setCode(sysCodeRuleService.getNewCode(map)); |
| | | Boolean result = contractReviewService.save(reviewDto); |
| | | return Result.ok(reviewDto.getContractReview().getId()); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result<Long> update(@RequestBody ContractReviewDto reviewDto){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(reviewDto.getContractReview(), UpdateGroup.class, DefaultGroup.class); |
| | | Boolean result = contractReviewService.save(reviewDto); |
| | | |
| | | return Result.ok(reviewDto.getContractReview().getId()); |
| | | } |
| | | |
| | | |
| | | @DeleteMapping("deleteReview") |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | contractReviewService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | /* @GetMapping("exportReview") |
| | | @ApiOperation("打印合同评审单") |
| | | @LogOperation("打印合同评审单") |
| | | public void exportReview(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | contractReviewService.exportReview(id, request, response); |
| | | }*/ |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.controller; |
| | | |
| | | |
| | | import com.zt.common.annotation.LogOperation; |
| | | import com.zt.common.constant.Constant; |
| | | import com.zt.common.annotation.QueryParam; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import com.zt.common.servlet.Result; |
| | | import com.zt.common.servlet.PageResult; |
| | | import com.zt.common.validator.AssertUtils; |
| | | import com.zt.common.validator.ValidatorUtils; |
| | | import com.zt.common.validator.group.AddGroup; |
| | | import com.zt.common.validator.group.DefaultGroup; |
| | | import com.zt.common.validator.group.UpdateGroup; |
| | | import com.zt.life.modules.contractReview.model.ContractReviewItem; |
| | | import com.zt.life.modules.contractReview.service.ContractReviewItemService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | |
| | | /** |
| | | * contract_review_item |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/contractReviewItem/ContractReviewItem/") |
| | | @Api(tags="contract_review_item") |
| | | public class ContractReviewItemController { |
| | | @Autowired |
| | | private ContractReviewItemService contractReviewItemService; |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = Constant.Q.PAGE, value = Constant.QV.PAGE, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.LIMIT, value = Constant.QV.LIMIT, required = true, dataType = Constant.QT.INT), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER_FIELD, value = Constant.QV.ORDER_FIELD, dataType = Constant.QT.STRING), |
| | | @ApiImplicitParam(name = Constant.Q.ORDER, value = Constant.QV.ORDER, dataType = Constant.QT.STRING), |
| | | }) |
| | | public PageResult<ContractReviewItem> page(@ApiIgnore @QueryParam QueryFilter queryFilter){ |
| | | |
| | | return PageResult.ok(contractReviewItemService.page(queryFilter)); |
| | | } |
| | | |
| | | @GetMapping("{id}") |
| | | @ApiOperation("信息") |
| | | public Result<ContractReviewItem> get(@PathVariable("id") Long id){ |
| | | ContractReviewItem data = contractReviewItemService.get(id); |
| | | |
| | | return Result.ok(data); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("新增") |
| | | @LogOperation("新增") |
| | | public Result insert(@RequestBody ContractReviewItem contractReviewItem){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(contractReviewItem, AddGroup.class, DefaultGroup.class); |
| | | contractReviewItemService.insert(contractReviewItem); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation("修改") |
| | | @LogOperation("修改") |
| | | public Result update(@RequestBody ContractReviewItem contractReviewItem){ |
| | | //效验数据 |
| | | ValidatorUtils.validateEntity(contractReviewItem, UpdateGroup.class, DefaultGroup.class); |
| | | contractReviewItemService.update(contractReviewItem); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @ApiOperation("删除") |
| | | @LogOperation("删除") |
| | | public Result delete(@RequestBody Long[] ids){ |
| | | //效验数据 |
| | | AssertUtils.isArrayEmpty(ids, "id"); |
| | | contractReviewItemService.delete(ids); |
| | | |
| | | return Result.ok(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.contractReview.model.ContractReview; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * contract_review |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @Mapper |
| | | public interface ContractReviewDao extends BaseDao<ContractReview> { |
| | | |
| | | List<ContractReview> getList(Map<String, Object> params); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.dao; |
| | | |
| | | import com.zt.common.dao.BaseDao; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.contractReview.model.ContractReviewItem; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * contract_review_item |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @Mapper |
| | | public interface ContractReviewItemDao extends BaseDao<ContractReviewItem> { |
| | | |
| | | List<ContractReviewItem> getList(Map<String, Object> params); |
| | | List<ContractReviewItem> itemList(String dictType); |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.dto; |
| | | |
| | | import com.zt.life.modules.contractReview.model.ContractReview; |
| | | import com.zt.life.modules.contractReview.model.ContractReviewItem; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrder; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; |
| | | import com.zt.life.modules.project.model.Project; |
| | | import com.zt.life.modules.sysBaseInfo.model.TestAgencyInfo; |
| | | import com.zt.modules.workflow.dto.FlowInfoDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ContractReviewDto { |
| | | private Long id; |
| | | private Long projectId; |
| | | private Long reviewId; |
| | | |
| | | @ApiModelProperty(value = "测试项目基本信息") |
| | | private Project project; |
| | | @ApiModelProperty(value = "合同评审表") |
| | | private ContractReview contractReview; |
| | | @ApiModelProperty(value = "测试机构信息") |
| | | private TestAgencyInfo TestAgencyInfo; |
| | | |
| | | |
| | | @ApiModelProperty(value = "评审项列表") |
| | | private List<ContractReviewItem> reviewItemList = new ArrayList<>(); |
| | | } |
| | | |
New file |
| | |
| | | package com.zt.life.modules.contractReview.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * contract_review |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("contract_review") |
| | | public class ContractReview extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "编号") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "项目ID") |
| | | private Long projectId; |
| | | |
| | | @ApiModelProperty(value = "委托单编号") |
| | | private String orderCode; |
| | | |
| | | @ApiModelProperty(value = "评审类型") |
| | | private String reviewType; |
| | | |
| | | @ApiModelProperty(value = "评审记录") |
| | | private String reviewRecord; |
| | | |
| | | @ApiModelProperty(value = "客户的特殊要求") |
| | | private String specialRequire; |
| | | |
| | | @ApiModelProperty(value = "分包") |
| | | private String subcontract; |
| | | |
| | | @ApiModelProperty(value = "评审结论") |
| | | private String reviewConclusion; |
| | | |
| | | @ApiModelProperty(value = "技术负责人") |
| | | private String technicalDirector; |
| | | |
| | | @ApiModelProperty(value = "评审日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date reviewDate; |
| | | |
| | | @ApiModelProperty(value = "评审组成员") |
| | | private String reviewPanelMember; |
| | | |
| | | @ApiModelProperty(value = "年份") |
| | | private String year; |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.zt.common.entity.BusiEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * contract_review_item |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper=false) |
| | | @TableName("contract_review_item") |
| | | public class ContractReviewItem extends BusiEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "评审单ID") |
| | | private Long reviewId; |
| | | |
| | | @ApiModelProperty(value = "序号") |
| | | private Integer no; |
| | | |
| | | @ApiModelProperty(value = "评审项") |
| | | private String item; |
| | | |
| | | @ApiModelProperty(value = "评审结果") |
| | | private String result; |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.service; |
| | | |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.core.sys.dto.DictIstance; |
| | | import com.zt.life.modules.contractReview.dao.ContractReviewItemDao; |
| | | import com.zt.life.modules.contractReview.model.ContractReviewItem; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * contract_review_item |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @Service |
| | | public class ContractReviewItemService extends BaseService<ContractReviewItemDao, ContractReviewItem> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<ContractReviewItem> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public List<ContractReviewItem> getList(Long reviewId) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("reviewId",reviewId); |
| | | return baseDao.getList(params); |
| | | } |
| | | public List<ContractReviewItem> itemList(String dictType) { |
| | | return baseDao.itemList(dictType); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zt.life.modules.contractReview.service; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.zt.common.service.BaseService; |
| | | import com.zt.life.export.dto.WordFile; |
| | | import com.zt.life.export.service.WordFileService; |
| | | import com.zt.life.modules.contractReview.dao.ContractReviewDao; |
| | | import com.zt.life.modules.contractReview.dto.ContractReviewDto; |
| | | import com.zt.life.modules.contractReview.model.ContractReview; |
| | | import com.zt.life.modules.contractReview.model.ContractReviewItem; |
| | | import com.zt.life.modules.mainPart.utils.GetFilesPath; |
| | | import com.zt.life.modules.mainPart.utils.GetShowDictList; |
| | | import com.zt.life.modules.project.model.Project; |
| | | import com.zt.life.modules.project.service.ProjectService; |
| | | import com.zt.life.modules.project.service.SoftwareTestOrderDeliverableService; |
| | | import com.zt.life.modules.project.service.SoftwareTestOrderService; |
| | | import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService; |
| | | import com.zt.life.sys.dto.OssDto; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | | import com.zt.modules.oss.service.SysOssService; |
| | | import com.zt.modules.workflow.dto.FlowInfoDto; |
| | | import com.zt.modules.workflow.service.WorkflowService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * contract_review |
| | | * |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-12-15 |
| | | */ |
| | | @Service |
| | | public class ContractReviewService extends BaseService<ContractReviewDao, ContractReview> { |
| | | |
| | | @Autowired |
| | | private SysOssConfigService sysOssConfigService; |
| | | @Autowired |
| | | private SoftwareTestOrderService softwareTestOrderService; |
| | | |
| | | @Autowired |
| | | private SysOssService sysOssService; |
| | | |
| | | @Autowired |
| | | private TestAgencyInfoService testAgencyInfoService; |
| | | |
| | | @Autowired |
| | | private SysCodeRuleService sysCodeRuleService; |
| | | |
| | | @Autowired |
| | | private ProjectService projectService; |
| | | |
| | | @Autowired |
| | | private ContractReviewItemService itemService; |
| | | |
| | | @Autowired |
| | | private WorkflowService workflowService; |
| | | |
| | | @Autowired |
| | | private GetShowDictList getShowDictList; |
| | | |
| | | @Autowired |
| | | private WordFileService wordFileService; |
| | | |
| | | @Autowired |
| | | private GetFilesPath getFilesPath; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param queryFilter |
| | | * @return |
| | | */ |
| | | public List<ContractReview> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | | */ |
| | | public void delete(Long[] ids) { |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public Boolean save(ContractReviewDto reviewDto) { |
| | | Long reviewId = reviewDto.getContractReview().getId(); |
| | | if (reviewId != null) |
| | | baseDao.updateById(reviewDto.getContractReview()); |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "contract_review"); |
| | | map.put("projectId", reviewDto.getProjectId().toString()); |
| | | reviewDto.getContractReview().setProjectId(reviewDto.getProjectId()); |
| | | reviewDto.getContractReview().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(reviewDto.getContractReview()); |
| | | reviewId = reviewDto.getContractReview().getId(); |
| | | } |
| | | |
| | | for (ContractReviewItem reviewItem : reviewDto.getReviewItemList()) { |
| | | reviewItem.setReviewId(reviewId); |
| | | if (reviewItem.getId() != null) { |
| | | itemService.update(reviewItem); |
| | | } else { |
| | | reviewItem.setReviewId(reviewId); |
| | | itemService.insert(reviewItem); |
| | | } |
| | | } |
| | | |
| | | if (reviewDto.getTestAgencyInfo().getId() == 10000) { |
| | | reviewDto.getTestAgencyInfo().setId(reviewId); |
| | | testAgencyInfoService.insert(reviewDto.getTestAgencyInfo()); |
| | | } else { |
| | | testAgencyInfoService.update(reviewDto.getTestAgencyInfo()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public ContractReviewDto getDto(Long projectId, Long reviewId) { |
| | | ContractReviewDto data = new ContractReviewDto(); |
| | | if (reviewId != null) { |
| | | data.setId(reviewId); |
| | | ContractReview contractReview = this.get(reviewId); |
| | | data.setContractReview(contractReview); |
| | | if (projectId == null) { |
| | | projectId = contractReview.getProjectId(); |
| | | } |
| | | |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(reviewId)); |
| | | |
| | | List<ContractReviewItem> reviewItemList = itemService.getList(reviewId); |
| | | data.setReviewItemList(reviewItemList); |
| | | |
| | | } else { |
| | | ContractReview contractReview = new ContractReview(); |
| | | data.setContractReview(contractReview); |
| | | String dictType ="contract_review_item"; |
| | | List<?> resultList = itemService.itemList(dictType); |
| | | List<?> reviewItemList = resultList; |
| | | data.setReviewItemList((List<ContractReviewItem>) reviewItemList); |
| | | } |
| | | |
| | | if (projectId != null) { |
| | | data.setProjectId(projectId); |
| | | Project project = projectService.get(projectId); |
| | | data.setProject(project); |
| | | } |
| | | data.getContractReview().setOrderCode(softwareTestOrderService.selectOrderId(projectId)); |
| | | if (data.getTestAgencyInfo() == null) |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(10000L)); |
| | | return data; |
| | | } |
| | | /* |
| | | public void exportCirculatOrder(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | ContractReviewDto dataObj = this.getDto(null, id); |
| | | |
| | | String acceptorPath = "文件图片:"+ getFilesPath.getSignPath(Convert.toLong(dataObj.getContractReview().getItemAcceptorId())); |
| | | dataObj.getContractReview().setItemAcceptor(acceptorPath); |
| | | String detectorPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getContractReview().getCalibratDetectorId())); |
| | | dataObj.getContractReview().setCalibratDetector(detectorPath); |
| | | String issuerPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getContractReview().getItemIssuerId())); |
| | | dataObj.getContractReview().setItemIssuer(issuerPath); |
| | | //通用字典列表字符串生成 |
| | | String itemRequireStr = getShowDictList.getShowDictList(dataObj.getContractReview().getItemRequire(), "is_or_not", false); |
| | | dataObj.getContractReview().setItemRequireStr(itemRequireStr); |
| | | |
| | | String acceptSituationStr = getShowDictList.getShowDictList(dataObj.getContractReview().getAcceptSituation(), "is_or_not", false); |
| | | dataObj.getContractReview().setAcceptSituationStr(acceptSituationStr); |
| | | |
| | | String detectSituationStr = getShowDictList.getShowDictList(dataObj.getContractReview().getDetectSituation(), "is_or_not", false); |
| | | dataObj.getContractReview().setDetectSituationStr(detectSituationStr); |
| | | |
| | | String issueSituationStr = getShowDictList.getShowDictList(dataObj.getContractReview().getIssueSituation(), "is_or_not", false); |
| | | dataObj.getContractReview().setIssueSituationStr(issueSituationStr); |
| | | |
| | | for (ContractReviewItem reviewItem : dataObj.getReviewItemList()) { |
| | | String value = reviewItem.getSecretClass(); |
| | | String secretClassStr = getShowDictList.getShowDictList(value, "secret_class", false); |
| | | reviewItem.setSecretClass(secretClassStr); |
| | | } |
| | | |
| | | |
| | | WordFile wordFile = new WordFile(); |
| | | wordFile.setModulePath("物品流转单.docx"); |
| | | wordFile.setWordName(dataObj.getProject().getSoftwareName() + "_物品流转单.docx"); |
| | | wordFileService.exportWordFile(request, dataObj, wordFile, response); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | } |
| | | |
| | | public Boolean save(ItemCirculatOrderDto itemCirculatOrderDto) { |
| | | Long circulatOrderid = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | if (circulatOrderid != null) |
| | | Long circulatOrderId = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | if (circulatOrderId != null) |
| | | baseDao.updateById(itemCirculatOrderDto.getCirculatOrder()); |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | |
| | | itemCirculatOrderDto.getCirculatOrder().setProjectId(itemCirculatOrderDto.getProjectId()); |
| | | itemCirculatOrderDto.getCirculatOrder().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(itemCirculatOrderDto.getCirculatOrder()); |
| | | circulatOrderid = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | circulatOrderId = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | } |
| | | |
| | | for (ItemCirculatOrderTechnical circulatOrderTechnical : itemCirculatOrderDto.getTechnicalList()) { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | if (circulatOrderTechnical.getId() != null) { |
| | | technicalService.update(circulatOrderTechnical); |
| | | } else { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | |
| | | if (itemCirculatOrderDto.getTestAgencyInfo().getId() == 10000) { |
| | | itemCirculatOrderDto.getTestAgencyInfo().setId(circulatOrderid); |
| | | itemCirculatOrderDto.getTestAgencyInfo().setId(circulatOrderId); |
| | | testAgencyInfoService.insert(itemCirculatOrderDto.getTestAgencyInfo()); |
| | | } else { |
| | | testAgencyInfoService.update(itemCirculatOrderDto.getTestAgencyInfo()); |
| | |
| | | return true; |
| | | } |
| | | |
| | | public ItemCirculatOrderDto getDto(Long projectId, Long circulatOrderid) { |
| | | public ItemCirculatOrderDto getDto(Long projectId, Long circulatOrderId) { |
| | | ItemCirculatOrderDto data = new ItemCirculatOrderDto(); |
| | | if (circulatOrderid != null) { |
| | | data.setId(circulatOrderid); |
| | | ItemCirculatOrder itemCirculatOrder = this.get(circulatOrderid); |
| | | if (circulatOrderId != null) { |
| | | data.setId(circulatOrderId); |
| | | ItemCirculatOrder itemCirculatOrder = this.get(circulatOrderId); |
| | | data.setCirculatOrder(itemCirculatOrder); |
| | | if (projectId == null) { |
| | | projectId = itemCirculatOrder.getProjectId(); |
| | | } |
| | | |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(circulatOrderid)); |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(circulatOrderId)); |
| | | |
| | | List<ItemCirculatOrderTechnical> technicalList = technicalService.getList(circulatOrderid); |
| | | List<ItemCirculatOrderTechnical> technicalList = technicalService.getList(circulatOrderId); |
| | | data.setTechnicalList(technicalList); |
| | | |
| | | } else { |
| | |
| | | } |
| | | if (data.getTestAgencyInfo() == null) |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(10000L)); |
| | | if (circulatOrderid != null) { |
| | | if (circulatOrderId != null) { |
| | | for (ItemCirculatOrderTechnical technical : data.getTechnicalList()) { |
| | | Long technicalId = technical.getId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(technicalId, "circulat_order"); |
| | |
| | | |
| | | List<SoftwareTestOrder> getList(Map<String, Object> params); |
| | | List<DictIstance> dictList(String dictType, String projectCode,String softIdentity); |
| | | String selectOrderId(Long projectId); |
| | | } |
| | |
| | | } |
| | | return list; |
| | | } |
| | | public String selectOrderId(Long projectId) { |
| | | return baseDao.selectOrderId(projectId); |
| | | } |
| | | |
| | | |
| | | /** |
New file |
| | |
| | | <?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="com.zt.life.modules.contractReview.dao.ContractReviewDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.contractReview.model.ContractReview"> |
| | | select a.*, p.software_name,p.software_identity |
| | | from contract_review a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | | a.is_delete = 0 and p.is_delete = 0 |
| | | <if test="whereSql!=null"> |
| | | and ${whereSql} |
| | | </if> |
| | | </where> |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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="com.zt.life.modules.contractReview.dao.ContractReviewItemDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.life.modules.contractReview.model.ContractReviewItem"> |
| | | select a.* |
| | | from contract_review_item a |
| | | <where> |
| | | a.is_delete = 0 |
| | | <if test="reviewId!=null"> |
| | | and warehouse_id = ${reviewId} |
| | | </if> |
| | | </where> |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | | </if> |
| | | </select> |
| | | <select id="itemList" resultType="com.zt.life.modules.contractReview.model.ContractReviewItem"> |
| | | SET @row_number = 0; |
| | | SELECT dd.dict_label AS item, |
| | | (@row_number := @row_number + 1) AS no |
| | | FROM sys_dict_type dt |
| | | JOIN sys_dict_data dd ON dt.ID = dd.DICT_TYPE_ID |
| | | <where> |
| | | dd.IS_DELETE = 0 |
| | | <if test="dictType != null and dictType != ''"> |
| | | and dt.DICT_TYPE = #{dictType} |
| | | </if> |
| | | </where> |
| | | ORDER BY dd.sort |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="tableName!=null"> |
| | | and id not in (select project_id from ${tableName} where is_delete = 0) |
| | | </if> |
| | | <if test="tableName =='contract_review'"> |
| | | and is_contract =1 |
| | | </if> |
| | | </where> |
| | | <if test="orderBySql!=null"> |
| | | ORDER BY ${orderBySql} |
| | |
| | | <select id="getList" resultType="com.zt.life.modules.project.model.SoftwareTestOrder"> |
| | | SELECT a.*, p.software_name,p.software_identity |
| | | FROM software_test_order a |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | INNER JOIN project p ON p.id = a.project_id |
| | | <where> |
| | | a.is_delete = 0 and p.is_delete = 0 |
| | | <if test="whereSql!=null"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectOrderId" resultType="java.lang.String"> |
| | | SELECT code |
| | | FROM software_test_order |
| | | <where> |
| | | is_delete = 0 |
| | | <if test="projectId != null and projectId != ''"> |
| | | and project_id = ${projectId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="dictList" resultType="com.zt.core.sys.dto.DictIstance"> |
| | | SET @row_number = 0; |
| | | SELECT concat('${softIdentity}', dd.dict_label) AS name, |
New file |
| | |
| | | <template> |
| | | <zt-dialog ref="dialog" column="3" :title="title" :stepMarker="stepMarker" @confirm="formSubmit"> |
| | | <el-form ref="dataForm" style="padding-top: 0" :inline="true" :disabled="dataForm.disabled" :model="dataForm" |
| | | label-width="120px" class="warehouseFormAuto"> |
| | | <div> |
| | | <el-form-item label-width="60px" label="编号:" style="width:100%;margin-bottom: -5px"> |
| | | <span>{{dataForm.contractReview.code || '编号自动生成'}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div style="border: 1px solid rgba(0,0,0,.2);width: 99%"> |
| | | <div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="warehouseContentWidth"> |
| | | <el-form-item class="marginTopAndMarginBottom" label="客户名称" style="width: 49%"> |
| | | <el-input v-model="dataForm.testAgencyInfo.agencyName" placeholder="请输入客户名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item class="marginTopAndMarginBottom" label="联系电话" style="width: 49%"> |
| | | <el-input v-model="dataForm.testAgencyInfo.labContactNum" placeholder="请输入联系电话"></el-input> |
| | | </el-form-item> |
| | | <zt-dict v-model="dataForm.contractReview.reviewType" :radio="true" dict="review_type"></zt-dict> |
| | | <el-form-item label-width="60px" label="原委托单编号:" style="width:100%;margin-bottom: -5px"> |
| | | <span>{{dataForm.contractReview.orderCode}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="el-flexManageDialog el-border-bottom"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 评审项目 |
| | | </div> |
| | | <div class="el-border-left" style="width: calc(100% - 120px)"> |
| | | <div class="table-container"> |
| | | <el-table ref="tableConfigItemList" class="el-software el-margin-top-bot" |
| | | style="width: 99%;margin-left: 5px" border :data="dataForm.reviewItemList" |
| | | stripe> |
| | | <el-table-column prop="no" align="center" width="60" label="序号"> |
| | | <template slot-scope="scope"> |
| | | <span v-html="indexFormat(scope.$index)"></span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="item" width="200" label="配置项名称"> |
| | | <template v-slot="{ row }"> |
| | | <el-input v-model="row.item" placeholder="评审项"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="result" label="密级" width="100" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <zt-dict v-model="row.result" placeholder="评审结果" dict="tristate1"></zt-dict> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexManageDialog el-border-bottom"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 评审记录 |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-wt-form-item-margin" label-width="20px" style="width: 85%"> |
| | | <el-input type="textarea" :rows="2" placeholder="请输入内容" |
| | | v-model="dataForm.contractReview.reviewRecord"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexManageDialog el-border-bottom"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 客户的特殊要求 |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px"> |
| | | <el-input type="textarea" :rows="2" placeholder="请输入内容" |
| | | v-model="dataForm.contractReview.specialRequire"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexManageDialog"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 分包 |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px"> |
| | | <el-input type="textarea" :rows="2" placeholder="请输入内容" |
| | | v-model="dataForm.contractReview.subcontract"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexManageDialog"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 评审结论 |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px"> |
| | | <el-input type="textarea" :rows="2" placeholder="请输入内容" |
| | | v-model="dataForm.contractReview.reviewConclusion"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="技术负责人:" style="width: 48%"> |
| | | <span>{{dataForm.contractReview.technicalDirector}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="日期:" style="width: 48%"> |
| | | <span>{{dataForm.contractReview.reviewDate}}</span> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <div class="el-flexManageDialog"> |
| | | <div class="DFormWidth DAlign DHold"> |
| | | 评审组成员 |
| | | </div> |
| | | <div style="width: calc(100% - 120px)" class="el-border-left"> |
| | | <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px"> |
| | | <el-input type="textarea" :rows="2" placeholder="请输入内容" |
| | | v-model="dataForm.contractReview.reviewPanelMember"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | | <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/> |
| | | </el-form> |
| | | <template v-slot:footer> |
| | | <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button> |
| | | </template> |
| | | </zt-dialog> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import qs from "qs"; |
| | | import Cookies from "js-cookie"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | id: '', |
| | | contractReview: { |
| | | code: '', |
| | | orderCode: '', |
| | | reviewType: '', |
| | | reviewRecord: '', |
| | | specialRequire: '', |
| | | subcontract: '', |
| | | reviewConclusion: '', |
| | | technicalDirector: '', |
| | | reviewDate: '', |
| | | reviewPanelMember: '', |
| | | }, |
| | | testAgencyInfo:{ |
| | | agencyName:'', |
| | | labContactNum:'' |
| | | }, |
| | | reviewItemList:[] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | indexFormat(index) { |
| | | return index += 1 |
| | | }, |
| | | init(id, row) { |
| | | if (id) { |
| | | this.dataForm.id = id |
| | | } else { |
| | | this.dataForm.id = row.id |
| | | } |
| | | if (row.projectId) { |
| | | this.dataForm.projectId = row.projectId |
| | | } |
| | | this.getInfo() |
| | | console.log(this.dataForm.id, this.dataForm.projectId, 'params params') |
| | | }, |
| | | // 获取信息 |
| | | async getInfo() { |
| | | let params = { |
| | | reviewId: this.dataForm.id, |
| | | projectId: this.dataForm.projectId |
| | | } |
| | | let res = await this.$http.get(`/contractReview/ContractReview/getDto`, {params: params}) |
| | | this.dataForm = { |
| | | ...this.dataForm, |
| | | ...res.data |
| | | } |
| | | console.log(this.dataForm, "getInfo this.dataForm") |
| | | }, |
| | | |
| | | setCheckId(checkId, row) { |
| | | console.log(checkId, row, "setCheckId(checkId, row)") |
| | | this.$set(row, 'checkId', checkId) |
| | | }, |
| | | /*async print(){ |
| | | var params = qs.stringify({ |
| | | token: Cookies.get('token'), |
| | | id:this.dataForm.id |
| | | }) |
| | | let apiURL = `/contractReview/ContractReview/exportWarehouseOrder` |
| | | window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` |
| | | },*/ |
| | | // 表单提交 |
| | | async formSubmit(submitType) { |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/contractReview/ContractReview/', this.dataForm) |
| | | if (res.success) { |
| | | await this.$tip.success() |
| | | this.$refs.dialog.close() |
| | | this.$emit('refreshDataList') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <el-card shadow="never" class="aui-card--fill"> |
| | | <div class="mod-contractReview-contractReview}"> |
| | | <zt-table-wraper query-url="/contractReview/ContractReview/page" delete-url="/contractReview/ContractReview" v-slot="{ table }"> |
| | | <el-form :inline="true" :model="dataForm" @keyup.enter.native="table.query()"> |
| | | <el-form-item> |
| | | <zt-dict v-model="dataForm.reviewType" dict="review_type" placeholder="请选择评审阶段" clearable></zt-dict> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-input v-model="dataForm.softwareName" placeholder="请输入软件名称" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <zt-button type="query" @click="table.query()"/> |
| | | <zt-button type="primary" class="el-icon-edit" @click="add()">新增</zt-button> |
| | | <zt-button type="delete" perm="contractReview:delete" @click="table.deleteHandle()"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table v-loading="table.dataLoading" :data="table.dataList" height="100px" v-adaptive="{bottomOffset:70}" border @selection-change="table.selectionChangeHandle"> |
| | | <el-table-column type="selection" width="40"/> |
| | | <el-table-column prop="code" label="编号"/> |
| | | <el-table-column prop="reviewType" label="评审阶段"/> |
| | | <el-table-column prop="softwareName" width="250px" label="软件名称"/> |
| | | <el-table-column prop="softwareIdentity" width="150px" label="项目标识"/> |
| | | <zt-table-column-handle :table="table" edit-perm="contractReview:update" delete-perm="contractReview::delete"/> |
| | | </el-table> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <add-or-update ref="addOrUpdate" @refreshDataList="table.query"/> |
| | | <ProjectSelect ref="projectSelect" |
| | | @refreshDataList="table.query" |
| | | @setProjectInfo="openAddWin"> |
| | | </ProjectSelect> |
| | | </zt-table-wraper> |
| | | </div> |
| | | </el-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddOrUpdate from './ContractReview-AddOrUpdate' |
| | | import ProjectSelect from "../project/Project-select.vue" |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataForm: { |
| | | reviewType: '', |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | AddOrUpdate, |
| | | ProjectSelect, |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.$refs.projectSelect.$refs.dialog.init("contract_review") |
| | | }, |
| | | isCheckbox(row,index){ |
| | | return !(row.flowInfo && row.flowInfo.bizId); |
| | | }, |
| | | openAddWin(row) { |
| | | console.log(row.id, 'row.id') |
| | | this.$refs.addOrUpdate.$refs.dialog.init(null, {id: null, projectId: row.id}) |
| | | }, |
| | | } |
| | | } |
| | | </script> |