Commit 19d624d5 authored by mengbali153's avatar mengbali153

Merge remote-tracking branch 'origin/master' into master

parents a2123942 681a2cdd
......@@ -3,18 +3,23 @@ package cn.wise.sc.cement.business.controller;
import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.PageQuery;
import cn.wise.sc.cement.business.model.ReportDetailVo;
import cn.wise.sc.cement.business.model.query.*;
import cn.wise.sc.cement.business.model.vo.EntrustVo;
import cn.wise.sc.cement.business.service.IEntrustService;
import cn.wise.sc.cement.business.util.WordUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
......@@ -26,6 +31,7 @@ import java.util.Map;
* @since 2020-08-24
*/
@Api(tags="委托管理")
@Slf4j
@RestController
@RequestMapping("/business/entrust")
public class EntrustController {
......@@ -107,6 +113,27 @@ public class EntrustController {
return BaseResponse.errorMsg("失败!");
}
@PostMapping("/export/{entrustId}")
@ApiOperation("导出委托单")
public void getReportDetail(@PathVariable("entrustId") Integer entrustId,
HttpServletResponse response) {
// ReportDetailVo rts = iEntrustService.getReportDetail(entrustId);
EntrustVo entrustVo = entrustService.getDtail(entrustId).getData();
Map<String, Object> beanParams = new HashMap<>(7);
beanParams.put("clientName", entrustVo.getClientName());
beanParams.put("entrustCode", entrustVo.getEntrustCode());
beanParams.put("userName", entrustVo.getUserName());
beanParams.put("userPhone", entrustVo.getUserPhone());
beanParams.put("userFax", entrustVo.getUserFax());
beanParams.put("projectName", entrustVo.getProjectName());
beanParams.put("sampleNum", entrustVo.getSampleNum());
WordUtil.writeWordReport(entrustVo.getProjectName() + "(委托单)", "entrust.ftl",
beanParams, response);
}
@ApiOperation(value = "获取样品表里最大的本所编号")
@GetMapping("/getMaxCementCode")
public BaseResponse getMaxCementCode(){
......
......@@ -69,6 +69,18 @@ public class EquipmentController {
}
}
@ApiOperation("设备检定列表导出")
@PostMapping("/exportTest")
public void exportTest(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
try {
equipmentService.exportTest(brand, supplierId, name, fileName, response);
} catch (Exception e) {
log.debug("设备检定列表导出{}", e);
}
}
@ApiOperation(value = "新增设备")
@PostMapping("/create")
public BaseResponse create(@RequestBody EquipmentQuery query) {
......@@ -190,6 +202,16 @@ public class EquipmentController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("设备维修列表导出")
@PostMapping("/exportTroubleshooting")
public void exportTroubleshooting(Integer equipmentIde, String fileName, HttpServletResponse response) {
try {
equipmentService.exportTroubleshooting(equipmentIde, fileName, response);
} catch (Exception e) {
log.debug("设备维修列表导出{}", e);
}
}
@ApiOperation(value = "维修登记详情")
@GetMapping("getTroubleshootingDetail/{id}")
public BaseResponse getTroubleshootingDetail(@PathVariable Integer id){
......@@ -239,6 +261,16 @@ public class EquipmentController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("报废申请列表导出")
@PostMapping("/exportScrapApproval")
public void exportScrapApproval(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
try {
equipmentService.exportScrapApproval(brand, supplierId, name, fileName, response);
} catch (Exception e) {
log.debug("报废申请列表导出{}", e);
}
}
@ApiOperation(value = "报废申请详情")
@GetMapping("getscrapApprovalDetail/{id}")
public BaseResponse getscrapApprovalDetail(@PathVariable Integer id){
......@@ -266,7 +298,15 @@ public class EquipmentController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("设备使用记录导出")
@PostMapping("/exportUse")
public void exportUse(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
try {
equipmentService.exportUse(brand, supplierId, name, fileName, response);
} catch (Exception e) {
log.debug("设备使用记录导出{}", e);
}
}
}
......
......@@ -14,10 +14,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -25,9 +21,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
/**
......@@ -95,7 +89,7 @@ public class NormProductionController {
@GetMapping("/statistics")
@ApiOperation("标准产值统计")
public BaseResponse normProductionStatistics(String start, String end, String name, PageQuery pageQuery) {
public BaseResponse<Page<NormProductionStatistics>> normProductionStatistics(String start, String end, String name, PageQuery pageQuery) {
Long startTime = null;
Long endTime = null;
......@@ -113,12 +107,12 @@ public class NormProductionController {
return BaseResponse.okData(rts);
}
}
return baseResponse;
return BaseResponse.errorMsg("没有找到相关数据!");
}
@GetMapping("/statistics/detail")
@ApiOperation("标准产值详情")
public BaseResponse normProductionDetails(Integer userId, String start,
public BaseResponse<Page<NormProduction.NormProductionDetail>> normProductionDetails(Integer userId, String start,
String end, PageQuery pageQuery) {
Long startTime = null;
Long endTime = null;
......@@ -131,12 +125,12 @@ public class NormProductionController {
Page<NormProduction.NormProductionDetail> rts = PageUtil.listConvertToPage(data, pageQuery);
return BaseResponse.okData(rts);
}
return BaseResponse.okData(data);
return BaseResponse.errorMsg("没有找到相关数据!");
}
@GetMapping("/total/production")
@ApiOperation("总产值统计")
public BaseResponse production(PageQuery pageQuery, String name, String start, String end) {
public BaseResponse<Page<ProductionVo>> production(PageQuery pageQuery, String name, String start, String end) {
Long startTime = null;
Long endTime = null;
......@@ -151,7 +145,7 @@ public class NormProductionController {
}
@GetMapping("/export/statistics")
@PostMapping("/export/statistics")
@ApiOperation("导出标准产值列表")
public void exportNormProductionStatistics(String start, String end, String name, HttpServletResponse response) {
Long startTime = null;
......@@ -163,7 +157,7 @@ public class NormProductionController {
iNormProductionService.exportNormProductionStatistics(startTime, endTime, name, response);
}
@GetMapping("/export/statistics/detail")
@PostMapping("/export/statistics/detail")
@ApiOperation("导出个人标准产值详情列表")
public void exportNormProductionDetails(Integer userId, String start,
String end, HttpServletResponse response) {
......@@ -176,7 +170,7 @@ public class NormProductionController {
iNormProductionService.exportNormProductionDetail(userId, startTime, endTime, response);
}
@GetMapping("/export/total/production")
@PostMapping("/export/total/production")
@ApiOperation("导出总产值")
public void exportProduction(String name, String start, String end, HttpServletResponse response) {
Long startTime = null;
......
......@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 前端控制器
......@@ -48,6 +50,18 @@ public class PlanConsumablesPurchaseController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("消耗品采购计划列表导出")
@PostMapping("/export")
public void export(String name, String fileName, HttpServletResponse response) {
try {
consumablesPurchaseService.export(name, fileName, response);
} catch (Exception e) {
log.debug("消耗品采购计划列表导出{}", e);
}
}
@ApiOperation(value = "新增消耗品采购计划")
@PostMapping("/create")
public BaseResponse create(@RequestBody PlanConsumablesPurchaseQuery query){
......
......@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 前端控制器
......@@ -47,6 +49,17 @@ public class PlanEquipmentMaintainController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("设备维护计划分列表导出")
@PostMapping("/export")
public void export(String name, String fileName, HttpServletResponse response) {
try {
equipmentMaintainService.export(name, fileName, response);
} catch (Exception e) {
log.debug("设备维护计划分列表导出{}", e);
}
}
@ApiOperation(value = "新增设设备维护计划分页列表")
@PostMapping("/create")
public BaseResponse create(@RequestBody PlanEquipmentMaintainQuery query){
......
......@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 前端控制器
......@@ -47,6 +49,16 @@ public class PlanEquipmentPurchaseController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("设备采购计划列表导出")
@PostMapping("/export")
public void export(String name, String fileName, HttpServletResponse response) {
try {
equipmentPurchaseService.export(name, fileName, response);
} catch (Exception e) {
log.debug("设备采购计划列表导出{}", e);
}
}
@ApiOperation(value = "新增设备采购计划")
@PostMapping("/create")
public BaseResponse create(@RequestBody PlanEquipmentPurchaseQuery query){
......
......@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 前端控制器
......@@ -47,6 +49,17 @@ public class PlanEquipmentRepairController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("设备维修计划列表导出")
@PostMapping("/export")
public void export(String name, String fileName, HttpServletResponse response) {
try {
equipmentRepairService.export(name, fileName, response);
} catch (Exception e) {
log.debug("设备维修计划列表导出{}", e);
}
}
@ApiOperation(value = "新增设备维修计划")
@PostMapping("/create")
public BaseResponse create(@RequestBody PlanEquipmentRepairQuery query){
......
......@@ -15,6 +15,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 前端控制器
......@@ -47,6 +49,17 @@ public class PlanStandardPurchaseController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("标样采购计划列表导出")
@PostMapping("/export")
public void export(String name, String fileName, HttpServletResponse response) {
try {
standardPurchaseService.export(name, fileName, response);
} catch (Exception e) {
log.debug("标样采购计划列表导出{}", e);
}
}
@ApiOperation(value = "新增标样采购计划")
@PostMapping("/create")
public BaseResponse create(@RequestBody PlanStandardPurchaseQuery query){
......
package cn.wise.sc.cement.business.controller;
import cn.hutool.core.date.DateUtil;
import cn.wise.sc.cement.business.entity.QualityApply;
import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.service.IQualityApplyService;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author ztw
* @since 2020-10-12
*/
@Api(tags = "质量检测审批")
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/business/qualityApply")
public class QualityApplyController {
final
IQualityApplyService iQualityApplyService;
public QualityApplyController(IQualityApplyService iQualityApplyService) {
this.iQualityApplyService = iQualityApplyService;
}
@PostMapping("/apply")
@ApiOperation("质量详情审核")
public BaseResponse<Boolean> applyQuality(@RequestBody List<QualityApply> qualityApply) {
boolean save = iQualityApplyService.saveBatch(qualityApply);
if (save) {
return BaseResponse.okData(true);
} else {
return BaseResponse.errorMsg("添加失败!");
}
}
public static void main(String[] args) {
List<QualityApply> list = new ArrayList<>();
QualityApply qualityApply = new QualityApply();
qualityApply.setCementCode("test");
qualityApply.setCreateTime(LocalDate.now());
qualityApply.setInputResult("[1,2,3,4]");
qualityApply.setProjectId(1);
qualityApply.setProjectName("test");
qualityApply.setUserName("检测人");
qualityApply.setSampleCode("001");
qualityApply.setSampleForm("粉末");
qualityApply.setSampleName("样品A");
qualityApply.setTeams("[S,CO3,LiO2,H2Co3]");
qualityApply.setTeamGroupId(1);
QualityApply qualityApply1 = new QualityApply();
qualityApply1.setCementCode("test");
qualityApply1.setCreateTime(LocalDate.now());
qualityApply1.setInputResult("[1,2,3,4]");
qualityApply1.setProjectId(1);
qualityApply1.setProjectName("test");
qualityApply1.setUserName("检测人");
qualityApply1.setSampleCode("001");
qualityApply1.setSampleForm("粉末");
qualityApply1.setSampleName("样品A");
qualityApply1.setTeams("[S,CO3,LiO2,H2Co3]");
qualityApply1.setTeamGroupId(1);
list.add(qualityApply1);
String ss = "[\"S\",\"CO3\",\"LiO2\",\"H2Co3\"]";
list.add(qualityApply);
List<String> a = new ArrayList<>();
a.add("S");
a.add("CO3");
a.add("LiO2");
a.add("H2Co3");
System.out.println(JSON.toJSONString(a));
System.out.println(JSON.toJSONString(list));
}
@PostMapping("/export")
@ApiOperation("导出质量监控")
public void exportQuality(String startDate, String endDate, HttpServletResponse response) {
Date startParse = DateUtil.parse(startDate);
Date endParse = DateUtil.parse(endDate);
iQualityApplyService.exportQuality(startParse, endParse, response);
}
}
package cn.wise.sc.cement.business.controller;
import cn.wise.sc.cement.business.entity.EntrustReport;
import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.PageQuery;
import cn.wise.sc.cement.business.model.vo.EntrustVo;
import cn.wise.sc.cement.business.model.vo.QualityDetailVo;
import cn.wise.sc.cement.business.service.IEntrustService;
import cn.wise.sc.cement.business.util.PageUtil;
import cn.wise.sc.cement.business.service.IQualityApplyService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
......@@ -19,6 +17,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
......@@ -34,9 +33,12 @@ public class QualityController {
final
IEntrustService iEntrustService;
final
IQualityApplyService iQualityApplyService;
public QualityController(IEntrustService iEntrustService) {
public QualityController(IEntrustService iEntrustService, IQualityApplyService iQualityApplyService) {
this.iEntrustService = iEntrustService;
this.iQualityApplyService = iQualityApplyService;
}
@ApiOperation(value = "质量检测分页列表")
......@@ -50,13 +52,34 @@ public class QualityController {
@GetMapping("/getPage")
public BaseResponse<IPage<EntrustVo>> page(PageQuery pageQuery, String startDate, String endDate,
Integer clientId, String projectName, String projectCode) {
return iEntrustService.getQualityPage(pageQuery, startDate, endDate, clientId, projectName, projectCode);
BaseResponse<IPage<EntrustVo>> baseResponse = iEntrustService.getQualityPage(
pageQuery, startDate, endDate, clientId, projectName, projectCode);
//判断是否已经评审过
if (baseResponse.getCode() == 200) {
List<EntrustVo> records = baseResponse.getData().getRecords();
if (records.size() == 0) {
return BaseResponse.errorMsg("没找到相关数据!");
}
List<Integer> projectIds = records.stream().map(EntrustVo::getProjectId).collect(Collectors.toList());
Set<Integer> qualityApplyIds = iQualityApplyService.selectQualityApplyStatusByProIds(projectIds);
records.forEach(arg->{
if (qualityApplyIds.contains(arg.getProjectId())){
arg.setStatusValue("审核完成");
arg.setStatus(10);
}else {
arg.setStatusValue("待审核");
arg.setStatus(9);
}
});
}
return baseResponse;
}
@GetMapping("/{entrustId}")
@ApiOperation("获取质量详情")
public BaseResponse<QualityDetailVo> getReportDetail(@PathVariable("entrustId") Integer entrustId) {
return BaseResponse.okData(iEntrustService.getQualityDetail(entrustId));
}
......
......@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -30,6 +31,7 @@ import java.util.Set;
**/
@Api(tags = "报告管理")
@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/business/report")
public class ReportController {
......@@ -73,14 +75,14 @@ public class ReportController {
return iEntrustService.deleteById(id);
}
@GetMapping("/{entrustId}")
@ApiOperation("获取报告详情")
@PostMapping("/{entrustId}")
@ApiOperation("导出报告封面和首页")
public void getReportDetail(@PathVariable("entrustId") Integer entrustId,
HttpServletResponse response) {
ReportDetailVo rts = iEntrustService.getReportDetail(entrustId);
Map<String, Object> beanParams = new HashMap<>();
Map<String, Object> beanParams = new HashMap<>(10);
beanParams.put("sendName", rts.getSendName());
beanParams.put("sender", rts.getSender());
beanParams.put("sendDate", rts.getSendDate());
......@@ -92,7 +94,7 @@ public class ReportController {
beanParams.put("projectName", rts.getProjectName());
beanParams.put("printDate", rts.getPrintDate());
WordUtil.writeWordReport(rts.getProjectName() + "(报告)", "report.ftl",
WordUtil.writeWordReport(rts.getProjectName() + "(报告).xls", "report.ftl",
beanParams, response);
}
......
......@@ -19,6 +19,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -56,6 +57,16 @@ public class StandardController {
}
@ApiOperation("标样信息列表导出")
@PostMapping("/export")
public void export(String name, String supplierName, String fileName, HttpServletResponse response) {
try {
standardService.export(name, supplierName, fileName, response);
} catch (Exception e) {
log.debug("标样信息列表导出{}", e);
}
}
@ApiOperation(value = "新增标样")
@PostMapping("/create")
public BaseResponse create(@RequestBody StandardQuery query) {
......
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-10-12
*/
@Data
@ApiModel("审核")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class QualityApply implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 项目名
*/
@ApiModelProperty("项目名字")
private String projectName;
/**
* 项目id
*/
@ApiModelProperty("项目id")
private Integer projectId;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 来样编号
*/
@ApiModelProperty("来样编号")
private String sampleCode;
/**
* 本所编号
*/
@ApiModelProperty("本所编号")
private String cementCode;
/**
* 样品状态
*/
@ApiModelProperty("样品状态")
private String sampleForm;
/**
* 计算结果
*/
@ApiModelProperty("输入结果")
private String inputResult;
/**
* 检测项id
*/
@ApiModelProperty("检测项id")
private Integer teamGroupId;
/**
* 时间
*/
@ApiModelProperty("项目时间")
private LocalDate createTime;
/**
* 1:人工检测 2:标准 3:误差
*/
@ApiModelProperty("1:人工检测 2:标准 3:误差")
private Integer status;
/**
* 样品名称
*/
@ApiModelProperty("样品名称")
private String sampleName;
/**
* 检测项名
*/
@ApiModelProperty("检测项名")
private String teams;
@ApiModelProperty("检测人")
private String userName;
}
......@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @description: 质量检测详情
......@@ -15,7 +16,6 @@ import java.io.Serializable;
public class QualityDetail implements Serializable {
private static final long serialVersionUID = 42L;
@ApiModelProperty("样品名字")
private String sampleName;
@ApiModelProperty("检测数据")
......@@ -40,8 +40,18 @@ public class QualityDetail implements Serializable {
private Integer userId;
@ApiModelProperty("样品数量")
private Integer sampleNum;
@ApiModelProperty("送检单位id")
private Integer clientId;
@ApiModelProperty("用户名")
private String userName;
@ApiModelProperty("送检单位名字")
private String clientName;
@ApiModelProperty("委托创建时间")
private LocalDate createTime;
@ApiModelProperty("来样编号")
private String sampleCode;
@ApiModelProperty("样品状态")
private String sampleForm;
@ApiModelProperty("本所编号")
private String cementCode;
}
......@@ -25,5 +25,7 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
List<Map<String, Object>> exportTestList(@Param("params") Map<String, Object> params);
EquipmentVo getDetail(Integer id);
}
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,9 @@ public interface EquipmentScrapMapper extends BaseMapper<EquipmentScrap> {
IPage<EquipmentScrapVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
EquipmentScrapVo getScrapDetail(Integer id);
}
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,8 @@ public interface EquipmentTroubleshootingMapper extends BaseMapper<EquipmentTrou
IPage<EquipmentTroubleshootingVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
EquipmentTroubleshootingVo getTroubleshootingDetail(Integer id);
}
......@@ -23,6 +23,10 @@ public interface EquipmentUseMapper extends BaseMapper<EquipmentUse> {
IPage<EquipmentUseVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
/**
* 根据项目id获取使用到的设备名字
* @param entrustId 项目id
......
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,9 @@ public interface PlanConsumablesPurchaseMapper extends BaseMapper<PlanConsumable
IPage<PlanConsumablesPurchaseVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
PlanConsumablesPurchaseVo getDetail(Integer id);
}
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,8 @@ public interface PlanEquipmentMaintainMapper extends BaseMapper<PlanEquipmentMai
IPage<PlanEquipmentMaintainVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
PlanEquipmentMaintainVo getDetail(Integer id);
......
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,8 @@ public interface PlanEquipmentPurchaseMapper extends BaseMapper<PlanEquipmentPur
IPage<PlanEquipmentPurchaseVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
PlanEquipmentPurchaseVo getDetail(Integer id);
......
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,8 @@ public interface PlanEquipmentRepairMapper extends BaseMapper<PlanEquipmentRepai
IPage<PlanEquipmentRepairVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
PlanEquipmentRepairVo getDetail(Integer id);
}
......@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
......@@ -22,6 +23,8 @@ public interface PlanStandardPurchaseMapper extends BaseMapper<PlanStandardPurch
IPage<PlanStandardPurchaseVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
PlanStandardPurchaseVo getDetail(Integer id);
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.QualityApply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-10-12
*/
public interface QualityApplyMapper extends BaseMapper<QualityApply> {
}
......@@ -3,8 +3,10 @@ package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Standard;
import cn.wise.sc.cement.business.model.vo.StandardValueVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -17,4 +19,6 @@ import java.util.List;
public interface StandardMapper extends BaseMapper<Standard> {
List<StandardValueVo> getStandardDetaulList();
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
}
......@@ -254,15 +254,15 @@
</select>
<select id="getQualityDetail" resultType="cn.wise.sc.cement.business.entity.QualityDetail">
SELECT s.sample_name,esscct.* FROM (SELECT sscct.*,client_id,entrust_code,project_name,sample_num,send_name,send_phone FROM entrust e
SELECT s.sample_name,s.cement_code,s.sample_form,s.sample_code,esscct.* FROM (SELECT sscct.*,client_id,entrust_code,project_name,sample_num,send_name,send_phone,create_time FROM entrust e
RIGHT JOIN
(SELECT sct.input_result,sample_id,entrust_id,team_group_name,team_group_id,user_id FROM sample_check sc
(SELECT count_result as input_result,sample_id,entrust_id,team_group_name,team_group_id,user_id FROM sample_check sc
RIGHT JOIN
(SELECT * FROM sample_check_team) sct
ON sct.check_id = sc.id WHERE sc.entrust_id = #{entrustId}) sscct
ON e.id = sscct.entrust_id) esscct
LEFT JOIN
(SELECT name as sample_name,id FROM sample) s
(SELECT name as sample_name,id,cement_code,sample_form,sample_code FROM sample) s
ON esscct.sample_id = s.id
</select>
......
......@@ -40,6 +40,22 @@
<include refid="where" />
</select>
<select id="exportTestList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 设备名称,
t.code as 设备编号,
t.model as '规格/型号',
IF(ISNULL(t.test_cycle),'',t.test_cycle) as '检/校周期',
IF(ISNULL(t.test_date),'',t.test_date) as 检定日期,
IF(ISNULL(t.check_date),'',t.check_date) as 校检日期 ,
IF(ISNULL(t.period_date),'',t.period_date) as 期间核查日期,
IF(ISNULL(t.try_result),'',t.try_result) as 实施结果
FROM equipment t
,(select @i:=0)t
<include refid="where" />
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.EquipmentVo">
SELECT t.*, s.name as supplierName
......
......@@ -22,11 +22,37 @@
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model, e.purchase_date as purchaseDate,
e.assets_value as assetsValue
FROM equipment_scrap es
left join equipment e on e.id = et.equipment_id
left join equipment e on e.id = es.equipment_id
<include refid="where" />
ORDER BY es.create_time ASC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(e.purchase_date),'',e.purchase_date) as 购置日期,
IF(ISNULL(e.assets_value),'',e.assets_value) as 设备原值,
IF(ISNULL(es.scrap_reason),'',es.scrap_reason) as 报废原因,
IF(ISNULL(su.name),'',su.name) as 申请人,
IF(ISNULL(es.scrap_date),'',es.scrap_date) as 报废申请日期,
(
CASE es.status
WHEN 0 THEN '待审批'
WHEN 1 THEN '已通过'
WHEN 2 THEN '未通过'
ELSE NULL
END
) as 申请结果
FROM equipment_scrap es
left join equipment e on e.id = es.equipment_id
left join sys_user su on su.id = es.user_id
,(select @i:=0)et
<include refid="where" />
ORDER BY es.create_time ASC
</select>
<select id="getScrapDetail" resultType="cn.wise.sc.cement.business.model.vo.EquipmentScrapVo">
......
......@@ -17,6 +17,29 @@
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(et.find_date),'',et.find_date) as 发现日期,
IF(ISNULL(et.find_user),'',et.find_user) as 发现人,
IF(ISNULL(et.fault_phenomenon),'',et.fault_phenomenon) as 故障描述,
IF(ISNULL(et.repair_conclusion),'',et.repair_conclusion) as 实施结果
FROM equipment_troubleshooting et
left join equipment e on e.id = et.equipment_id
,(select @i:=0)et
<include refid="where" />
ORDER BY et.create_time ASC
</select>
<select id="getTroubleshootingDetail" resultType="cn.wise.sc.cement.business.model.vo.EquipmentTroubleshootingVo">
SELECT et.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model
......
......@@ -17,13 +17,33 @@
</sql>
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.EquipmentUseVo">
SELECT et.*,
SELECT eu.*,
e.name as equipmentName, e.code as code, e.brand as brand, e.model as model
FROM equipment_use eu
left join equipment e on e.id = et.equipment_id
left join equipment e on e.id = eu.equipment_id
<include refid="where" />
ORDER BY et.create_time ASC
ORDER BY eu.create_time ASC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(eu.use_date),'',eu.use_date) as 使用日期,
IF(ISNULL(eu.user_name),'',eu.user_name) as 使用人,
IF(ISNULL(eu.project_name),'',eu.project_name) as 参与项目,
IF(ISNULL(eu.project_code),'',eu.project_code) as 项目编号,
IF(ISNULL(eu.test_item),'',eu.test_item) as 检测项
FROM equipment_use eu
left join equipment e on e.id = eu.equipment_id
,(select @i:=0)eu
<include refid="where" />
ORDER BY eu.create_time ASC
</select>
<select id="getEquipmentNamesByProjectId" resultType="java.lang.String">
SELECT CONCAT(e.`name`,' (',e.`code`,')') FROM equipment_use eu
RIGHT JOIN
......
......@@ -21,6 +21,25 @@
ORDER BY t.id DESC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.technical_index as 技术指标,
t.unit_price as 单价(万元),
t.production_unit as 生产单位,
t.purchase_num as 采购数量,
t.purchase_date as 购买日期,
su.name as 采购人
FROM plan_consumables_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
<include refid="where" />
ORDER BY t.id DESC
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo">
SELECT t.*, su.name as purchaserName, su2.name as userName
FROM plan_consumables_purchase t
......
......@@ -21,6 +21,24 @@
ORDER BY t.id DESC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.code as 编号,
t.maintain_date as 维护日期,
t.maintain_content as 维护内容,
su.name as 执行人,
t.maintain_result as 完成情况
FROM plan_equipment_maintain t
left join sys_user su on su.id = t.maintainer_id
,(select @i:=0)t
<include refid="where" />
ORDER BY t.id DESC
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo">
SELECT t.*, su.name as maintainerName, su2.name as userName
FROM plan_equipment_maintain t
......
......@@ -21,6 +21,26 @@
ORDER BY t.id DESC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.technical_index as 技术指标,
t.unit_price as 单价(万元),
t.production_unit as 生产单位,
t.purchase_num as 采购数量,
t.purchase_date as 购买日期,
su.name as 采购人
FROM plan_equipment_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
<include refid="where" />
ORDER BY t.id DESC
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo">
SELECT t.*, su.name as purchaserName, su2.name as userName
FROM plan_equipment_purchase t
......
......@@ -21,6 +21,23 @@
ORDER BY t.id DESC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 产品名称,
t.model as '规格/型号',
t.technical_index as 技术指标,
t.unit_price as 单价(万元),
t.production_unit as 生产单位,
t.repair_date as 维修日期,
su.name as 执行人
FROM plan_equipment_repair t
left join sys_user su on su.id = t.repairer_id
,(select @i:=0)t
<include refid="where" />
ORDER BY t.id DESC
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo">
SELECT t.*, su.name as repairerName, su2.name as userName
FROM plan_equipment_repair t
......
......@@ -21,6 +21,22 @@
ORDER BY t.id DESC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 标物名称,
t.distribution_unit as 经销单位,
t.purchase_num as 采购数量,
t.purchase_date as 采购时间,
su.name as 采购人
FROM plan_standard_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
<include refid="where" />
ORDER BY t.id DESC
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo">
SELECT t.*, su.name as purchaserName, su2.name as userName
FROM plan_standard_purchase t
......
<?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="cn.wise.sc.cement.business.mapper.QualityApplyMapper">
</mapper>
......@@ -9,4 +9,39 @@
(SELECT id FROM standard) s
ON sv.standard_id = s.id
</select>
<sql id="where">
<where>
<if test="params.supplierName != null and params.supplierName != ''">
and t.supplier_name = #{params.supplierName}
</if>
<if test="params.name != null and params.name != ''">
and t.name like concat('%', #{params.name}, '%')
</if>
</where>
</sql>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 标样名称,
t.code as 标物代号,
t.supplier_name as 经销单位,
t.position as 存放位置,
t.purchase_date as 进样日期,
t.valid_date as 有效日期,
t.stock_num as 剩余库存,
(
CASE t.status
WHEN 0 THEN '已作废'
WHEN 1 THEN '启用中'
ELSE NULL
END
) as 状态
FROM standard t ,(select @i:=0)t
<include refid="where" />
ORDER BY t.id DESC
</select>
</mapper>
......@@ -20,18 +20,25 @@ public class QualityDetailVo implements Serializable {
private Integer sampleNum;
private String sendName;
private String sendPhone;
private String createTime;
private String entrustId;
List<QualityTeamGroup> qualityTeamGroups = new ArrayList<>();
@Data
public static class QualityTeamGroup {
private String teamGroupName;
private Integer teamGroupId;
private List<QualitySample> qualitySamples = new ArrayList<>();
}
@Data
public static class QualitySample {
private String sampleName;
private Integer sampleId;
private String sampleForm;
private String cementCode;
private String sampleCode;
private List<SampleOriginal> sampleOriginals = new ArrayList<>();
}
......
......@@ -24,6 +24,8 @@ public interface IEquipmentService extends IService<Equipment> {
void export(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response);
void exportTest(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response);
BaseResponse<Equipment> create(EquipmentQuery query);
BaseResponse<Equipment> update(EquipmentQuery query);
......@@ -40,6 +42,8 @@ public interface IEquipmentService extends IService<Equipment> {
BaseResponse<IPage<EquipmentTroubleshootingVo>> getTroubleshootingPage(PageQuery pageQuery, Integer equipmentId);
void exportTroubleshooting(Integer equipmentId, String fileName, HttpServletResponse response);
BaseResponse<EquipmentTroubleshootingVo> getTroubleshootingDetail(Integer id);
BaseResponse<String> scrap(EquipmentScrapQuery query);
......@@ -49,10 +53,14 @@ public interface IEquipmentService extends IService<Equipment> {
BaseResponse<IPage<EquipmentScrapVo>> getScrapApprovalPage(PageQuery pageQuery,
String brand, Integer supplierId, String name);
void exportScrapApproval(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response);
BaseResponse<EquipmentScrapVo> getscrapApprovalDetail(Integer id);
BaseResponse<IPage<EquipmentUseVo>> getUsePage(PageQuery pageQuery,
String brand, Integer supplierId, String name);
void exportUse(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response);
}
......@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 服务类
......@@ -20,6 +22,8 @@ public interface IPlanConsumablesPurchaseService extends IService<PlanConsumable
BaseResponse<IPage<PlanConsumablesPurchaseVo>> getPage(PageQuery pageQuery, String name);
void export(String name, String fileName, HttpServletResponse response);
BaseResponse<PlanConsumablesPurchase> create(PlanConsumablesPurchaseQuery query);
BaseResponse<PlanConsumablesPurchase> update(PlanConsumablesPurchaseQuery query);
......
......@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 服务类
......@@ -20,6 +22,8 @@ public interface IPlanEquipmentMaintainService extends IService<PlanEquipmentMai
BaseResponse<IPage<PlanEquipmentMaintainVo>> getPage(PageQuery pageQuery, String name);
void export(String name, String fileName, HttpServletResponse response);
BaseResponse<PlanEquipmentMaintain> create(PlanEquipmentMaintainQuery query);
BaseResponse<PlanEquipmentMaintain> update(PlanEquipmentMaintainQuery query);
......
......@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 服务类
......@@ -20,6 +22,8 @@ public interface IPlanEquipmentPurchaseService extends IService<PlanEquipmentPur
BaseResponse<IPage<PlanEquipmentPurchaseVo>> getPage(PageQuery pageQuery, String name);
void export(String name, String fileName, HttpServletResponse response);
BaseResponse<PlanEquipmentPurchase> create(PlanEquipmentPurchaseQuery query);
BaseResponse<PlanEquipmentPurchase> update(PlanEquipmentPurchaseQuery query);
......
......@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
......@@ -22,6 +23,8 @@ public interface IPlanEquipmentRepairService extends IService<PlanEquipmentRepai
BaseResponse<IPage<PlanEquipmentRepairVo>> getPage(PageQuery pageQuery, String name);
void export(String name, String fileName, HttpServletResponse response);
BaseResponse<PlanEquipmentRepair> create(PlanEquipmentRepairQuery query);
BaseResponse<PlanEquipmentRepair> update(PlanEquipmentRepairQuery query);
......
......@@ -8,6 +8,8 @@ import cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
* 服务类
......@@ -20,6 +22,8 @@ public interface IPlanStandardPurchaseService extends IService<PlanStandardPurch
BaseResponse<IPage<PlanStandardPurchaseVo>> getPage(PageQuery pageQuery, String name);
void export(String name, String fileName, HttpServletResponse response);
BaseResponse<PlanStandardPurchase> create(PlanStandardPurchaseQuery query);
BaseResponse<PlanStandardPurchase> update(PlanStandardPurchaseQuery query);
......
package cn.wise.sc.cement.business.service;
import cn.wise.sc.cement.business.entity.QualityApply;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-10-12
*/
public interface IQualityApplyService extends IService<QualityApply> {
/**
* 查询质量检测审核状态
*
* @param projectIds 项目id
* @return 已检测的质量监控
*/
Set<Integer> selectQualityApplyStatusByProIds(List<Integer> projectIds);
/**
* 导出质量检测详情
*
* @param startParse 开始时间
* @param endParse 结束时间
*/
void exportQuality(Date startParse, Date endParse, HttpServletResponse response);
}
......@@ -11,6 +11,7 @@ import cn.wise.sc.cement.business.model.vo.StandardVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
......@@ -25,6 +26,8 @@ public interface IStandardService extends IService<Standard> {
BaseResponse<IPage<Standard>> getPage(PageQuery pageQuery, String name, String supplierName);
void export(String name, String supplierName, String fileName, HttpServletResponse response);
BaseResponse<Standard> create(StandardQuery query);
BaseResponse<Standard> update(StandardQuery query);
......
......@@ -468,6 +468,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
return BaseResponse.okData(sampleHandleList);
}
/**
* 详情-样品处理信息-附件列表
*
......@@ -567,7 +568,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
Object obj = redisUtil.getString("maxCementCode");
String maxCementCode = "";
String regex = "[0-9]{2}\\-[0-9]{4}";
if (obj == null || !obj.toString().matches(regex) ) {
if (obj == null || !obj.toString().matches(regex)) {
maxCementCode = sampleMapper.getMaxCementCode();
} else {
maxCementCode = obj.toString();
......@@ -584,7 +585,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
maxCementCode = yesrString + "-0000";
}
}
System.out.println("redis获取最大值时的最大本所编号*******************************************"+maxCementCode);
System.out.println("redis获取最大值时的最大本所编号*******************************************" + maxCementCode);
redisUtil.setString("maxCementCode", maxCementCode);
return BaseResponse.okData(maxCementCode);
}
......@@ -679,7 +680,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
sampleService.saveBatch(sampleList);
//最大的平行样编号放入redis
System.out.println("审批时的最大本所编号*******************************************"+maxCementCode);
System.out.println("审批时的最大本所编号*******************************************" + maxCementCode);
redisUtil.setString("maxCementCode", maxCementCode);
}
entrust.setStatus(1).setProjectType(query.getProjectType());
......@@ -1015,7 +1016,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (sampleHandle == null) {
return BaseResponse.errorMsg("信息错误");
}
if (sampleHandle.getStatus() != 1 && sampleHandle.getStatus() != 2 ) {
if (sampleHandle.getStatus() != 1 && sampleHandle.getStatus() != 2) {
return BaseResponse.errorMsg("状态错误");
}
if (loginUser.getId() != sampleHandle.getUserId()) {
......@@ -1489,10 +1490,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//检测人员只能看到自己则的检测内容
if (sampleList1.size() == 2) {
List<SampleDistributionTeamVo> sampleDistributionTeamVoList2 = distributionMapper.getDistributionTeamList(sampleList1.get(1).getId(), null);
if(sampleDistributionTeamVoList2.size() == sampleDistributionTeamVoList.size()){
for(int i=0; i<sampleDistributionTeamVoList.size(); i++){
if (sampleDistributionTeamVoList2.size() == sampleDistributionTeamVoList.size()) {
for (int i = 0; i < sampleDistributionTeamVoList.size(); i++) {
SampleDistributionTeamVo sdtvo = sampleDistributionTeamVoList.get(i);
sdtvo.setUserName(sdtvo.getUserName()+"、"+sampleDistributionTeamVoList2.get(i).getUserName());
sdtvo.setUserName(sdtvo.getUserName() + "、" + sampleDistributionTeamVoList2.get(i).getUserName());
}
} else {
sampleDistributionTeamVoList =
......@@ -1782,7 +1783,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setCementCode(sctQuery.getCementCode())
.setTeamGroupId(sctQuery.getTeamGroupId())
.setTeamGroupName(sctQuery.getTeamGroupName())
.setCountResult(sctQuery.getEndResult().toString())
.setCountResult(JSON.toJSONString(sctQuery.getEndResult()))
.setIsParallel(sctQuery.getIsParallel())
.setCreateTime(LocalDateTime.now());
sampleCheckMapper.insert(check);
......@@ -1796,7 +1797,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setUserId(sctQuery.getMainUserId())
.setEquipmentId(sctQuery.getMainEquipmentId())
.setEquipmentName(sctQuery.getMainEquipmentName())
.setInputResult(sctQuery.getMainResult().toString())
.setInputResult(JSON.toJSONString(sctQuery.getMainResult()))
.setCreateTime(LocalDateTime.now());
sampleCheckTeamMapper.insert(sampleCheckTeam);
//添加设备使用记录 设备使用记录表 equipment_use
......@@ -1821,7 +1822,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.setUserId(sctQuery.getSecondaryUserId())
.setEquipmentId(sctQuery.getSecondaryEquipmentId())
.setEquipmentName(sctQuery.getSecondaryEquipmentName())
.setInputResult(sctQuery.getSecondaryResult().toString())
.setInputResult(JSON.toJSONString(sctQuery.getSecondaryResult()))
.setCreateTime(sampleCheckTeam.getCreateTime());
sampleCheckTeamMapper.insert(sampleCheckTeam2);
//添加设备使用记录 设备使用记录表 equipment_use
......@@ -1955,7 +1956,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
String methodNumbers = arg.getMethodNumbers();
String[] methodSplit = methodNumbers.split("、");
for (String idStr : methodSplit) {
String id = Integer.parseInt(idStr) +"";
String id = Integer.parseInt(idStr) + "";
methods.forEach(opt -> {
if (id.equals(opt.getNumber())) {
if (StrUtil.isBlank(arg.getMethodName())) {
......@@ -2095,11 +2096,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
QualityDetailVo.QualityTeamGroup qualityTeamGroup = new QualityDetailVo.QualityTeamGroup();
qualityTeamGroup.setTeamGroupName(arg);
qualityDetailVo.getQualityTeamGroups().add(qualityTeamGroup);
qualityDetails.stream()
List<QualityDetail> collect = qualityDetails.stream()
//找到当前检测组下的是要样品
.filter(opt -> opt.getTeamGroupName().equals(arg))
.collect(Collectors.toList())
.stream()
.collect(Collectors.toList());
collect.forEach(opt -> qualityTeamGroup.setTeamGroupId(opt.getTeamGroupId()));
collect.stream()
.map(QualityDetail::getSampleName)
.collect(Collectors.toSet())
.forEach(opt -> {
......@@ -2116,6 +2118,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
sampleOriginal.setTeamValues(param.getInputResult());
sampleOriginal.setUserName(param.getUserName());
qualitySample.getSampleOriginals().add(sampleOriginal);
qualitySample.setCementCode(param.getCementCode());
qualitySample.setSampleCode(param.getSampleCode());
qualitySample.setSampleForm(param.getSampleForm());
qualitySample.setSampleId(param.getSampleId());
}
});
});
......@@ -2130,8 +2136,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
String[] strs = str.split(",");
Map<String, String> map = new HashMap<>(strs.length);
for (String string : strs) {
String key = string.split("=")[0];
String value = string.split("=")[1];
String key = string.split(":")[0];
String value = string.split(":")[1];
map.put(key, value);
}
return JSON.toJSONString(map);
......@@ -2154,7 +2160,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
//初始化标准信息
rts.setPrintDate(DateUtil.format(new Date(), "yyyy年MM月dd日"));
rts.setSender(firstReportDetail.getSendName());
rts.setSendDate(DateUtil.format(firstReportDetail.getSendTime(),"yyyy年MM月dd日"));
rts.setSendDate(DateUtil.format(firstReportDetail.getSendTime(), "yyyy年MM月dd日"));
rts.setProjectName(firstReportDetail.getProjectName());
rts.setSendName("\\");
//获取检测项目、检测仪器、检测依据
......@@ -2223,7 +2229,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (!CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()+1];
String[] headers = new String[map.size() + 1];
headers[0] = "序号";
headers[1] = "委托编号";
headers[2] = "是否加急";
......@@ -2239,65 +2245,65 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
List<Object[]> datas = new ArrayList<>(headers.length);
for (Map<String, Object> m : list) {
//获取委托单的检测项目 检测依据编号
//根据委托编号id 获取所有样品的检测项目 和 检测依据编号
Integer entrustId = Integer.valueOf(m.get("entrustId").toString());
System.out.println(entrustId);
QueryWrapper<SampleTmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("entrust_id", entrustId);
List<SampleTmp> sampleTmpList = sampleTmpService.list(queryWrapper);
//获取委托单的检测项目 检测依据编号
//根据委托编号id 获取所有样品的检测项目 和 检测依据编号
Integer entrustId = Integer.valueOf(m.get("entrustId").toString());
System.out.println(entrustId);
QueryWrapper<SampleTmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("entrust_id", entrustId);
List<SampleTmp> sampleTmpList = sampleTmpService.list(queryWrapper);
// String sampleNames = "";
/**
* 检测项目名称
* 格式:
* 样品1:Mad、Vad、Cao
* 样品2:Mad、Vad、Cao
* 样品3:Mad、Vad、Cao
*/
String checkTeamStr = "";
/**
* 检测依据编号
* 格式:
* 样品1:0012、0013
* 样品2:0014、0015
* 样品3:0016、0017
*/
String checkMethodStr = "";
if (sampleTmpList != null && sampleTmpList.size() > 0) {
//样品名称 列表中的拼接
for (SampleTmp sampleTmp : sampleTmpList) {
/**
* 检测项目名称
* 格式:
* 样品1:Mad、Vad、Cao
* 样品2:Mad、Vad、Cao
* 样品3:Mad、Vad、Cao
*/
String checkTeamStr = "";
/**
* 检测依据编号
* 格式:
* 样品1:0012、0013
* 样品2:0014、0015
* 样品3:0016、0017
*/
String checkMethodStr = "";
if (sampleTmpList != null && sampleTmpList.size() > 0) {
//样品名称 列表中的拼接
for (SampleTmp sampleTmp : sampleTmpList) {
// sampleNames = sampleNames.equals("") ? sampleTmp.getName() : (sampleNames + "、" + sampleTmp.getName());
String teamIds = sampleTmp.getTeamIds();
String checkTeam = "";
String checkMethod = "";
if (teamIds != null) {
String[] teamIdS = teamIds.split("、");
for (String teamId : teamIdS) {
Team team = teamMapper.selectById(Integer.valueOf(teamId));
if (team != null && team.getQualifications() ==1) {
checkTeam = checkTeam.equals("") ? team.getName() : (checkTeam + "、" + team.getName());
Method method = methodMapper.selectById(team.getMethodId());
if(method != null){
checkMethod = checkMethod.equals("") ? method.getNumber() : (checkMethod + "、" + method.getNumber());
}
}
}
}
String spampe_checkTeam = sampleTmp.getName()+":"+checkTeam;
checkTeamStr = checkTeamStr.equals("") ? spampe_checkTeam : (checkTeamStr + "\n" + spampe_checkTeam);
String spampe_checkMethod = sampleTmp.getName()+":"+checkMethod;
checkMethodStr = checkMethodStr.equals("") ? spampe_checkMethod : (checkMethodStr + "\n" + spampe_checkMethod);
}
}
String teamIds = sampleTmp.getTeamIds();
String checkTeam = "";
String checkMethod = "";
if (teamIds != null) {
String[] teamIdS = teamIds.split("、");
for (String teamId : teamIdS) {
Team team = teamMapper.selectById(Integer.valueOf(teamId));
if (team != null && team.getQualifications() == 1) {
checkTeam = checkTeam.equals("") ? team.getName() : (checkTeam + "、" + team.getName());
Method method = methodMapper.selectById(team.getMethodId());
if (method != null) {
checkMethod = checkMethod.equals("") ? method.getNumber() : (checkMethod + "、" + method.getNumber());
}
}
}
}
String spampe_checkTeam = sampleTmp.getName() + ":" + checkTeam;
checkTeamStr = checkTeamStr.equals("") ? spampe_checkTeam : (checkTeamStr + "\n" + spampe_checkTeam);
String spampe_checkMethod = sampleTmp.getName() + ":" + checkMethod;
checkMethodStr = checkMethodStr.equals("") ? spampe_checkMethod : (checkMethodStr + "\n" + spampe_checkMethod);
}
}
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = "";
if(j == 9){
if (j == 9) {
obj = checkTeamStr;
}else if(j == 10){
} else if (j == 10) {
obj = checkMethodStr;
}else{
} else {
obj = m.get(headers[j]).toString();
//如果序号带小数点 去除.0,保留整数
if (j == 0) {
......
......@@ -116,6 +116,51 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
}
}
/**
* 设备检定列表导出
* @param brand
* @param supplierId
* @param name
* @param fileName
* @param response
*/
@Override
public void exportTest(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("brand", brand);
params.put("supplierId", supplierId);
List<Map<String, Object>> list= equipmentMapper.exportTestList(params);
if (!CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "设备名称";
headers[2] = "设备编号";
headers[3] = "规格/型号";
headers[4] = "检/校周期";
headers[5] = "检定日期";
headers[6] = "校检日期";
headers[7] = "期间核查日期";
headers[8] = "实施结果";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "设备检定列表": fileName, headers,
datas, response);
}
}
/**
* 新增设备
* @param query
......@@ -323,6 +368,47 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
return BaseResponse.okData(pages);
}
/**
* 设备维修列表导出
* @param equipmentId
* @param fileName
* @param response
*/
@Override
public void exportTroubleshooting(Integer equipmentId, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("equipmentId", equipmentId);
List<Map<String, Object>> list= troubleshootingMapper.exportList(params);
if (!CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "设备名称";
headers[2] = "设备编号";
headers[3] = "规格/型号";
headers[4] = "发现日期";
headers[5] = "发现人";
headers[6] = "故障描述";
headers[7] = "实施结果";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "设备维修列表": fileName, headers,
datas, response);
}
}
/**
* 维修登记详情
* @param id 设备故障维修登记表id
......@@ -413,6 +499,51 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
return BaseResponse.okData(pages);
}
/**
* 报废申请列表导出
* @param brand
* @param supplierId
* @param name
* @param fileName
* @param response
*/
@Override
public void exportScrapApproval(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("brand", brand);
params.put("supplierId", supplierId);
params.put("name", name);
List<Map<String, Object>> list= scrapMapper.exportList(params);
if (!CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "设备名称";
headers[2] = "设备编号";
headers[3] = "规格/型号";
headers[4] = "购置日期";
headers[5] = "设备原值";
headers[6] = "报废原因";
headers[7] = "申请人";
headers[8] = "报废申请日期";
headers[9] = "申请结果";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "报废申请列表": fileName, headers,
datas, response);
}
}
/**
* 报废申请详情
......@@ -449,40 +580,50 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
return BaseResponse.okData(pages);
}
/**
* 设备使用记录导出
* @param brand
* @param supplierId
* @param name
* @param fileName
* @param response
*/
@Override
public void exportUse(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("brand", brand);
params.put("supplierId", supplierId);
params.put("name", name);
List<Map<String, Object>> list= scrapMapper.exportList(params);
if (!CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "设备名称";
headers[2] = "设备编号";
headers[3] = "规格/型号";
headers[4] = "使用日期";
headers[5] = "使用人";
headers[6] = "参与项目";
headers[7] = "项目编号";
headers[8] = "检测项";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "设备使用记录": fileName, headers,
datas, response);
}
}
......
......@@ -109,12 +109,12 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
return BaseResponse.errorMsg("当前标准产值已存在!");
}
//判断比例是否为总值100%
// if (normProduction.getAnalyseRate()
// + normProduction.getAssessRate()
// + normProduction.getSeparateRate()
// + normProduction.getReportedResultRate() != 1) {
// return BaseResponse.errorMsg("百分比总和不等于1");
// }
if (normProduction.getAnalyseRate()
+ normProduction.getAssessRate()
+ normProduction.getSeparateRate()
+ normProduction.getReportedResultRate() != 1) {
return BaseResponse.errorMsg("百分比总和不等于1");
}
//状态为1
normProduction.setStatus(1);
......@@ -122,7 +122,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
if (save) {
return BaseResponse.okData(normProduction);
} else {
return BaseResponse.errorMsg("失败!");
return BaseResponse.errorMsg("失败!除检测组id之外其他字段必填!");
}
}
......@@ -162,27 +162,21 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
List<TeamGroup> finalTeamGroups = teamGroups;
List<Handle> finalHandles = handles;
normProductions.forEach(arg -> {
NormProductionVo normProductionVo = new NormProductionVo();
BeanUtil.copyProperties(arg, normProductionVo);
normProductionVo.setAssessName("/");
if (arg.getType() == 1) {
finalTeamGroups.stream()
.filter(opt -> opt.getId().intValue() == arg.getAssessId())
.findFirst()
.ifPresent(opt -> {
NormProductionVo normProductionVo = new NormProductionVo();
BeanUtil.copyProperties(arg, normProductionVo);
normProductionVo.setAssessName(opt.getName());
records.add(normProductionVo);
});
.ifPresent(opt -> normProductionVo.setAssessName(opt.getName()));
} else {
finalHandles.stream()
.filter(opt -> opt.getId().intValue() == arg.getAssessId())
.findFirst()
.ifPresent(opt -> {
NormProductionVo normProductionVo = new NormProductionVo();
BeanUtil.copyProperties(arg, normProductionVo);
normProductionVo.setAssessName(opt.getName());
records.add(normProductionVo);
});
.ifPresent(opt -> normProductionVo.setAssessName(opt.getName()));
}
records.add(normProductionVo);
});
rts.setRecords(records);
return BaseResponse.okData(rts);
......@@ -196,12 +190,12 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
}
//判断比例是否为总值100%
// if (production.getAnalyseRate()
// + production.getAssessRate()
// + production.getSeparateRate()
// + production.getReportedResultRate() != 1) {
// return BaseResponse.errorMsg("百分比总和不等于1");
// }
if (production.getAnalyseRate()
+ production.getAssessRate()
+ production.getSeparateRate()
+ production.getReportedResultRate() != 1) {
return BaseResponse.errorMsg("百分比总和不等于1");
}
//判断配置项目是否已存在
QueryWrapper<NormProduction> qw = new QueryWrapper<>();
......@@ -219,6 +213,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
} else {
return BaseResponse.errorMsg("修改失败!");
}
}
@Override
......@@ -551,46 +546,6 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
}
}
/**
* 计算校核单每条数据的标准产值
*
* @param qwCheck 统计条件
* @return 校核任务详情
*/
private List<NormProduction.NormProductionDetail> calculateSampleCheck
(QueryWrapper<SampleCheckTeam> qwCheck) {
//计算处理的绩效
List<SampleCheckTeam> sampleCheckTeams = iSampleCheckTeamService.list(qwCheck);
List<EntrustSample> entrustSamples = iSampleCheckTeamService.getEntrustSample();
List<NormProduction.NormProductionDetail> rts = new ArrayList<>(sampleCheckTeams.size());
for (SampleCheckTeam sampleCheckTeam : sampleCheckTeams) {
//判断是否已经配置了 获取到核算处理的联表
EntrustSample entrustSample = entrustSamples.stream()
.filter(arg -> arg.getDistributionId().intValue() == sampleCheckTeam.getId())
.findFirst().orElse(null);
if (entrustSample == null) {
continue;
}
//todo
String key = entrustSample.getTeamGroupId() + ":" + "1";
//判断缓存是否存在
if (!normProductionCache.containsKey(key)) {
//初始化
initNormProductionCache();
}
NormProduction normProduction = normProductionCache.get(key);
NormProduction.NormProductionDetail productionDetail =
initNormProductionDetail(entrustSample, normProduction, normProduction.getAssessRate());
productionDetail.setUserId(entrustSample.getUserId());
productionDetail.setCheckTime(sampleCheckTeam.getCreateTime());
productionDetail.setDistributionId(sampleCheckTeam.getId());
productionDetail.setAssessId(entrustSample.getTeamGroupId());
rts.add(productionDetail);
}
return rts;
}
/**
* 计算处理派发单每条数据的标准产值
*
......
......@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import cn.wise.sc.cement.business.service.IPlanConsumablesPurchaseService;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -58,6 +62,49 @@ public class PlanConsumablesPurchaseServiceImpl extends ServiceImpl<PlanConsumab
return BaseResponse.okData(pages);
}
/**
* 消耗品采购计划导出
* @param name
* @param fileName
* @param response
*/
@Override
public void export(String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("name", name);
List<Map<String, Object>> list= consumablesPurchaseMapper.exportList(params);
if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "产品名称";
headers[2] = "规格/型号";
headers[3] = "技术指标";
headers[4] = "单价(万元)";
headers[5] = "生产单位";
headers[6] = "采购数量";
headers[7] = "购买日期";
headers[8] = "采购人";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "消耗品采购计划": fileName, headers,
datas, response);
}
}
/**
* 创建
* @param query
......
......@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo;
import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import cn.wise.sc.cement.business.service.IPlanEquipmentMaintainService;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -59,6 +63,50 @@ public class PlanEquipmentMaintainServiceImpl extends ServiceImpl<PlanEquipmentM
return BaseResponse.okData(pages);
}
/**
* 设备维护计划列表导出
* @param name
* @param fileName
* @param response
*/
@Override
public void export(String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("name", name);
List<Map<String, Object>> list= equipmentMaintainMapper.exportList(params);
if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "产品名称";
headers[2] = "规格/型号";
headers[3] = "编号";
headers[4] = "维护日期";
headers[5] = "维护内容";
headers[6] = "执行人";
headers[7] = "完成情况";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "设备维护计划": fileName, headers,
datas, response);
}
}
/**
* 创建
* @param query
......
......@@ -15,6 +15,7 @@ import cn.wise.sc.cement.business.model.vo.TeamListVo;
import cn.wise.sc.cement.business.model.vo.TeamVo;
import cn.wise.sc.cement.business.service.IPlanEquipmentPurchaseService;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -27,7 +28,9 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -63,6 +66,49 @@ public class PlanEquipmentPurchaseServiceImpl extends ServiceImpl<PlanEquipmentP
return BaseResponse.okData(pages);
}
/**
* 设备采购计划列表导出
* @param name
* @param fileName
* @param response
*/
@Override
public void export(String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("name", name);
List<Map<String, Object>> list= equipmentPurchaseMapper.exportList(params);
if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "产品名称";
headers[2] = "规格/型号";
headers[3] = "技术指标";
headers[4] = "单价(万元)";
headers[5] = "生产单位";
headers[6] = "采购数量";
headers[7] = "购买日期";
headers[8] = "采购人";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "设备采购计划": fileName, headers,
datas, response);
}
}
/**
* 创建
* @param query
......
......@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo;
import cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo;
import cn.wise.sc.cement.business.service.IPlanEquipmentRepairService;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -58,6 +62,49 @@ public class PlanEquipmentRepairServiceImpl extends ServiceImpl<PlanEquipmentRep
return BaseResponse.okData(pages);
}
/**
* 设备维修计划导出
* @param name
* @param fileName
* @param response
*/
@Override
public void export(String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("name", name);
List<Map<String, Object>> list= equipmentRepairMapper.exportList(params);
if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "产品名称";
headers[2] = "规格/型号";
headers[3] = "技术指标";
headers[4] = "单价(万元)";
headers[5] = "生产单位";
headers[6] = "维修日期";
headers[7] = "执行人";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "设备维修计划": fileName, headers,
datas, response);
}
}
/**
* 创建
* @param query
......
......@@ -12,6 +12,7 @@ import cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo;
import cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo;
import cn.wise.sc.cement.business.service.IPlanStandardPurchaseService;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -23,8 +24,11 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -60,6 +64,46 @@ public class PlanStandardPurchaseServiceImpl extends ServiceImpl<PlanStandardPur
return BaseResponse.okData(pages);
}
/**
* 标样采购计划导出
* @param name
* @param fileName
* @param response
*/
@Override
public void export(String name, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("name", name);
List<Map<String, Object>> list= standardPurchaseMapper.exportList(params);
if (!com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "标物名称";
headers[2] = "经销单位";
headers[3] = "采购数量";
headers[4] = "采购时间";
headers[5] = "采购人";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "标样采购计划": fileName, headers,
datas, response);
}
}
/**
* 创建
* @param query
......
package cn.wise.sc.cement.business.service.impl;
import cn.wise.sc.cement.business.entity.QualityApply;
import cn.wise.sc.cement.business.mapper.QualityApplyMapper;
import cn.wise.sc.cement.business.service.IQualityApplyService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.Data;
import org.apache.poi.ss.usermodel.Header;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-10-12
*/
@Service
public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, QualityApply>
implements IQualityApplyService {
@Override
public Set<Integer> selectQualityApplyStatusByProIds(List<Integer> projectIds) {
if (projectIds.size() == 0) {
return new HashSet<>();
}
QueryWrapper<QualityApply> qw = new QueryWrapper<>();
qw.in("project_id", projectIds);
List<QualityApply> list = this.list(qw);
if (list.size() == 0) {
return new HashSet<>();
}
return list.stream().map(QualityApply::getProjectId).collect(Collectors.toSet());
}
@Override
public void exportQuality(Date startParse, Date endParse, HttpServletResponse response) {
QueryWrapper<QualityApply> qw = new QueryWrapper<>();
if (startParse != null) {
qw.ge("create_time", startParse);
}
if (endParse != null) {
qw.le("create_time", endParse);
}
List<QualityApply> list = this.list(qw);
//找到所有项目id归类
Set<Integer> projectIds = list.stream().map(QualityApply::getProjectId).collect(Collectors.toSet());
String[] headers = new String[30];
List<Object[]> datas = new ArrayList<>();
for (Integer projectId : projectIds) {
//找到每个项目的检测组 以检测组归类
Set<Integer> teamIds = list.stream()
.filter(arg -> arg.getProjectId().intValue() == projectId)
.map(QualityApply::getTeamGroupId)
.collect(Collectors.toSet());
for (Integer teamId : teamIds) {
List<QualityApply> samples = list.stream().filter(arg -> arg.getTeamGroupId().intValue() == teamId
&& arg.getProjectId().intValue() == projectId)
.collect(Collectors.toList());
//以样品归类
Set<Integer> sampleIds = samples.stream().map(QualityApply::getTeamGroupId)
.collect(Collectors.toSet());
//写每个样品的表头
list.stream()
.filter(arg -> arg.getTeamGroupId().intValue() == teamId )
.findFirst().ifPresent(arg -> {
List<String> teams = JSON.parseArray(arg.getTeams(), String.class);
Object[] objs = new Object[teams.size() + 7];
objs[0] = "项目名称";
objs[1] = "项目编号";
objs[2] = "样品名称";
objs[3] = "样品状态";
objs[4] = "来样编号";
objs[5] = "本所编号";
objs[6] = "分析";
for (int i = 0; i < teams.size(); i++) {
objs[7 + i] = teams.get(i);
}
datas.add(objs);
});
//为每个样品写值
samples.forEach(arg -> {
List<String> inputValus = JSON.parseArray(arg.getInputResult(), String.class);
Object[] objs = new Object[inputValus.size() + 7];
if (!"误差".equals(arg.getUserName())) {
objs[0] = arg.getProjectName();
objs[1] = arg.getProjectId();
objs[2] = arg.getSampleName();
objs[3] = arg.getSampleForm();
objs[4] = arg.getSampleCode();
objs[5] = arg.getCementCode();
}
//添加名字
objs[6] = arg.getUserName();
for (int i = 0; i < inputValus.size(); i++) {
objs[7 + i] = inputValus.get(i);
}
for (int i = 0; i < inputValus.size(); i++) {
objs[7 + i] = inputValus.get(i);
}
datas.add(objs);
});
}
}
ExcelUtil.excelExport("qualityApply", headers, datas, response);
}
}
......@@ -14,10 +14,12 @@ import cn.wise.sc.cement.business.service.IStandardEnterService;
import cn.wise.sc.cement.business.service.IStandardService;
import cn.wise.sc.cement.business.service.IStandardValueService;
import cn.wise.sc.cement.business.service.ISysUserService;
import cn.wise.sc.cement.business.util.ExcelUtil;
import cn.wise.sc.cement.business.wrapper.page.Query;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
......@@ -27,9 +29,12 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>
......@@ -78,6 +83,51 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
return BaseResponse.okData(page);
}
/**
* 标样信息列表导出
* @param name
* @param supplierName
* @param fileName
* @param response
*/
@Override
public void export(String name, String supplierName, String fileName, HttpServletResponse response) {
Map<String, Object> params = new HashMap<>();
params.put("supplierName", supplierName);
params.put("name", name);
List<Map<String, Object>> list= standardMapper.exportList(params);
if (!CollectionUtils.isEmpty(list)) {
Map<String, Object> map = list.get(0);
String[] headers = new String[map.size()];
headers[0] = "序号";
headers[1] = "标样名称";
headers[2] = "标物代号";
headers[3] = "经销单位";
headers[4] = "存放位置";
headers[5] = "进样日期";
headers[6] = "有效日期";
headers[7] = "剩余库存";
headers[8] = "状态";
List<Object[]> datas = new ArrayList<>(list.size());
for (Map<String, Object> m : list) {
Object[] objects = new Object[headers.length];
for (int j = 0; j < headers.length; j++) {
String obj = m.get(headers[j]).toString();
if(j==0){
obj = obj.split("\\.")[0];
}
objects[j] = obj;
}
datas.add(objects);
}
ExcelUtil.excelExport(
fileName == null || fileName.trim().length() <= 0 ? "标样信息": fileName, headers,
datas, response);
}
}
/**
* 新增标样
......
......@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.util;
import freemarker.template.Configuration;
import freemarker.template.Template;
import lombok.extern.slf4j.Slf4j;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
......@@ -11,7 +12,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Map;
......@@ -20,24 +20,29 @@ import java.util.Map;
* @author: qh
* @create: 2020-10-10 15:22
**/
@Slf4j
public class WordUtil {
/**
* 模板路径
*/
private static final String FTL_FP = "/templates/";
private static Configuration configuration;
static {
configuration = new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS);
configuration.setDefaultEncoding("utf-8");
//读配置文件
// path = PropertiesUtil.get("FILE_PATH")+"/";
}
public static Boolean writeWordReport(
/**
* 根据模板导出office文件
*
* @param templeName 导出的文件名
* @param templateFileName 模板名字
* @param beanParams 替换模板中的参数 <${模板占位符},对应值>
* @param response 响应体
*/
public static void writeWordReport(
String templeName,
String templateFileName,
Map<String, Object> beanParams,
......@@ -48,42 +53,43 @@ public class WordUtil {
configuration.setClassForTemplateLoading(WordUtil.class, FTL_FP);
Template template = configuration.getTemplate(templateFileName, "UTF-8");
//将文件输出到response,返回给客户端
String filePath;
filePath = "";
File file1 = new File(filePath);
if (!file1.exists()) {
file1.mkdirs();
}
//变量替换
//输出文件
file = new File(filePath + templeName);
//输出文件
FileOutputStream fos = new FileOutputStream(file);
out = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
//变量替换
template.process(beanParams, out);
FileInputStream in = new FileInputStream(file);
byte[] buffer = new byte[in.available()];
in.read(buffer);
int i = in.read(buffer);
if (i == -1) {
return;
}
in.close();
response.reset();
ServletOutputStream outputStream = response.getOutputStream();
response.setCharacterEncoding(StandardCharsets.UTF_8.toString());
response.setContentType("application/octet-stream");
templeName = new String((templeName).getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
templeName = new String((templeName).getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
response.setHeader("Content-Disposition", "attachment;filename=" + templeName + ".xls");
outputStream.write(buffer);
outputStream.flush();
outputStream.close();
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
} finally {
try {
if (out != null) {
out.close();
file.delete();
boolean delete = file.delete();
if (!delete) {
log.debug(file.getName() + "文件删除失败!");
}
}
} catch (IOException e) {
e.printStackTrace();
......
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Version>16.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>12650</WindowHeight>
<WindowWidth>22260</WindowWidth>
<WindowTopX>32767</WindowTopX>
<WindowTopY>32767</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="等线" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s63">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
<Font ss:FontName="等线" x:CharSet="134" ss:Size="11" ss:Color="#000000"
ss:Bold="1"/>
</Style>
<Style ss:ID="s64">
<Font ss:FontName="等线" x:CharSet="134" ss:Size="11" ss:Color="#000000"/>
</Style>
</Styles>
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="8" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="52" ss:DefaultRowHeight="14">
<Column ss:AutoFitWidth="0" ss:Width="116.5"/>
<Column ss:AutoFitWidth="0" ss:Width="117"/>
<Row>
<Cell ss:MergeAcross="1" ss:StyleID="s63"><Data ss:Type="String">中国水泥发展中心物化检测所检测委托单</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">委托单位</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${clientName}</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">委托编号</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${entrustCode}</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">委托人</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${userName}</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">电话</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${userPhone}</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">传真</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${userFax}</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">项目名称</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${projectName}</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">样品数量</Data></Cell>
<Cell ss:StyleID="s64"><Data ss:Type="String">${sampleNum}</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<Header x:Margin="0.3"/>
<Footer x:Margin="0.3"/>
<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/>
</PageSetup>
<Print>
<ValidPrinterInfo/>
<PaperSizeIndex>9</PaperSizeIndex>
<HorizontalResolution>600</HorizontalResolution>
<VerticalResolution>600</VerticalResolution>
</Print>
<Selected/>
<Panes>
<Pane>
<Number>3</Number>
<ActiveRow>9</ActiveRow>
<ActiveCol>4</ActiveCol>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment