Commit bd46ceb0 authored by shulidong's avatar shulidong

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	cement-business/src/main/java/cn/wise/sc/cement/business/util/ExcelUtil.java
parents 78eaf16a 624b9ace
......@@ -37,3 +37,10 @@ gen
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
/mybatis-generator/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
/mybatis-generator/target/maven-archiver/pom.properties
/cement-common/common-swagger/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
/cement-common/common-swagger/target/maven-archiver/pom.properties
/cement-common/common-swagger/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
/cement-common/common-swagger/target/maven-archiver/pom.properties
/cement-common/common-swagger/target/
......@@ -230,19 +230,22 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>*.xlsx</include>
<include>*</include>
<!--<include>*.xlsx</include>
<include>*</include>-->
</includes>
</resource>
<resource>
<!--<resource>
<directory>src/main/resources/templates</directory>
<filtering>true</filtering>
<includes>
<include>*</include>
</includes>
<targetPath>/templates</targetPath>
</resource>
</resource>-->
<resource>
<directory>src/main/java/cn/wise/sc/cement/business/mapper/xml</directory>
<filtering>true</filtering>
......
......@@ -70,57 +70,71 @@ public class DataStatisticsController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "统计概览-项目进展统计")
@ApiOperation(value = "统计概览-委托单进展统计")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "cycle", value = "统计周期1:本周 2:本月 3:本年", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "startDate", value = "开始日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String")
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "clientId", value = "委托单位Id", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "clientName", value = "委托单位名称", paramType = "query", dataType = "String")
})
@GetMapping("/countEntrustStatus")
public BaseResponse countEntrustStatus(Integer cycle, String startDate, String endDate) {
public BaseResponse countEntrustStatus(Integer cycle, String startDate, String endDate, Integer clientId, String clientName) {
try {
return dataStatisticsService.countEntrustStatus(cycle, startDate, endDate);
return dataStatisticsService.countEntrustStatus(cycle, startDate, endDate, clientId, clientName);
} catch (Exception e) {
log.debug("统计概览-项目进展统计{}", e);
log.debug("统计概览-委托单进展统计{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "项目进展统计-列表")
@ApiOperation(value = "委托单进展统计-列表")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "type", value = "类型1:按时间 2:按地区", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "cycle", value = "统计周期1:本周 2:本月 3:本年", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "startDate", value = "开始日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String")
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "clientId", value = "委托单位Id", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "clientName", value = "委托单位名称", paramType = "query", dataType = "String")
})
@GetMapping("/countEntrustPage")
public BaseResponse countEntrustPage(PageQuery pageQuery) {
public BaseResponse countEntrustPage(PageQuery pageQuery, Integer cycle, String startDate, String endDate, Integer clientId, String clientName) {
try {
return dataStatisticsService.countEntrustPage(pageQuery);
return dataStatisticsService.countEntrustPage(pageQuery, cycle, startDate, endDate, clientId, clientName);
} catch (Exception e) {
log.debug("项目进展统计-列表{}", e);
log.debug("委托单进展统计-列表{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("列表导出-委托单进展统计")
@PostMapping("/exportEntrustList")
public void exportEntrustList(Integer cycle, String startDate,
String endDate, Integer clientId, String clientName, String fileName, HttpServletResponse response) {
try {
dataStatisticsService.exportEntrustList(cycle, startDate, endDate, clientId, clientName, fileName, response);
} catch (Exception e) {
log.debug("列表导出-委托单进展统计{}", e);
}
}
@ApiOperation(value = "统计概览-进行中任务数量统计")
@GetMapping("/countTaskIng")
public BaseResponse countTaskIng(PageQuery pageQuery) {
public BaseResponse countTaskIng(PageQuery pageQuery, String startDate, String endDate) {
try {
return dataStatisticsService.countTaskIng(pageQuery);
return dataStatisticsService.countTaskIng(pageQuery, startDate, endDate);
} catch (Exception e) {
log.debug("统计概览-进行中任务数量统计{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "统计概览-正在进行的检测项统计")
@GetMapping("/countTeamIng")
public BaseResponse countTeamIng() {
public BaseResponse countTeamIng(String startDate, String endDate) {
try {
return dataStatisticsService.countTeamIng();
return dataStatisticsService.countTeamIng(startDate, endDate);
} catch (Exception e) {
log.debug("统计概览-正在进行的检测项统计{}", e);
}
......@@ -128,35 +142,75 @@ public class DataStatisticsController {
}
@ApiOperation(value = "检测项数量统计-检测项数量统计")
@ApiOperation(value = "检测项统计-检测项数量统计")
@GetMapping("/countTeamDetail")
public BaseResponse countTeamDetail(Integer cycle, String startDate, String endDate) {
try {
return dataStatisticsService.countTeamDetail(cycle, startDate, endDate);
} catch (Exception e) {
log.debug("检测项数量统计-检测项数量统计{}", e);
log.debug("检测项统计-检测项数量统计{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "检测项数量统计-列表")
@ApiOperation(value = "检测项统计-分页列表")
@GetMapping("/countTeamList")
public BaseResponse countTeamList() {
public BaseResponse countTeamList(PageQuery pageQuery, Integer cycle, String startDate, String endDate) {
try {
return dataStatisticsService.countTeamList(pageQuery, cycle, startDate, endDate);
} catch (Exception e) {
log.debug("检测项统计-列表{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("列表导出-检测项统计")
@PostMapping("/exportTeamList")
public void exportTeamList(Integer cycle, String startDate, String endDate, String fileName, HttpServletResponse response) {
try {
return dataStatisticsService.countTeamList();
dataStatisticsService.exportTeamList(cycle, startDate, endDate, fileName, response);
} catch (Exception e) {
log.debug("检测项数量统计-列表{}", e);
log.debug("检测项统计-列表导出{}", e);
}
}
@ApiOperation(value = "各委托单位项目数量统计")
@GetMapping("/countByClient")
public BaseResponse countByClient() {
try {
return dataStatisticsService.countByClient();
} catch (Exception e) {
log.debug("各委托单位项目数量统计{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation("检测项分布统计")
@ApiOperation("检测元素含量分布情况统计")
@PostMapping("/item/download")
public BaseResponse<Page<ItemDistributionVo>> downloadItemDistribution(@RequestBody CountItemDistributionQuery query, HttpServletResponse response) {
public BaseResponse<Page<ItemDistributionVo>> downloadItemDistribution(@RequestBody CountItemDistributionQuery query,
HttpServletResponse response) {
return dataStatisticsService.countItemDistribution(query, response);
}
@ApiOperation("列表导出-检测元素含量分布情况统计")
@PostMapping("/exportItemDistribution")
public void exportItemDistribution(@RequestBody CountItemDistributionQuery query, String fileName, HttpServletResponse response) {
try {
dataStatisticsService.exportItemDistribution(query, fileName, response);
} catch (Exception e) {
log.debug("列表导出-检测元素含量分布情况统计{}", e);
}
}
}
......@@ -94,7 +94,7 @@ public class EntityEnclosureController {
fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."));
extName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
} else {
return BaseResponse.errorMsg("登录信息失效");
return BaseResponse.noLogin("登录信息失效");
}
if (extName.contains(FileExt.EXCL.getName()) || extName.contains(FileExt.EXCLX.getName())) {
String pdfPath = FastDFSUtils.conventAndUploadExcel(file.getInputStream(), fileName);
......@@ -138,7 +138,7 @@ public class EntityEnclosureController {
fileName = file.getOriginalFilename().substring(0, file.getOriginalFilename().lastIndexOf("."));
extName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
} else {
return BaseResponse.errorMsg("登录信息失效");
return BaseResponse.noLogin("登录信息失效");
}
String picUrl = filePath;
map.put("fileUrl", picUrl);
......@@ -195,7 +195,7 @@ public class EntityEnclosureController {
return BaseResponse.errorMsg("没有文件");
}
} else {
return BaseResponse.errorMsg("登录信息失效");
return BaseResponse.noLogin("登录信息失效");
}
return BaseResponse.okData(map);
} catch (Exception e) {
......@@ -222,7 +222,7 @@ public class EntityEnclosureController {
// String data = encoder.encode(by);
// return BaseResponse.okMsg(data);
} else {
return BaseResponse.errorMsg("登录信息失效");
return BaseResponse.noLogin("登录信息失效");
}
return BaseResponse.okMsg("成功");
} catch (Exception e) {
......@@ -270,7 +270,7 @@ public class EntityEnclosureController {
}
}
} else {
return BaseResponse.errorMsg("登录信息失效");
return BaseResponse.noLogin("登录信息失效");
}
return BaseResponse.okMsg("成功");
......
package cn.wise.sc.cement.business.controller;
import cn.wise.sc.cement.business.service.IEntrustLogsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 日志
* </p>
*
* @author ztw
* @since 2021-01-27
*/
@RestController
@RequestMapping("/business/entrust-logs")
public class EntrustLogsController {
@Autowired
IEntrustLogsService iEntrustLogsService;
@GetMapping("/test")
public void test(){
iEntrustLogsService.addLog(1L,"委托派发","派发","张三派发六元素检测给李四",3L);
}
}
package cn.wise.sc.cement.business.controller;
import cn.wise.sc.cement.business.entity.Equipment;
import cn.wise.sc.cement.business.entity.EquipmentType;
import cn.wise.sc.cement.business.entity.SysPost;
import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.PageQuery;
......@@ -47,12 +48,13 @@ public class EquipmentController {
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "brand", value = "设备品牌", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "supplierId", value = "供应商表id", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "name", value = "设备名称", paramType = "query", dataType = "String")
@ApiImplicitParam(name = "name", value = "设备名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "设备分类", paramType = "query", dataType = "String")
})
@GetMapping("/getPage")
public BaseResponse getPage(PageQuery pageQuery, String brand, Integer supplierId, String name) {
public BaseResponse getPage(PageQuery pageQuery, String brand, Integer supplierId, String name, String type) {
try {
return equipmentService.getPage(pageQuery, brand, supplierId, name);
return equipmentService.getPage(pageQuery, brand, supplierId, name, type);
} catch (Exception e) {
log.debug("设备分页列表{}", e);
}
......@@ -100,9 +102,9 @@ public class EquipmentController {
@ApiOperation("设备列表导出")
@PostMapping("/export")
public void export(String brand, Integer supplierId, String name, String fileName, HttpServletResponse response) {
public void export(String brand, Integer supplierId, String name, String type, String fileName, HttpServletResponse response) {
try {
equipmentService.export(brand, supplierId, name, fileName, response);
equipmentService.export(brand, supplierId, name, type, fileName, response);
} catch (Exception e) {
log.debug("设备列表导出{}", e);
}
......@@ -325,5 +327,96 @@ public class EquipmentController {
}
}
//*********************************************************************
@ApiOperation(value = "设备分类分页列表")
@GetMapping("/getTypePage")
public BaseResponse getTypePage(PageQuery pageQuery) {
try {
return equipmentService.getTypePage(pageQuery);
} catch (Exception e) {
log.debug("设备分类分页列表{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "新增设备分类")
@PostMapping("/createType")
public BaseResponse createType(@RequestBody EquipmentType equipmentType) {
try {
return equipmentService.createType(equipmentType);
} catch (Exception e) {
log.debug("新增设备分类{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "修改设备分类")
@PostMapping("/updateType")
public BaseResponse updateType(@RequestBody EquipmentType equipmentType) {
try {
return equipmentService.updateType(equipmentType);
} catch (Exception e) {
log.debug("修改设备分类{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "禁用启用分类")
@PostMapping("/statusType")
public BaseResponse statusType(Integer status, Integer id) {
try {
return equipmentService.statusType(status, id);
} catch (Exception e) {
log.debug("禁用启用分类{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "删除分类")
@PostMapping("/deleteType")
public BaseResponse deleteType(Integer id) {
try {
return equipmentService.deleteType( id);
} catch (Exception e) {
log.debug("删除分类{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "分类列表")
@GetMapping("/getTypeList")
public BaseResponse getTypeList() {
try {
return equipmentService.getTypeList();
} catch (Exception e) {
log.debug("分类列表{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "分类选择设备列表")
@GetMapping("/getEquipmentList")
public BaseResponse getEquipmentList() {
try {
return equipmentService.getEquipmentList();
} catch (Exception e) {
log.debug("分类选择设备列表{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "转移分类")
@PostMapping("/changeType")
public BaseResponse changeType(Integer id, Integer typeId) {
try {
return equipmentService.changeType(id, typeId);
} catch (Exception e) {
log.debug("转移分类{}", e);
}
return BaseResponse.errorMsg("失败!");
}
}
......@@ -113,7 +113,7 @@ public class NormProductionController {
@GetMapping("/statistics")
@ApiOperation("标准产值统计")
@ApiOperation("标准产值统计-分页")
public BaseResponse<Page<NormProductionStatistics>> normProductionStatistics(String start, String end, String name, Integer groupId, PageQuery pageQuery) {
Long startTime = null;
......@@ -137,6 +137,28 @@ public class NormProductionController {
return BaseResponse.okData(new Page<>());
}
@GetMapping("/statisticsList")
@ApiOperation("标准产值统计-列表")
public BaseResponse<List<NormProductionStatistics>> normProductionStatisticsList(String start, String end, String name, Integer groupId) {
Long startTime = null;
Long endTime = null;
if (StrUtil.isNotBlank(start) && StrUtil.isNotBlank(end)) {
startTime = DateUtil.parseDate(start).getTime();
endTime = DateUtil.parseDate(end).offsetNew(DateField.DAY_OF_MONTH, 1).getTime();
}
//将list拆分成分页
BaseResponse<List<NormProductionStatistics>> baseResponse = iPrecipriceService
.normProductionStatistics(startTime, endTime, name, groupId);
return baseResponse;
}
//todo 人员工作统计导出
@GetMapping("/statistics/detail")
@ApiOperation("标准产值详情")
public BaseResponse<Page<NormProduction.NormProductionDetail>> normProductionDetails(Integer userId, String start,
......
......@@ -3,7 +3,6 @@ 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.query.PlanPeopleQuery;
import cn.wise.sc.cement.business.model.query.SampleDistributionEnclosureQuery;
import cn.wise.sc.cement.business.service.IPlanPeopleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......
......@@ -33,56 +33,55 @@ import java.util.stream.Collectors;
@RequestMapping("/business/quality")
public class QualityController {
final
IEntrustService iEntrustService;
final
IQualityApplyService iQualityApplyService;
final
IEntrustService iEntrustService;
final
IQualityApplyService iQualityApplyService;
public QualityController(IEntrustService iEntrustService, IQualityApplyService iQualityApplyService) {
this.iEntrustService = iEntrustService;
this.iQualityApplyService = iQualityApplyService;
}
public QualityController(IEntrustService iEntrustService, IQualityApplyService iQualityApplyService) {
this.iEntrustService = iEntrustService;
this.iQualityApplyService = iQualityApplyService;
}
@ApiOperation(value = "质量检测分页列表")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "startDate", value = "开始日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "clientId", value = "委托单位id", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "projectCode", value = "项目编号", paramType = "query", dataType = "String")
})
@GetMapping("/getPage")
public BaseResponse<IPage<EntrustVo>> page(PageQuery pageQuery, String startDate, String endDate,
Integer clientId, String projectName, String projectCode) {
BaseResponse<IPage<EntrustVo>> baseResponse = iEntrustService.getQualityPage(
pageQuery, startDate, endDate, clientId, projectName, projectCode);
@ApiOperation(value = "质量检测分页列表")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "startDate", value = "开始日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "clientId", value = "委托单位id", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "projectName", value = "项目名称", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "projectCode", value = "项目编号", paramType = "query", dataType = "String")
})
@GetMapping("/getPage")
public BaseResponse<IPage<EntrustVo>> page(PageQuery pageQuery, String startDate, String endDate,
Integer clientId, String projectName, String projectCode) {
BaseResponse<IPage<EntrustVo>> baseResponse = iEntrustService.getQualityPage(
pageQuery, startDate, endDate, clientId, projectName, projectCode);
//判断是否已经评审过
if (baseResponse.getCode() == 200) {
//判断是否已经评审过
if (baseResponse.getCode() == 200) {
List<EntrustVo> records = baseResponse.getData().getRecords();
if (records.size() == 0) {
return BaseResponse.okData(new Page<>());
}
List<Integer> projectIds = records.stream().map(EntrustVo::getId).collect(Collectors.toList());
Set<Integer> qualityApplyIds = iQualityApplyService.selectQualityApplyStatusByProIds(projectIds);
records.forEach(arg -> {
if (qualityApplyIds.contains(arg.getId())) {
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));
}
List<EntrustVo> records = baseResponse.getData().getRecords();
if (records.size() == 0) {
return BaseResponse.okData(new Page<>());
}
List<Integer> projectIds = records.stream().map(EntrustVo::getId).collect(Collectors.toList());
Set<Integer> qualityApplyIds = iQualityApplyService.selectQualityApplyStatusByProIds(projectIds);
records.forEach(arg -> {
if (qualityApplyIds.contains(arg.getId())) {
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));
}
}
......@@ -105,8 +105,7 @@ public class SupplierController {
@PostMapping("/delete/{id}")
public BaseResponse delete(@PathVariable Integer id) {
try {
supplierService.removeById(id);
return BaseResponse.okData("删除成功");
return supplierService.deleteSupplier(id);
} catch (Exception e) {
log.debug("删除供应商{}", e);
}
......
......@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
/**
* <p>
......@@ -137,8 +138,6 @@ public class TeamController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "获取检测项目列表")
@GetMapping("/getTeamNameList")
public BaseResponse getTeamNameList() {
......@@ -150,7 +149,45 @@ public class TeamController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "根据检测组id获取本组序号列表")
@GetMapping("/getSortByGroup")
public BaseResponse getSortByGroup(Integer gruopId) {
try {
return teamService.getSortByGroup(gruopId);
} catch (Exception e) {
log.debug("根据检测组id获取本组序号列表{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "获取检测项所需列表(检测组,检测依据,处理项)")
@GetMapping("/getSummaryList")
public BaseResponse getSummaryList() {
try {
System.out.println("start:******************"+ System.currentTimeMillis());
BaseResponse b = teamService.getSummaryList();
System.out.println("end:******************"+System.currentTimeMillis());
return b;
} catch (Exception e) {
log.debug("获取检测项所需列表(检测组,检测依据,处理项){}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "不使用-获取检测项所需列表(检测组,检测依据,处理项)")
@GetMapping("/getSummaryListNew")
public BaseResponse getSummaryListNew() {
try {
System.out.println("start:******************"+ System.currentTimeMillis());
BaseResponse b = teamService.getSummaryListNew();
System.out.println("end:******************"+System.currentTimeMillis());
return b;
} catch (Exception e) {
log.debug("不使用-获取检测项所需列表(检测组,检测依据,处理项){}", e);
}
return BaseResponse.errorMsg("失败!");
}
}
package cn.wise.sc.cement.business.controller;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil;
import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.service.impl.WeiXinService;
import cn.wise.sc.cement.business.util.weixin.Global;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -25,7 +25,7 @@ import java.util.Map;
@RestController
@RequestMapping("/tcdri/weixin")
public class WeiXinController {
//
private static final Logger log = LoggerFactory.getLogger("WeiXinController");
@Autowired
......@@ -63,6 +63,20 @@ public class WeiXinController {
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "刷新token")
@GetMapping("/getNewToken")
public BaseResponse getNewToken(String refreshToken) {
try {
return weiXinService.getNewToken(refreshToken);
} catch (Exception e) {
log.debug("刷新token{}", e);
}
return BaseResponse.errorMsg("失败!");
}
@ApiOperation(value = "当前登录用户")
@GetMapping("/getLoginUser")
public BaseResponse getLoginUser() {
......@@ -139,17 +153,16 @@ public class WeiXinController {
@ApiOperation(value = "发送消息")
@GetMapping("/sendTextMessage")
public BaseResponse sendTextMessage() {
public BaseResponse sendTextMessage(String touser, Integer entrustId) {
try {
//发送企业微信消息内容
String content="你好!"+"竹天卫"+"向您申请了一条委托,请前往\n" +
systemUrl+"进行评审。";
String systemUrL = weiXinService.createMessage(entrustId, "/blanche/entrustdetail");
String content="你好!"+"竹天卫"+"向您申请了一条新委托,请前往\n" +
systemUrL+"进行评审。";
System.out.println("**************************content**********************");
System.out.println(content);
weiXinService.sendTextMessage("ZhuTianWei", content);
weiXinService.sendTextMessage(touser, content);
// weiXinService.sendTextMessage("1","hello");
return BaseResponse.okData("成功");
} catch (Exception e) {
log.debug("发送消息{}", e);
......@@ -157,4 +170,5 @@ public class WeiXinController {
return BaseResponse.errorMsg("失败!");
}
}
......@@ -59,9 +59,9 @@ public class Consumables implements Serializable {
@ApiModelProperty("库存数量 单位:g")
private BigDecimal stockNum;
@ApiModelProperty("入库数量 (单位:瓶)")
/*@ApiModelProperty("入库数量 (单位:瓶)")
@TableField(exist = false)
private Integer enterNum;
private BigDecimal enterNum;*/
@ApiModelProperty("多少g/瓶")
private BigDecimal unitStock;
......
......@@ -41,7 +41,7 @@ public class ConsumablesEnter implements Serializable {
private Integer userId;
@ApiModelProperty("新增数量 瓶")
private Integer enterNum;
private BigDecimal enterNum;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
......
......@@ -75,7 +75,7 @@ public class Entrust implements Serializable {
private Integer handleMethod;
@ApiModelProperty("状态(0未评审,1已通过,2未通过,3样品处理中,4样品处理完成," +
"5样品检测中,6样品检测完成,7校核中,8校核完成)")
"5样品检测中,6样品检测完成,7校核中,8校核完成,9修改待确认,10已作废)")
private Integer status;
@ApiModelProperty("项目类型(常规项目,科研项目,质量控制项目)")
......
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-01-27
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EntrustLogs implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long entrustId;
private String nodeName;
private String operation;
private String content;
private Long operatorId;
private Long acceptId;
}
......@@ -28,5 +28,10 @@ public class EntrustSample {
private Integer teamGroupId;
private Integer userId;
private LocalDateTime finishTime;
/**
* 舍弃
*/
private String content;
private Long handleId;
}
......@@ -34,6 +34,12 @@ public class Equipment implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("设备分类表id")
private Integer type;
@ApiModelProperty("是否已检定(1是,0否)")
private Integer isChecked;
@ApiModelProperty("设备名称")
private String name;
......
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-01-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EquipmentType implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("分类名称")
private String name;
@ApiModelProperty("状态 0:禁用 1:激活")
private Integer status;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
@ApiModelProperty("备注")
private String remark;
}
......@@ -2,10 +2,12 @@ package cn.wise.sc.cement.business.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
......@@ -41,24 +43,31 @@ public class PlanConsumablesPurchase implements Serializable {
private String name;
@ApiModelProperty("规格型号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String model;
@ApiModelProperty("技术指标")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String technicalIndex;
@ApiModelProperty("单价(万元)")
@TableField(fill = FieldFill.INSERT_UPDATE)
private BigDecimal unitPrice;
@ApiModelProperty("生产单位")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String productionUnit;
@ApiModelProperty("采购数量")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer purchaseNum;
@ApiModelProperty("采购日期(购买日期)")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDate purchaseDate;
@ApiModelProperty("采购人id")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer purchaserId;
@ApiModelProperty("创建人id")
......@@ -68,6 +77,7 @@ public class PlanConsumablesPurchase implements Serializable {
private Integer status;
@ApiModelProperty("实施情况")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String implementation;
@ApiModelProperty("创建时间")
......
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.*;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
......@@ -39,24 +37,30 @@ public class PlanEquipmentMaintain implements Serializable {
private String name;
@ApiModelProperty("规格型号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String model;
@ApiModelProperty("编号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String code;
@ApiModelProperty("维护日期")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDate maintainDate;
@ApiModelProperty("创建人id")
private Integer userId;
@ApiModelProperty("设备维护人id")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer maintainerId;
@ApiModelProperty("维护内容")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String maintainContent;
@ApiModelProperty("维护结果")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String maintainResult;
@ApiModelProperty("设备维护计划附件地址")
......
......@@ -2,10 +2,12 @@ package cn.wise.sc.cement.business.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
......@@ -41,24 +43,31 @@ public class PlanEquipmentPurchase implements Serializable {
private String name;
@ApiModelProperty("规格型号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String model;
@ApiModelProperty("技术指标")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String technicalIndex;
@ApiModelProperty("单价(万元)")
@TableField(fill = FieldFill.INSERT_UPDATE)
private BigDecimal unitPrice;
@ApiModelProperty("生产单位")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String productionUnit;
@ApiModelProperty("采购数量")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer purchaseNum;
@ApiModelProperty("采购日期(购买日期)")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDate purchaseDate;
@ApiModelProperty("采购人id")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer purchaserId;
@ApiModelProperty("创建人id")
......@@ -68,6 +77,7 @@ public class PlanEquipmentPurchase implements Serializable {
private Integer status;
@ApiModelProperty("实施情况")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String implementation;
@ApiModelProperty("创建时间")
......
......@@ -2,10 +2,12 @@ package cn.wise.sc.cement.business.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
......@@ -41,30 +43,37 @@ public class PlanEquipmentRepair implements Serializable {
private String name;
@ApiModelProperty("规格型号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String model;
@ApiModelProperty("技术指标")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String technicalIndex;
@ApiModelProperty("单价(万元)")
@TableField(fill = FieldFill.INSERT_UPDATE)
private BigDecimal unitPrice;
@ApiModelProperty("生产单位")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String productionUnit;
@ApiModelProperty("维修日期")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDate repairDate;
@ApiModelProperty("创建人id")
private Integer userId;
@ApiModelProperty("维修人id")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer repairerId;
@ApiModelProperty("状态(0待完成,1已完成)")
private Integer status;
@ApiModelProperty("实施情况")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String implementation;
@ApiModelProperty("创建时间")
......
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
......@@ -39,30 +41,37 @@ public class PlanStandardPurchase implements Serializable {
private String name;
@ApiModelProperty("标物编号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String code;
@ApiModelProperty("经销单位")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String distributionUnit;
@ApiModelProperty("采购数量")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer purchaseNum;
@ApiModelProperty("采购日期(购买日期)")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDate purchaseDate;
@ApiModelProperty("采购人id")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Integer purchaserId;
@ApiModelProperty("创建人id")
private Integer userId;
@ApiModelProperty("规格型号")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String model;
@ApiModelProperty("状态(0禁用,1已启用)")
private Integer status;
@ApiModelProperty("实施情况")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String implementation;
@ApiModelProperty("创建时间")
......
......@@ -32,6 +32,9 @@ public class SampleDistribution implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("委托表id")
private Integer entrustId;
@ApiModelProperty("样品表d")
private Integer sampleId;
......@@ -44,7 +47,7 @@ public class SampleDistribution implements Serializable {
@ApiModelProperty("处理人id")
private Integer userId;
@ApiModelProperty("(0未接受,1接受,2完成)")
@ApiModelProperty("(0未接受,1接受,2待校核,3退回,4校核通过,5校核退回)")
private Integer status;
@ApiModelProperty("接受时间")
......@@ -59,16 +62,15 @@ public class SampleDistribution implements Serializable {
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("附件地址")
private String enclosureUrl;
@ApiModelProperty("检测结果")
private String distributionResult;
@ApiModelProperty("校核输入表id")
private Integer checkInputId;
@ApiModelProperty("文件名")
private String alias;
@ApiModelProperty("校核结果表id")
private Integer checkId;
@ApiModelProperty("扩展名")
private String extName;
@ApiModelProperty("上传图片时间")
private LocalDateTime updateTime;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-02-05
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SampleDistributionCheck implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 检测误差
*/
private String distributionError;
/**
* 最终结果
*/
private String lastResult;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
/**
* 备注
*/
private String remark;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-02-06
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sample_distribution_checkinput")
public class SampleDistributionCheckinput implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 委托表id
*/
private Integer entrustId;
/**
* 样品表d
*/
private Integer sampleId;
/**
* 检测组id
*/
private Integer teamGroupId;
/**
* 处理人id
*/
private Integer userId;
/**
* 校核人id
*/
private Integer checkUserId;
/**
* 检测结果 输入的 信息 json串
{"样重m":"40","K值":1.0274,"Vsio2":3.89,................}
*/
private String inputResult;
/**
* 状态((0未接受,1接受,2待校核,3退回,4校核通过,5校核退回)
*/
private Integer status;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 最后一次校核时间
*/
private LocalDateTime updateTime;
/**
* 备注
*/
private String remark;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-02-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SampleDistributionEnclosure implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 样品检测表id
*/
private Integer sampleDistributionId;
/**
* 处理项表id
*/
private Integer teamId;
/**
* 操作人id
*/
private Integer userId;
/**
* 附件地址
*/
private String enclosureUrl;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 上传图片时间
*/
private LocalDateTime updateTime;
/**
* 状态(0未上传,1成功,2上传失败)
*/
private Integer status;
/**
* 文件名
*/
private String alias;
/**
* 扩展名
*/
private String extName;
/**
* pdf地址
*/
private String pdfUrl;
/**
* 是否允许委托人查看 是否公开 (0不公开,1公开)
*/
private Integer isPublic;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-02-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SampleDistributionEquipment implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 样品表d
*/
private Integer distributionId;
/**
* 检测组id
*/
private Integer equipmentId;
/**
* 检测设备名称
*/
private String equipmentName;
/**
* 处理人id
*/
private Integer userId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 备注
*/
private String remark;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-02-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SampleDistributionReturn implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 样品处理表id
*/
private Integer sampleDistributionId;
/**
* 处理人id
*/
private Integer userId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 退回原因
*/
private String returnReason;
/**
* 备注
*/
private String remark;
}
......@@ -47,7 +47,7 @@ public class SampleHandle implements Serializable {
@ApiModelProperty("要求完成日期(计划完成日期)")
private LocalDate planFinishDate;
@ApiModelProperty("(0未接受,1接受,2完成)")
@ApiModelProperty("(0未接受,1接受,2完成,3退回)")
private Integer status;
@ApiModelProperty("接受时间")
......
......@@ -62,4 +62,9 @@ public class SampleHandleEnclosure implements Serializable {
@ApiModelProperty("pdf路径")
private String pdfUrl;
/**
* 是否允许委托人查看 是否公开 (0不公开,1公开)
*/
private Integer isPublic;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-02-03
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SampleHandleReturn implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 样品处理表id
*/
private Integer sampleHandleId;
/**
* 处理人id
*/
private Integer userId;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 退回原因
*/
private String returnReason;
/**
* 备注
*/
private String remark;
}
......@@ -42,7 +42,7 @@ public class StandardEnter implements Serializable {
private Integer userId;
@ApiModelProperty("新增数量(单位: 瓶)")
private Integer enterNum;
private BigDecimal enterNum;
@ApiModelProperty("创建时间")
private LocalDateTime createTime;
......
......@@ -73,7 +73,27 @@ public class Team extends BaseEntity implements Serializable {
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("处理项表id")
private Integer handleId;
@ApiModelProperty("处理项表id 1、2、3")
private String handleId;
@ApiModelProperty("处理项名称 a、b、c")
private String handleName;
@ApiModelProperty("本组序号 12345")
private Integer sortNo;
@ApiModelProperty("是否需要平行(0否,1是)")
private Integer isParallel;
@ApiModelProperty("是否需要派发(0否 样品处理完直接校核,1是样品处理完需要检测再校核)")
private Integer isPf;
@ApiModelProperty("小数位数(0保留整数,1保留1位小数...)")
private Integer retain;
@ApiModelProperty("单位")
private String units;
}
package cn.wise.sc.cement.business.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2021-03-04
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Titration implements Serializable {
private static final long serialVersionUID=1L;
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 检测用户id
*/
private Integer userId;
/**
* 检测组id
*/
private Integer teamGroupId;
/**
* 校核元素
*/
private String checkElement;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 修改时间
*/
private LocalDateTime updateTime;
/**
* 备注
*/
private String remark;
}
......@@ -36,7 +36,13 @@ public enum BusinessExceptionEnum implements BusinessExceptionAssert {
/**
* 业务异常
*/
BUSINESS_ERROR(400, "Business not pass.");
BUSINESS_ERROR(400, "Business not pass."),
/**
* 用户未登录
*/
NO_LOGIN(401, "Please login.");
BusinessExceptionEnum(int code, String message) {
this.code = code;
......
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Consumables;
import cn.wise.sc.cement.business.model.vo.EquipmentVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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;
......@@ -17,5 +20,9 @@ import java.util.Map;
*/
public interface ConsumablesMapper extends BaseMapper<Consumables> {
IPage<Consumables> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
}
......@@ -30,28 +30,51 @@ public interface DataStatisticsMapper {
List<DataStatisticsVo> countTeamByOrigin(@Param("params") Map<String, Object> params);
Integer countEntrustSumNum(@Param("params") Map<String, Object> params);
List<DataStatisticsVo> countEntrustStatus(@Param("params") Map<String, Object> params);
List<DataStatisticsVo> countEntrustType(@Param("params") Map<String, Object> params);
IPage<EntrustVo> countEntrustPage(@Param("page") Page page);
IPage<EntrustVo> countEntrustPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportEntrustList(@Param("params") Map<String, Object> params);
IPage<DataStatisticsVo> countHandlePage(@Param("page") Page page, @Param("params") Map<String, Object> params);
IPage<DataStatisticsVo> countHandlePage(@Param("page") Page page);
Integer countHandleWeek(@Param("userId") Integer userId, @Param("weekType") Integer weekType);
IPage<DataStatisticsVo> countDistributionPage(@Param("page") Page page);
IPage<DataStatisticsVo> countDistributionPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<DataStatisticsVo> countTeamIng();
Integer countDistributionWeek(@Param("userId") Integer userId, @Param("weekType") Integer weekType);
List<DataStatisticsVo> countTeamIng(@Param("params") Map<String, Object> params);
List<DataStatisticsVo> countTeam(@Param("params") Map<String, Object> params);
List<DataStatisticsTeamVo> countTeamList();
IPage<DataStatisticsTeamVo> countTeamPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<Map<String, Object>> exportTeamList(@Param("params") Map<String, Object> params);
Integer countEntrustNum(@Param("teamId") Integer teamId);
Integer countSampleNum(@Param("teamId") Integer teamId);
List<DataStatisticsVo> countByClient();
IPage<ItemDistribution> countItemDistribution(@Param("page") Page<ItemDistribution> page,
@Param("start") Date startTime,
@Param("end") Date endTime,
@Param("start") String startTime,
@Param("end") String endTime,
@Param("origins") List<String> origins,
@Param("itemId") Long itemId);
ItemDistributionSample countItemDistributionSample(@Param("start") Date startTime, @Param("end") Date endTime,
ItemDistributionSample countItemDistributionSample(@Param("start") String startTime, @Param("end") String endTime,
@Param("origin") String origin, @Param("teamId") Long teamId);
List<Map<String, Object>> exporItemDistributionList(@Param("start") String startTime,
@Param("end") String endTime,
@Param("origins") List<String> origins,
@Param("itemId") Long itemId);
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.EntrustLogs;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-01-27
*/
public interface EntrustLogsMapper extends BaseMapper<EntrustLogs> {
}
......@@ -5,6 +5,7 @@ import cn.wise.sc.cement.business.entity.EntrustReport;
import cn.wise.sc.cement.business.entity.QualityDetail;
import cn.wise.sc.cement.business.model.vo.EntrustVo;
import cn.wise.sc.cement.business.model.vo.ProjectVo;
import cn.wise.sc.cement.business.model.vo.SampleReturnHandleVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -43,4 +44,12 @@ public interface EntrustMapper extends BaseMapper<Entrust> {
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
//*************************************
IPage<SampleReturnHandleVo> getSampleReturnHandlePage(@Param("page") Page page, @Param("params") Map<String, Object> params);
IPage<SampleReturnHandleVo> getSampleReturnDistributioPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
IPage<EntrustVo> getSampleReturnCheckPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
}
......@@ -23,6 +23,8 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
IPage<EquipmentVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<EquipmentVo> getEQList();
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
List<Map<String, Object>> exportTestList(@Param("params") Map<String, Object> params);
......
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.EquipmentType;
import cn.wise.sc.cement.business.model.vo.EquipmentTypeVo;
import cn.wise.sc.cement.business.model.vo.GroupVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-01-28
*/
public interface EquipmentTypeMapper extends BaseMapper<EquipmentType> {
IPage<EquipmentTypeVo> getPage(@Param("page") Page page);
List<EquipmentTypeVo> getEqTypeList();
}
......@@ -3,12 +3,14 @@ package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Handle;
import cn.wise.sc.cement.business.model.vo.ClientVo;
import cn.wise.sc.cement.business.model.vo.HandleVo;
import cn.wise.sc.cement.business.model.vo.SummaryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
......@@ -29,6 +31,8 @@ public interface HandleMapper extends BaseMapper<Handle> {
@Select("select count(*) from team t where t.handle_id = #{id}")
Integer countTeamByhandleId(@Param("id") Integer id);
@Select("select id, name from handle")
List<SummaryVo> fetchList();
......
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Method;
import cn.wise.sc.cement.business.model.vo.SummaryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
......@@ -18,4 +20,7 @@ import java.util.Map;
public interface MethodMapper extends BaseMapper<Method> {
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
@Select("select id, name from method")
List<SummaryVo> fetchList();
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleDistributionCheck;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-02-05
*/
public interface SampleDistributionCheckMapper extends BaseMapper<SampleDistributionCheck> {
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleDistributionCheckinput;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-02-06
*/
public interface SampleDistributionCheckinputMapper extends BaseMapper<SampleDistributionCheckinput> {
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleDistributionEnclosure;
import cn.wise.sc.cement.business.model.vo.SampleDistributionEnclosureVo;
import cn.wise.sc.cement.business.model.vo.SampleHandleEnclosureVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-02-04
*/
public interface SampleDistributionEnclosureMapper extends BaseMapper<SampleDistributionEnclosure> {
List<SampleDistributionEnclosureVo> getList(@Param("params") Map<String, Object> params);
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleDistributionEquipment;
import cn.wise.sc.cement.business.model.vo.SampleDistributionEquipmentVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-02-04
*/
public interface SampleDistributionEquipmentMapper extends BaseMapper<SampleDistributionEquipment> {
List<SampleDistributionEquipmentVo> getEqupmentList(@Param("distributionId") Integer distributionId,
@Param("userId") Integer userId);
}
......@@ -2,10 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.EntrustSample;
import cn.wise.sc.cement.business.entity.SampleDistribution;
import cn.wise.sc.cement.business.model.vo.SampleCheckGroupVo;
import cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo;
import cn.wise.sc.cement.business.model.vo.SampleDistributionVo;
import cn.wise.sc.cement.business.model.vo.SampleHandleVo;
import cn.wise.sc.cement.business.model.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -31,12 +28,23 @@ public interface SampleDistributionMapper extends BaseMapper<SampleDistribution>
List<SampleDistributionTeamVo> getDistributionTeamList(@Param("sampleId") Integer sampleId,
@Param("userId") Integer userId);
List<SampleDistributionTeamVo> getDistributionTeamGroupList(@Param("sampleId") Integer sampleId,
List<SampleDistributionTeamVo> getDistributionTeamResultList(@Param("sampleId") Integer sampleId,
@Param("userId") Integer userId);
List<SampleTeamGroupUserVo> getDistributionTeamGroupList(@Param("sampleId") Integer sampleId,
@Param("userId") Integer userId);
List<SampleCheckGroupVo> getSampleCheckGroupList(@Param("sampleId") Integer sampleId);
List<EntrustSample> getEntrustSample();
List<EntrustSample> getSampleDistribution(@Param("params") Map<String, Object> param);
//查询样品流转单 导出
List<SampleFlowVo> getSampleFlowList(Integer entrustId);
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleDistributionReturn;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-02-04
*/
public interface SampleDistributionReturnMapper extends BaseMapper<SampleDistributionReturn> {
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleHandleReturn;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-02-03
*/
public interface SampleHandleReturnMapper extends BaseMapper<SampleHandleReturn> {
}
......@@ -69,6 +69,11 @@ public interface SampleMapper extends BaseMapper<Sample> {
*/
List<SampleWord> exportWordList(@Param("params") Map<String, Object> params);
//获取该样品的其他平行样样品
@Select("select * from sample where entrust_id = #{entrustId} and cement_code= #{cementCode} and id !=#{sampleId} ")
List<Sample> getOtherSampleList(@Param("entrustId") Integer entrustId, @Param("cementCode") String cementCode,
@Param("sampleId") Integer sampleId);
......
......@@ -2,8 +2,12 @@ package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Standard;
import cn.wise.sc.cement.business.entity.StandardGroupDto;
import cn.wise.sc.cement.business.model.vo.EquipmentVo;
import cn.wise.sc.cement.business.model.vo.StandardValueVo;
import cn.wise.sc.cement.business.model.vo.StandardVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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;
......@@ -19,6 +23,9 @@ import java.util.Map;
*/
public interface StandardMapper extends BaseMapper<Standard> {
IPage<StandardVo> getPage(@Param("page") Page page, @Param("params") Map<String, Object> params);
List<StandardValueVo> getStandardDetaulList();
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
......
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.TeamGroup;
import cn.wise.sc.cement.business.model.vo.SummaryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* <p>
......@@ -13,4 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface TeamGroupMapper extends BaseMapper<TeamGroup> {
@Select("select id, name from team_group")
List<SummaryVo> fetchList();
}
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Team;
import cn.wise.sc.cement.business.model.vo.SummaryListVo;
import cn.wise.sc.cement.business.model.vo.SummaryVo;
import cn.wise.sc.cement.business.model.vo.TeamListVo;
import cn.wise.sc.cement.business.model.vo.TeamVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......@@ -25,6 +27,8 @@ public interface TeamMapper extends BaseMapper<Team> {
List<TeamListVo> getList();
List<String> getNameList();
TeamVo getDetail(Integer id);
List<Map<String, Object>> exportList(@Param("params") Map<String, Object> params);
......@@ -33,6 +37,16 @@ public interface TeamMapper extends BaseMapper<Team> {
List<Map<String,String>> getListByGroup(Integer groupId);
List<Integer> getSortByGroup(Integer groupId);
List<SummaryVo> getSummaryList();
SummaryListVo getSummaryList2();
......
package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.Titration;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2021-03-04
*/
public interface TitrationMapper extends BaseMapper<Titration> {
}
......@@ -28,10 +28,10 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 单位名称,
t.principal as 联系人,
t.principal_phone as 联系电话,
t.region as 所在地区,
IF(ISNULL(t.name),'',t.name) as 单位名称,
IF(ISNULL(t.principal),'',t.principal) as 联系人,
IF(ISNULL(t.principal_phone),'',t.principal_phone) as 联系电话,
IF(ISNULL(t.region),'',t.region) as 所在地区,
(select count(*) from project p where p.client_id = t.id) as 项目数,
(
CASE t.status
......
......@@ -8,21 +8,32 @@
and t.name like concat('%', #{params.name}, '%')
</if>
<if test="params.supplierName != null and params.supplierName != ''">
and t.supplier_name = #{params.supplierName}
and s.name = #{params.supplierName}
</if>
</where>
</sql>
<select id="getPage" resultType="cn.wise.sc.cement.business.entity.Consumables">
SELECT t.*, s.name as supplierName
FROM consumables t
left join supplier s on s.id = t.supplier_id
<include refid="where"/>
ORDER BY t.id DESC
</select>
<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.stock_num as 库存数量
FROM consumables t ,(select @i:=0)t
IF(ISNULL(t.name),'',t.name) as 易耗品名称,
IF(ISNULL(t.code),'',t.code) as '易耗品代号',
IF(ISNULL(s.name),'',s.name) as 供应商,
IF(ISNULL(t.position),'',t.position) as 位置,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as 购买日期,
IF(ISNULL(t.stock_num),'',t.stock_num) as 库存数量
FROM consumables t
left join supplier s on s.id = t.supplier_id
,(select @i:=0)t
<include refid="where"/>
ORDER BY t.id DESC
</select>
......
<?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.EntrustLogsMapper">
</mapper>
......@@ -13,30 +13,47 @@
<if test="params.name != null and params.name != ''">
and t.name like concat('%', #{params.name}, '%')
</if>
<if test="params.type != null">
and t.type = #{params.type}
</if>
</where>
</sql>
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.EquipmentVo">
SELECT t.*, s.name as supplierName
SELECT t.*, s.name as supplierName, et.name as typeName
FROM equipment t
left join supplier s on s.id = t.supplier_id
left join equipment_type et on et.id = t.type
<include refid="where"/>
ORDER BY t.id DESC
</select>
<select id="getEQList" resultType="cn.wise.sc.cement.business.model.vo.EquipmentVo">
SELECT t.*, s.name as supplierName, et.name as typeName
FROM equipment t
left join supplier s on s.id = t.supplier_id
left join equipment_type et on et.id = t.type
where t.status = 1
ORDER BY t.id DESC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 设备名称,
t.code as 设备编号,
t.brand as 设备品牌,
t.model as '规格/型号',
s.name as 供应商,
t.position as 位置,
t.purchase_date as 购买日期
IF(ISNULL(t.name),'',t.name) as 设备名称,
IF(ISNULL(t.code),'',t.code) as 设备编号,
IF(ISNULL(et.name),'',et.name) as 设备分类,
IF(ISNULL(t.brand),'',t.brand) as 设备品牌,
IF(ISNULL(t.model),'',t.model) as '规格/型号',
IF(ISNULL(s.name),'',s.name) as 供应商,
IF(ISNULL(t.position),'',t.position) as 位置,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as 购买日期
FROM equipment t
left join supplier s on s.id = t.supplier_id
left join equipment_type et on et.id = t.type
,(select @i:=0)t
<include refid="where"/>
</select>
......@@ -44,9 +61,9 @@
<select id="exportTestList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 设备名称,
t.code as 设备编号,
t.model as '规格/型号',
IF(ISNULL(t.name),'',t.name) as 设备名称,
IF(ISNULL(t.code),'',t.code) as 设备编号,
IF(ISNULL(t.model),'',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 校检日期 ,
......@@ -59,9 +76,10 @@
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.EquipmentVo">
SELECT t.*, s.name as supplierName
SELECT t.*, s.name as supplierName, et.name as typeName
FROM equipment t
left join supplier s on s.id = t.supplier_id
left join equipment_type et on et.id = t.type
where t.id = #{id}
</select>
......
......@@ -31,9 +31,9 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(e.name),'',e.name) as 设备名称,
IF(ISNULL(e.code),'',e.code) as 设备编号,
IF(ISNULL(e.model),'',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 报废原因,
......
......@@ -22,9 +22,9 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(e.name),'',e.name) as 设备名称,
IF(ISNULL(e.code),'',e.code) as 设备编号,
IF(ISNULL(e.model),'',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 故障描述,
......
<?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.EquipmentTypeMapper">
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.EquipmentTypeVo">
select et.*,
(select count(*) from equipment e
where e.type = et.id
) as members
from equipment_type et
</select>
<select id="getEqTypeList" resultType="cn.wise.sc.cement.business.model.vo.EquipmentTypeVo">
select et.*,
(select count(*) from equipment e
where e.type = et.id
) as members
from equipment_type et
where et.status = 1
</select>
</mapper>
......@@ -31,9 +31,9 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
e.name as 设备名称,
e.code as 设备编号,
e.model as '规格/型号',
IF(ISNULL(e.name),'',e.name) as 设备名称,
IF(ISNULL(e.code),'',e.code) as 设备编号,
IF(ISNULL(e.model),'',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 参与项目,
......
......@@ -15,11 +15,11 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 检测依据名,
t.standard as 标准号,
t.number as 检测依据编号,
t.do_date as 实施日期,
t.up_date as 更新日期
IF(ISNULL(t.name),'',t.name) as 检测依据名,
IF(ISNULL(t.standard),'',t.standard) as 标准号,
IF(ISNULL(t.number),'',t.number) as 检测依据编号,
IF(ISNULL(t.do_date),'',t.do_date) as 实施日期,
IF(ISNULL(t.up_date),'',t.up_date) as 更新日期
FROM method t ,(select @i:=0)t
<include refid="where"/>
ORDER BY t.id DESC
......
......@@ -42,22 +42,20 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
na.id as 序号,
su.name as 姓名,
su.username as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工日,
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(na.statistical),'',na.statistical) as 起止时间,
IF(ISNULL(na.reported_hours),'',na.reported_hours) as 上报工日,
(
CASE na.status
WHEN 0 THEN '未申请'
WHEN 1 THEN '待审批'
WHEN 2 THEN '已通过'
WHEN 3 THEN '未通过'
ELSE NULL
ELSE ''
END
)as 状态,
na.work_type as 工作类别,
na.work_description as 工作描述
)as 状态
FROM nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
<include refid="where"/>
......
......@@ -4,6 +4,7 @@
<sql id="where">
<where>
na.`status` != 0
<if test="params.name != null and params.name != ''">
and su.name like concat('%', #{params.name}, '%')
</if>
......@@ -24,7 +25,6 @@
from nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
<include refid="where"/>
<where> na.`status` != 0</where>
order by na.start_time desc
</select>
......@@ -45,12 +45,13 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
na.id as 序号,
su.name as 姓名,
su.username as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工日,
na.approval_hours as 审批工日,
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(su.name),'',su.name) as 姓名,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(na.statistical),'',na.statistical) as 统计日期,
IF(ISNULL(na.reported_hours),'',na.reported_hours) as 上报工日,
IF(ISNULL(na.approval_hours),'',na.approval_hours) as 审批工日,
IF(ISNULL(na.final_value),'',na.final_value) as 最终产值,
(
CASE na.status
WHEN 0 THEN '未提交'
......@@ -58,9 +59,7 @@
WHEN 3 THEN '未通过'
ELSE '已通过'
END
)as 状态,
na.final_value as 最终产值,
na.final_rejection as 驳回意见
)as 状态
FROM nonstandard_apply na
left join sys_user su on na.user_id = su.id
<include refid="where"/>
......
......@@ -51,17 +51,17 @@
<!-- </select>-->
<select id="exportList" resultType="java.util.HashMap">
SELECT
na.id as 序号,
su.name as 姓名,
su.username as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工日,
na.approval_hours as 审批工日,
na.final_value as 最终产值,
na.work_type as 工作类别,
na.work_description as 工作描述,
su.group_id as 部门id,
sg.name as 部门名
IF(ISNULL(na.id),'',na.id) as 序号,
IF(ISNULL(su.name),'',su.name) su.name as 姓名,
IF(ISNULL(su.username),'',su.username) as 账户,
IF(ISNULL(na.statistical),'',na.statistical) as 起止日期,
IF(ISNULL(na.reported_hours),'',na.reported_hours) as 上报工日,
IF(ISNULL(na.approval_hours),'',na.approval_hours) as 审批工日,
IF(ISNULL(na.final_value),'',na.final_value) as 最终产值,
IF(ISNULL(na.work_type),'',na.work_type) as 工作类别,
IF(ISNULL(na.work_description),'',na.work_description) as 工作描述,
IF(ISNULL(su.group_id),'',su.group_id) as 部门id,
IF(ISNULL(sg.name),'',sg.name) as 部门名
FROM nonstandard_apply na
left join sys_user su on na.user_id = su.id
LEFT JOIN sys_group sg ON sg.id = su.group_id
......
......@@ -26,14 +26,14 @@
<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 采购人
IF(ISNULL(t.name),'',t.name) as 产品名称,
IF(ISNULL(t.model),'',t.model) as '规格/型号',
IF(ISNULL(t.technical_index),'',t.technical_index) as 技术指标,
IF(ISNULL(t.unit_price),'',t.unit_price) as 单价(万元),
IF(ISNULL(t.production_unit),'',t.production_unit) as 生产单位,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as 采购数量,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as 购买日期,
IF(ISNULL(su.name),'',su.name) as 采购人
FROM plan_consumables_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
......@@ -68,7 +68,15 @@
</sql>
<select id="exportWordList" resultType="cn.wise.sc.cement.business.model.vo.PlanConsumablesPurchaseVo">
SELECT t.*, su.name as purchaserName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.technical_index),'',t.technical_index) as technicalIndex,
IF(ISNULL(t.production_unit),'',t.production_unit) as productionUnit,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as purchaseNum,
IF(ISNULL(t.unit_price),'',t.unit_price) as unitPrice,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as purchaseDate,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_consumables_purchase t
left join sys_user su on su.id = t.purchaser_id
<include refid="whereNew"/>
......
......@@ -24,13 +24,13 @@
<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 完成情况
IF(ISNULL(t.name),'',t.name) as 产品名称,
IF(ISNULL(t.model),'',t.model) as '规格/型号',
IF(ISNULL(t.code),'',t.code) as 编号,
IF(ISNULL(t.maintain_date),'',t.maintain_date) as 维护日期,
IF(ISNULL(t.maintain_content),'',t.maintain_content) as 维护内容,
IF(ISNULL(su.name),'',su.name) as 执行人,
IF(ISNULL(t.maintain_result),'',t.maintain_result) as 完成情况
FROM plan_equipment_maintain t
left join sys_user su on su.id = t.maintainer_id
,(select @i:=0)t
......@@ -62,7 +62,15 @@
</sql>
<select id="exportWordList" resultType="cn.wise.sc.cement.business.model.vo.PlanEquipmentMaintainVo">
SELECT t.*, su.name as maintainerName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.code),'',t.code) as code,
IF(ISNULL(t.maintain_date),'',t.maintain_date) as maintainDate,
IF(ISNULL(t.maintain_content),'',t.maintain_content) as maintainContent,
IF(ISNULL(su.name),'',su.name) as maintainerName,
IF(ISNULL(t.maintain_result),'',t.maintain_result) as maintainResult,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_equipment_maintain t
left join sys_user su on su.id = t.maintainer_id
<include refid="whereNew"/>
......
......@@ -26,14 +26,14 @@
<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 采购人
IF(ISNULL(t.name),'',t.name) as 产品名称,
IF(ISNULL(t.model),'',t.model) as '规格/型号',
IF(ISNULL(t.technical_index),'',t.technical_index) as 技术指标,
IF(ISNULL(t.unit_price),'',t.unit_price) as 单价(万元),
IF(ISNULL(t.production_unit),'',t.production_unit) as 生产单位,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as 采购数量,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as 购买日期,
IF(ISNULL(su.name),'',su.name) as 采购人
FROM plan_equipment_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
......@@ -68,7 +68,16 @@
</sql>
<select id="exportWordList" resultType="cn.wise.sc.cement.business.model.vo.PlanEquipmentPurchaseVo">
SELECT t.*, su.name as purchaserName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.technical_index),'',t.technical_index) as technicalIndex,
IF(ISNULL(t.unit_price),'',t.unit_price) as unitPrice,
IF(ISNULL(t.production_unit),'',t.production_unit) as productionUnit,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as purchaseNum,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as purchaseDateStr,
IF(ISNULL(su.name),'',su.name) as purchaserName,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_equipment_purchase t
left join sys_user su on su.id = t.purchaser_id
<include refid="whereNew"/>
......
......@@ -24,13 +24,13 @@
<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 执行人
IF(ISNULL(t.name),'',t.name) as 产品名称,
IF(ISNULL(t.model),'',t.model) as '规格/型号',
IF(ISNULL(t.technical_index),'',t.technical_index) as 技术指标,
IF(ISNULL(t.unit_price),'',t.unit_price) as 单价(万元),
IF(ISNULL(t.production_unit),'',t.production_unit) as 生产单位,
IF(ISNULL(t.repair_date),'',t.repair_date) as 维修日期,
IF(ISNULL(su.name),'',su.name) as 执行人
FROM plan_equipment_repair t
left join sys_user su on su.id = t.repairer_id
,(select @i:=0)t
......@@ -55,7 +55,15 @@
</sql>
<select id="exportWordList" resultType="cn.wise.sc.cement.business.model.vo.PlanEquipmentRepairVo">
SELECT t.*, su.name as repairerName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.model),'',t.model) as model,
IF(ISNULL(t.technical_index),'',t.technical_index) as technicalIndex,
IF(ISNULL(t.unit_price),'',t.unit_price) as unitPrice,
IF(ISNULL(t.production_unit),'',t.production_unit) as productionUnit,
IF(ISNULL(t.repair_date),'',t.repair_date) as repairDate,
IF(ISNULL(su.name),'',su.name) as repairerName,
IF(ISNULL(t.implementation),'',t.implementation) as implementation
FROM plan_equipment_repair t
left join sys_user su on su.id = t.repairer_id
<include refid="whereNew"/>
......
......@@ -27,11 +27,11 @@
<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 采购人
IF(ISNULL(t.name),'',t.name) as 标物名称,
IF(ISNULL(t.distribution_unit),'',t.distribution_unit) as 经销单位,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as 采购数量,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as 采购时间,
IF(ISNULL(su.name),'',su.name) as 采购人
FROM plan_standard_purchase t
left join sys_user su on su.id = t.purchaser_id
,(select @i:=0)t
......@@ -65,7 +65,14 @@
</where>
</sql>
<select id="wordList" resultType="cn.wise.sc.cement.business.model.vo.PlanStandardPurchaseVo">
SELECT t.*, su.name as purchaserName
SELECT
IF(ISNULL(t.name),'',t.name) as name,
IF(ISNULL(t.code),'',t.code) as code,
IF(ISNULL(t.distribution_unit),'',t.distribution_unit) as distributionUnit,
IF(ISNULL(t.purchase_num),'',t.purchase_num) as purchaseNum,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as createTimeStr,
IF(ISNULL(su.name),'',su.name) as purchaserName,
IF(ISNULL(t.remark),'',t.remark) as remark
FROM plan_standard_purchase t
left join sys_user su on su.id = t.purchaser_id
<include refid="whereNew"/>
......
......@@ -45,15 +45,15 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
pt.id as 序号,
pt.plan_object as 培训对象,
pt.objective as 培训目的,
pt.content as 培训内容,
pt.start_time as 培训时间,
pt.mode as 培训方式,
pt.people as 培训人,
pt.assessment as 考核人,
pt.implementation as 实施情况
IF(ISNULL(pt.id.name),'',pt.id) as 序号,
IF(ISNULL(pt.plan_object),'',pt.plan_object) as 培训对象,
IF(ISNULL(pt.objective),'',pt.objective) as 培训目的,
IF(ISNULL(pt.content),'',pt.content) as 培训内容,
IF(ISNULL(pt.start_time),'',pt.start_time) as 培训时间,
IF(ISNULL(pt.mode),'',pt.mode) as 培训方式,
IF(ISNULL(pt.people),'',pt.people) as 培训人,
IF(ISNULL(pt.assessment),'',pt.assessment) as 考核人,
IF(ISNULL(pt.implementation),'',pt.implementation) as 实施情况
from plan_training pt
<include refid="where"/>
ORDER BY pt.id ASC
......
......@@ -56,9 +56,9 @@
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 项目名称,
t.code as 项目编号,
cl.name as 所属单位
IF(ISNULL(t.name),'',t.name) as 项目名称,
IF(ISNULL(t.code),'',t.code) as 项目编号,
IF(ISNULL(cl.name),'',cl.name) as 所属单位
FROM project t
left join client cl on cl.id = t.client_id
,(select @i:=0)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.SampleDistributionCheckMapper">
</mapper>
<?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.SampleDistributionCheckinputMapper">
</mapper>
<?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.SampleDistributionEnclosureMapper">
<select id="getList" resultType="cn.wise.sc.cement.business.model.vo.SampleDistributionEnclosureVo">
select t.*,
su.name as userName,
(
CASE t.status
WHEN 0 THEN '未上传'
WHEN 1 THEN '成功'
WHEN 2 THEN '上传失败'
ELSE ''
END
) as statusValue
from sample_distribution_enclosure t
left join sys_user su on su.id = t.user_id
where t.sample_distribution_id = #{params.sampleDistributionId}
<if test="params.userId != null">
and t.user_id = #{params.userId}
</if>
<if test="params.isPublic != null">
and t.is_public = #{params.isPublic}
</if>
order by t.id ASC
</select>
</mapper>
<?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.SampleDistributionEquipmentMapper">
<select id="getEqupmentList" resultType="cn.wise.sc.cement.business.model.vo.SampleDistributionEquipmentVo">
select t.*, e.code as code
from sample_distribution_equipment t
left join equipment e on e.id = t.equipment_id
where t.distribution_id = #{distributionId}
and t.user_id = #{userId}
</select>
</mapper>
......@@ -54,13 +54,41 @@
<select id="getDistributionTeamList" resultType="cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo">
select t.id as distributionId, su.id as userId, su.name as userName,
t.team_group_id as teamGroupId, tg.name as teamGroupName, s.id as teamId, s.name as teamName,
t.enclosure_url as enclosureUrl, t.alias as alias, t.ext_name as extName,
t.status as status,
(
CASE t.status
WHEN 0 THEN '未接受'
WHEN 1 THEN '已接受'
WHEN 2 THEN '已完成'
WHEN 1 THEN '接受'
WHEN 2 THEN '待校核'
WHEN 3 THEN '退回'
WHEN 4 THEN '校核通过'
WHEN 5 THEN '校核退回'
ELSE ''
END
) as statusValue
from sample_distribution t
left join sys_user su on su.id = t.user_id
left join team s on s.id = t.team_id
left join team_group tg on tg.id = t.team_group_id
where t.sample_id = #{sampleId} and s.is_pf != 0
<if test="userId != null">
and t.user_id = #{userId}
</if>
order by t.id asc
</select>
<select id="getDistributionTeamResultList" resultType="cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo">
select t.id as distributionId, su.id as userId, su.name as userName,
t.team_group_id as teamGroupId, tg.name as teamGroupName, s.id as teamId, s.name as teamName,
t.status as status,
(
CASE t.status
WHEN 0 THEN '未接受'
WHEN 1 THEN '接受'
WHEN 2 THEN '待校核'
WHEN 3 THEN '退回'
WHEN 4 THEN '校核通过'
WHEN 5 THEN '校核退回'
ELSE ''
END
) as statusValue
......@@ -75,7 +103,11 @@
order by t.id asc
</select>
<select id="getDistributionTeamGroupList" resultType="cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo">
<select id="getDistributionTeamGroupList" resultType="cn.wise.sc.cement.business.model.vo.SampleTeamGroupUserVo">
select su.id as userId,
t.team_group_id as teamGroupId
from sample_distribution t
......@@ -125,4 +157,17 @@
<include refid="sampleDisWhere"/>
</select>
<select id="getSampleFlowList" resultType="cn.wise.sc.cement.business.model.vo.SampleFlowVo">
select
sd.entrust_id as entrustId, e.project_name as projectName, e.project_code as projectCode,
sd.sample_id as sampleId, s.name as sampleName, s.sample_form as sampleForm, s.parallel_code as parallelCode,
sd.user_id as userId, su.name as userName,
DATE(sd.create_time) as createDate
from sample_distribution sd
left join entrust e on e.id = sd.entrust_id
left join sys_user su on su.id = sd.user_id
left join sample s on s.id = sd.sample_id
where sd.entrust_id = #{entrustId}
group by sd.sample_id,sd.user_id
</select>
</mapper>
<?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.SampleDistributionReturnMapper">
</mapper>
......@@ -53,6 +53,7 @@
WHEN 0 THEN '未接受'
WHEN 1 THEN '已接受'
WHEN 2 THEN '已完成'
WHEN 3 THEN '退回'
ELSE ''
END
) as statusValue
......@@ -77,6 +78,7 @@
WHEN 0 THEN '未接受'
WHEN 1 THEN '已接受'
WHEN 2 THEN '已完成'
WHEN 3 THEN '退回'
ELSE ''
END
) as statusValue
......@@ -100,7 +102,7 @@
</select>
<select id="getEntrustSampleOptimize" resultType="cn.wise.sc.cement.business.entity.EntrustSample">
SELECT project_name,entrust_code,h.id,s.entrust_id,h.user_id,s.id as sample_id,e.status,h.content,h.finish_time
SELECT project_name,entrust_code,h.id,s.entrust_id,h.user_id,s.id as sample_id,e.status,h.handle_id,h.finish_time
FROM entrust e
LEFT JOIN
(SELECT * FROM sample) s
......
<?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.SampleHandleReturnMapper">
</mapper>
......@@ -96,16 +96,16 @@
<select id="exportWordList" resultType="cn.wise.sc.cement.business.model.SampleWord">
SELECT
e.project_name AS project_name,
e.entrust_code,
s.name,
s.cement_code,
s.weight,
s.original_position,
date_format(s.create_time, '%Y/%m/%d') as create_time,
s.remark,
date_format(s.destruction_time, '%Y/%m/%d') as destruction_time,
su.name AS user_name
IF(ISNULL(e.project_name),'',e.project_name) AS projectName,
IF(ISNULL(e.entrust_code),'',e.entrust_code) AS entrustCode,
IF(ISNULL(s.name),'',s.name) AS name,
IF(ISNULL(s.cement_code),'',s.cement_code) AS cementCode,
IF(ISNULL(s.weight),'',s.weight) AS weight,
IF(ISNULL(s.original_position),'',s.original_position) AS originalPosition,
IF(ISNULL(s.create_time),'',date_format(s.create_time, '%Y/%m/%d')) AS createTime,
IF(ISNULL(s.remark),'',s.remark) AS remark,
IF(ISNULL(s.destruction_time),'',date_format(s.destruction_time, '%Y/%m/%d')) AS destructionTime,
IF(ISNULL(su.name),'',su.name) AS userName
FROM
sample s
LEFT JOIN entrust e ON s.entrust_id = e.id
......
......@@ -14,7 +14,7 @@
<sql id="where">
<where>
<if test="params.supplierName != null and params.supplierName != ''">
and t.supplier_name = #{params.supplierName}
and s.name = #{params.supplierName}
</if>
<if test="params.name != null and params.name != ''">
and t.name like concat('%', #{params.name}, '%')
......@@ -22,16 +22,26 @@
</where>
</sql>
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.StandardVo">
SELECT t.*, s.name as supplierName
FROM standard t
left join supplier s on s.id = t.supplier_id
<include refid="where"/>
ORDER BY t.id DESC
</select>
<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 剩余库存,
IF(ISNULL(t.name),'',t.name) as 标样名称,
IF(ISNULL(t.code),'',t.code) as 标物代号,
IF(ISNULL(s.name),'',s.name) as 经销单位,
IF(ISNULL(t.position),'',t.position) as 存放位置,
IF(ISNULL(t.purchase_date),'',t.purchase_date) as 进样日期,
IF(ISNULL(t.valid_date),'',t.valid_date) as 有效日期,
IF(ISNULL(t.stock_num),'',t.stock_num) as 剩余库存,
(
CASE t.status
WHEN 0 THEN '已作废'
......@@ -39,7 +49,9 @@
ELSE NULL
END
) as 状态
FROM standard t ,(select @i:=0)t
FROM standard t
left join supplier s on s.id = t.supplier_id
,(select @i:=0)t
<include refid="where"/>
ORDER BY t.id DESC
</select>
......
......@@ -26,22 +26,20 @@
WHEN 1 THEN '资质内'
ELSE ''
END
) as qualificationsValue,
h.name as handleName
) as qualificationsValue
FROM team t
left join team_group tg on tg.id = t.group_id
left join handle h on h.id = t.handle_id
<include refid="where"/>
ORDER BY t.create_time desc
ORDER BY t.group_id, t.id ASC
</select>
<select id="exportList" resultType="java.util.HashMap">
SELECT
(@i:=@i+1) as 序号,
t.name as 检测项目,
IF(ISNULL(t.name),'',t.name ) as 检测项目,
IF(ISNULL(tg.name ),'',tg.name ) 所在检测组,
t.method_name as 检测依据,
t.charge as 收费标准,
IF(ISNULL(t.method_name),'',t.method_name) as 检测依据,
IF(ISNULL(t.charge),'',t.charge) as 收费标准,
(
CASE t.qualifications
WHEN 0 THEN '资质外'
......@@ -60,9 +58,17 @@
t.method_name as methodName, t.number as number
FROM team t
where t.status=1 and t.is_display = 1
ORDER BY t.id ASC
ORDER BY t.group_id, t.id ASC
</select>
<select id="getNameList" resultType="java.lang.String">
SELECT t.name as name
FROM team t
where t.status=1 and t.is_display = 1
ORDER BY t.group_id, t.id ASC
</select>
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.TeamVo">
SELECT t.*, tg.name as groupName,
......@@ -72,11 +78,9 @@
WHEN 1 THEN '资质范围内'
ELSE ''
END
) as qualificationsValue,
h.name as handleName
) as qualificationsValue
FROM team t
left join team_group tg on tg.id = t.group_id
left join handle h on h.id = t.handle_id
where t.id = #{id}
</select>
......@@ -96,4 +100,41 @@
WHERE t.group_id = #{groupId} and t.status = 1
</select>
<select id="getSortByGroup" resultType="java.lang.Integer">
SELECT t.sort_no
FROM team t
WHERE t.group_id = #{groupId} and t.sort_no is not null
order by t.sort_no asc
</select>
<select id="getSummaryList" resultType="cn.wise.sc.cement.business.model.vo.SummaryVo">
select g.id as id, g.name as name,1 as flag from team_group g
UNION
select h.id as id, h.name as name,2 as flag from handle h
UNION
select m.id as id, m.name as name,3 as flag from method m
</select>
<!--MyBatis中的collection使用方法-->
<resultMap id="BaseResultMap" type="cn.wise.sc.cement.business.model.vo.SummaryListVo" >
<collection property="teamGroupList" javaType="java.util.ArrayList" ofType="cn.wise.sc.cement.business.entity.TeamGroup"
select="cn.wise.sc.cement.business.mapper.TeamGroupMapper.fetchList" column="{id=id ,name=name}" />
<collection property="handleList" javaType="java.util.ArrayList" ofType="cn.wise.sc.cement.business.entity.Handle"
select="cn.wise.sc.cement.business.mapper.HandleMapper.fetchList" column="{id=id ,name=name}" />
<collection property="methodList" javaType="java.util.ArrayList" ofType="cn.wise.sc.cement.business.entity.Method"
select="cn.wise.sc.cement.business.mapper.MethodMapper.fetchList" column="{id=id ,name=name}" />
</resultMap>
<select id="getSummaryList2" resultMap="BaseResultMap">
select 0 as id, '0' as name from dual;
</select>
</mapper>
<?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.TitrationMapper">
</mapper>
......@@ -92,4 +92,18 @@ public class BaseResponse<T> {
return baseResponse;
}
/**
* 401,用户未登录
*
* @param msg 提示信息
* @param <T> 响应数据类型
* @return BaseResponse
*/
public static <T> BaseResponse<T> noLogin(String msg) {
BaseResponse<T> baseResponse = new BaseResponse<>();
baseResponse.setMsg(msg);
baseResponse.setCode(BusinessExceptionEnum.NO_LOGIN.getCode());
baseResponse.setData(null);
return baseResponse;
}
}
......@@ -24,5 +24,5 @@ public class PageQuery implements Serializable {
@ApiModelProperty(value = "每页显示数量")
@NonNull
private Integer pageSize = 10;
private Integer pageSize = 20;
}
......@@ -30,7 +30,10 @@ public class ApprovalQuery {
@ApiModelProperty("是否同意 1同意,2拒绝")
private Integer isAgree;
@ApiModelProperty("审批意见")
@ApiModelProperty("审批意见/驳回原因")
private String auditReason;
@ApiModelProperty("项目id")
private Integer projectId;
}
......@@ -25,7 +25,7 @@ public class ChangeStockQuery {
* 新增数量 / 领用数量
*/
@ApiModelProperty("入库数量(单位 瓶)")
private Integer enterNum;
private BigDecimal enterNum;
@ApiModelProperty("领用数量(单位 g)")
private BigDecimal outNum;
......
package cn.wise.sc.cement.business.model.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Map;
/**
* @description:
* @author: ztw
* @create: 2021-02-06
**/
@Data
@ApiModel("数据校核-校核计算结果")
public class CheckCountDistributionNewQuery {
@ApiModelProperty("样品检测表id")
private Integer distributionId;
@ApiModelProperty("检测结果")
private String distributionResult;
@ApiModelProperty("检测误差")
private String distributionError;
@ApiModelProperty("最终结果")
private String lastResult;
}
package cn.wise.sc.cement.business.model.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @description:
* @author: ztw
* @create: 2020-02-07
**/
@Data
@ApiModel("数据校核-快速计算接口")
public class CheckCountFastQuery {
@ApiModelProperty("检测人id")
private Integer userId;
@ApiModelProperty("检测组表id")
private Integer teamGroupId;
@ApiModelProperty("输入信息集合")
private Map<String, String> intputResult;
}
package cn.wise.sc.cement.business.model.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @description:
* @author: ztw
* @create: 2021-02-06
**/
@Data
@ApiModel("数据校核-校核请求(最新需求:通过,退回)")
public class CheckCountNewQuery {
@ApiModelProperty("委托表id")
private Integer entrustId;
@ApiModelProperty("样品表id")
private Integer smapleId;
@ApiModelProperty("检测组表id")
private Integer teamGroupId;
@ApiModelProperty("检测人员id")
private Integer userId;
@ApiModelProperty("是否通过 0保存,1通过,2退回")
private Integer isAgree;
@ApiModelProperty("退回原因")
private String auditReason;
@ApiModelProperty("输入信息集合")
private Map<String, String> intputResult;
@ApiModelProperty("计算结果信息列表")
List<CheckCountDistributionNewQuery> checkCountDistributionNewQueryList;
}
package cn.wise.sc.cement.business.model.query;
import cn.wise.sc.cement.business.model.PageQuery;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.Period;
......@@ -13,10 +14,18 @@ import java.util.List;
**/
@Data
public class CountItemDistributionQuery {
@ApiModelProperty("检测元素(单选)")
private Long itemId;
@ApiModelProperty("地区(多选)")
private List<String> origins;
@ApiModelProperty("开始日期 2021-02-22")
private String startTime;
@ApiModelProperty("结束日期 2021-02-22")
private String endTime;
private String type;
@ApiModelProperty("分页参数")
private PageQuery pageQuery;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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