Merge remote-tracking branch 'lis8.0/master'
This commit is contained in:
commit
50ba22173e
@ -0,0 +1,33 @@
|
|||||||
|
package com.czlis.common.core.domain.entity.lis;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ComStatsParameter {
|
||||||
|
|
||||||
|
private Long paramId;
|
||||||
|
private String statsCode;
|
||||||
|
private String paramType;
|
||||||
|
private String paramCode;
|
||||||
|
private String paramName;
|
||||||
|
private String paramOptiontype;
|
||||||
|
private String paramDefvalue;
|
||||||
|
private String paramSql;
|
||||||
|
private String paramHide;
|
||||||
|
private String precondition;
|
||||||
|
private Long paramSequence;
|
||||||
|
private Long paramSort;
|
||||||
|
private String status;
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateBy;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.czlis.common.core.domain.entity.lis;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ComStatsTemplate {
|
||||||
|
|
||||||
|
private Long statsId;
|
||||||
|
private String statsType;
|
||||||
|
private String statsCode;
|
||||||
|
private String statsName;
|
||||||
|
private String statsTitle;
|
||||||
|
private String statsSql;
|
||||||
|
private String statsGraph;
|
||||||
|
private Long statsSort;
|
||||||
|
private String status;
|
||||||
|
private String createBy;
|
||||||
|
private Date createTime;
|
||||||
|
private String updateBy;
|
||||||
|
private Date updateTime;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -29,4 +29,9 @@ public class QcGraphController extends BaseController {
|
|||||||
public Result query(QcGraphParamDTO qcGraphParamDTO) {
|
public Result query(QcGraphParamDTO qcGraphParamDTO) {
|
||||||
return qcGraphService.query(qcGraphParamDTO);
|
return qcGraphService.query(qcGraphParamDTO);
|
||||||
}
|
}
|
||||||
|
@ApiOperation("计算靶值")
|
||||||
|
@GetMapping("/calc")
|
||||||
|
public Result calc(QcGraphParamDTO qcGraphParamDTO) {
|
||||||
|
return qcGraphService.calc(qcGraphParamDTO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,109 @@
|
|||||||
|
package com.czlis.liswork.controller.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.annotation.Log;
|
||||||
|
import com.czlis.common.core.controller.BaseController;
|
||||||
|
import com.czlis.common.core.domain.AjaxResult;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsParameter;
|
||||||
|
import com.czlis.common.core.page.TableDataInfo;
|
||||||
|
import com.czlis.common.enums.BusinessType;
|
||||||
|
import com.czlis.common.utils.poi.ExcelUtil;
|
||||||
|
import com.czlis.liswork.service.ComStatsParameterService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/statstemp/param")
|
||||||
|
@Api(tags = "统计模板")
|
||||||
|
@Slf4j
|
||||||
|
public class ComStatsParameterController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ComStatsParameterService comStatsParameterService;
|
||||||
|
/**
|
||||||
|
* 获取统计参数列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取统计参数列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ComStatsParameter post) {
|
||||||
|
startPage();
|
||||||
|
List<ComStatsParameter> list = comStatsParameterService.selectComStatsParameterList(post);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
@ApiOperation("统计参数导出")
|
||||||
|
@Log(title = "统计参数导出", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, ComStatsParameter post) {
|
||||||
|
List<ComStatsParameter> list = comStatsParameterService.selectComStatsParameterList(post);
|
||||||
|
ExcelUtil<ComStatsParameter> util = new ExcelUtil<>(ComStatsParameter.class);
|
||||||
|
util.exportExcel(response, list, "统计参数数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据统计参数编号获取详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取参数详细信息")
|
||||||
|
@GetMapping(value = "/{StatsId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long StatsId) {
|
||||||
|
return success(comStatsParameterService.selectComStatsParameterById(StatsId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增统计参数
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增统计参数")
|
||||||
|
@Log(title = "统计参数管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody ComStatsParameter post) {
|
||||||
|
log.info("post:{}",post);
|
||||||
|
|
||||||
|
if (!comStatsParameterService.checkParamNameUnique(post)) {
|
||||||
|
return error("新增统计参数'" + post.getParamCode() + "'失败,统计参数名称已存在");
|
||||||
|
} else if (!comStatsParameterService.checkParamCodeUnique(post)) {
|
||||||
|
return error("新增统计参数'" + post.getParamName()+ "'失败,统计参数编码已存在");
|
||||||
|
}
|
||||||
|
post.setCreateBy(getUsername());
|
||||||
|
return toAjax(comStatsParameterService.insertParam(post));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改统计参数
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改统计参数")
|
||||||
|
@Log(title = "统计参数管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody ComStatsParameter post) {
|
||||||
|
if (!comStatsParameterService.checkParamNameUnique(post)) {
|
||||||
|
return error("修改统计参数'" + post.getParamCode() + "'失败,统计参数名称已存在");
|
||||||
|
} else if (!comStatsParameterService.checkParamCodeUnique(post)) {
|
||||||
|
return error("修改统计参数'" + post.getParamCode() + "'失败,统计参数编码已存在");
|
||||||
|
}
|
||||||
|
post.setUpdateBy(getUsername());
|
||||||
|
return toAjax(comStatsParameterService.updateParam(post));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计参数
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除统计参数")
|
||||||
|
@Log(title = "统计参数管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{StatsIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] StatsIds) {
|
||||||
|
return toAjax(comStatsParameterService.deleteParamByIds(StatsIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统计参数选择框列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取统计参数选择框列表")
|
||||||
|
@GetMapping("/optionselect")
|
||||||
|
public AjaxResult optionselect() {
|
||||||
|
List<ComStatsParameter> posts = comStatsParameterService.selectComStatsParameterAll();
|
||||||
|
return success(posts);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
package com.czlis.liswork.controller.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.annotation.Log;
|
||||||
|
import com.czlis.common.core.controller.BaseController;
|
||||||
|
import com.czlis.common.core.domain.AjaxResult;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsTemplate;
|
||||||
|
import com.czlis.common.core.page.TableDataInfo;
|
||||||
|
import com.czlis.common.enums.BusinessType;
|
||||||
|
import com.czlis.common.utils.poi.ExcelUtil;
|
||||||
|
import com.czlis.liswork.service.ComStatsTemplateService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/statstemp")
|
||||||
|
@Api(tags = "统计模板")
|
||||||
|
@Slf4j
|
||||||
|
public class ComStatsTemplateController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private ComStatsTemplateService comStatsTemplateService;
|
||||||
|
/**
|
||||||
|
* 获取统计模板列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取统计模板列表")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ComStatsTemplate post) {
|
||||||
|
startPage();
|
||||||
|
List<ComStatsTemplate> list = comStatsTemplateService.selectComStatsTemplateList(post);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
@ApiOperation("统计模板导出")
|
||||||
|
@Log(title = "统计模板导出", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, ComStatsTemplate post) {
|
||||||
|
List<ComStatsTemplate> list = comStatsTemplateService.selectComStatsTemplateList(post);
|
||||||
|
ExcelUtil<ComStatsTemplate> util = new ExcelUtil<>(ComStatsTemplate.class);
|
||||||
|
util.exportExcel(response, list, "统计模板数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据统计模板编号获取详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取详细信息")
|
||||||
|
@GetMapping(value = "/{StatsId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable Long StatsId) {
|
||||||
|
return success(comStatsTemplateService.selectComStatsTemplateById(StatsId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增统计模板
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增统计模板")
|
||||||
|
@Log(title = "统计模板管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@Validated @RequestBody ComStatsTemplate post) {
|
||||||
|
log.info("post:{}",post);
|
||||||
|
|
||||||
|
if (!comStatsTemplateService.checkStatsNameUnique(post)) {
|
||||||
|
return error("新增统计模板'" + post.getStatsName() + "'失败,统计模板名称已存在");
|
||||||
|
} else if (!comStatsTemplateService.checkStatsCodeUnique(post)) {
|
||||||
|
return error("新增统计模板'" + post.getStatsName() + "'失败,统计模板编码已存在");
|
||||||
|
}
|
||||||
|
post.setCreateBy(getUsername());
|
||||||
|
return toAjax(comStatsTemplateService.insertStats(post));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改统计模板
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改统计模板")
|
||||||
|
@Log(title = "统计模板管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@Validated @RequestBody ComStatsTemplate post) {
|
||||||
|
if (!comStatsTemplateService.checkStatsNameUnique(post)) {
|
||||||
|
return error("修改统计模板'" + post.getStatsName() + "'失败,统计模板名称已存在");
|
||||||
|
} else if (!comStatsTemplateService.checkStatsCodeUnique(post)) {
|
||||||
|
return error("修改统计模板'" + post.getStatsName() + "'失败,统计模板编码已存在");
|
||||||
|
}
|
||||||
|
post.setUpdateBy(getUsername());
|
||||||
|
return toAjax(comStatsTemplateService.updateStats(post));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计模板
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除统计模板")
|
||||||
|
@Log(title = "统计模板管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{StatsIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] StatsIds) {
|
||||||
|
return toAjax(comStatsTemplateService.deleteStatsByIds(StatsIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取统计模板选择框列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取统计模板选择框列表")
|
||||||
|
@GetMapping("/optionselect")
|
||||||
|
public AjaxResult optionselect() {
|
||||||
|
List<ComStatsTemplate> posts = comStatsTemplateService.selectComStatsTemplateAll();
|
||||||
|
return success(posts);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -17,5 +17,6 @@ public interface QcGraphMapper {
|
|||||||
List<QcValDTO> query8(QcGraphParamDTO qcGraphParamDTO);
|
List<QcValDTO> query8(QcGraphParamDTO qcGraphParamDTO);
|
||||||
List<QcValDTO> query9(QcGraphParamDTO qcGraphParamDTO);
|
List<QcValDTO> query9(QcGraphParamDTO qcGraphParamDTO);
|
||||||
List<QcValDTO> query0(QcGraphParamDTO qcGraphParamDTO);
|
List<QcValDTO> query0(QcGraphParamDTO qcGraphParamDTO);
|
||||||
|
List<QcMonthstDTO> calc(QcGraphParamDTO qcGraphParamDTO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.czlis.liswork.mapper.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsParameter;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComStatsParameterMapper {
|
||||||
|
Long getCountById(Long paramId);
|
||||||
|
List<ComStatsParameter> selectComStatsParameterByType(String paramType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询统计参数数据集合
|
||||||
|
*
|
||||||
|
* @param Dict 统计参数信息
|
||||||
|
* @return 统计参数数据集合
|
||||||
|
*/
|
||||||
|
List<ComStatsParameter> selectComStatsParameterList(ComStatsParameter Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有统计参数
|
||||||
|
*
|
||||||
|
* @return 统计参数列表
|
||||||
|
*/
|
||||||
|
List<ComStatsParameter> selectComStatsParameterAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计参数ID查询统计参数信息
|
||||||
|
*
|
||||||
|
* @param paramId 统计参数ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
ComStatsParameter selectComStatsParameterById(Long paramId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计参数信息
|
||||||
|
*
|
||||||
|
* @param paramId 统计参数ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int delComStatsParameterById(Long paramId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计参数信息
|
||||||
|
*
|
||||||
|
* @param paramIds 需要删除的统计参数ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int delComStatsParameterByIds(Long[] paramIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改统计参数信息
|
||||||
|
*
|
||||||
|
* @param Dict 统计参数信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateComStatsParameter(ComStatsParameter Dict);
|
||||||
|
int updateComStatsParameterall(ComStatsParameter Dict);
|
||||||
|
/**
|
||||||
|
* 新增统计参数信息
|
||||||
|
*
|
||||||
|
* @param Dict 统计参数信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertComStatsParameter(ComStatsParameter Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计参数名称
|
||||||
|
*
|
||||||
|
* @param paramName 统计参数名称
|
||||||
|
* @param paramType 类别
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
ComStatsParameter checkDictNameUnique(@Param("paramName") String paramName, @Param("paramType") String paramType, @Param("statsCode") String statsCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计参数编码
|
||||||
|
*
|
||||||
|
* @param paramCode 统计参数编码
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
ComStatsParameter checkDictCodeUnique(@Param("paramCode") String paramCode,@Param("paramType") String paramType, @Param("statsCode") String statsCode);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.czlis.liswork.mapper.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsTemplate;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComStatsTemplateMapper {
|
||||||
|
Long getCountById(Long statsId);
|
||||||
|
List<ComStatsTemplate> selectComStatsTemplateByType(String statsType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询统计模板数据集合
|
||||||
|
*
|
||||||
|
* @param Dict 统计模板信息
|
||||||
|
* @return 统计模板数据集合
|
||||||
|
*/
|
||||||
|
List<ComStatsTemplate> selectComStatsTemplateList(ComStatsTemplate Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有统计模板
|
||||||
|
*
|
||||||
|
* @return 统计模板列表
|
||||||
|
*/
|
||||||
|
List<ComStatsTemplate> selectComStatsTemplateAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板信息
|
||||||
|
*
|
||||||
|
* @param statsId 统计模板ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
ComStatsTemplate selectComStatsTemplateById(Long statsId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param statsId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int delComStatsTemplateById(Long statsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param statsIds 需要删除的统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int delComStatsTemplateByIds(Long[] statsIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改统计模板信息
|
||||||
|
*
|
||||||
|
* @param Dict 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateComStatsTemplate(ComStatsTemplate Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增统计模板信息
|
||||||
|
*
|
||||||
|
* @param Dict 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertComStatsTemplate(ComStatsTemplate Dict);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板名称
|
||||||
|
*
|
||||||
|
* @param statsName 统计模板名称
|
||||||
|
* @param statsType 类别
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
ComStatsTemplate checkDictNameUnique(@Param("statsName") String statsName, @Param("statsType") String statsType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板编码
|
||||||
|
*
|
||||||
|
* @param statsCode 统计模板编码
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
ComStatsTemplate checkDictCodeUnique(@Param("statsCode") String statsCode,@Param("statsType") String statsType);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -7,6 +7,8 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@ -27,4 +29,6 @@ public class QcGraphParamDTO {
|
|||||||
private Integer cs;
|
private Integer cs;
|
||||||
@ApiModelProperty(value = "质控品批号")
|
@ApiModelProperty(value = "质控品批号")
|
||||||
private String zkpph;
|
private String zkpph;
|
||||||
|
|
||||||
|
private List<String> zkphList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,87 @@
|
|||||||
|
package com.czlis.liswork.service;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsParameter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComStatsParameterService {
|
||||||
|
/**
|
||||||
|
* 查询统计参数信息集合
|
||||||
|
*
|
||||||
|
* @param Param 统计参数信息
|
||||||
|
* @return 统计参数信息集合
|
||||||
|
*/
|
||||||
|
List<ComStatsParameter> selectComStatsParameterList(ComStatsParameter Param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有统计参数
|
||||||
|
*
|
||||||
|
* @return 统计参数列表
|
||||||
|
*/
|
||||||
|
List<ComStatsParameter> selectComStatsParameterAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计参数ID查询统计参数信息
|
||||||
|
*
|
||||||
|
* @param ParamId 统计参数ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
ComStatsParameter selectComStatsParameterById(Long ParamId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计参数名称是否唯一
|
||||||
|
*
|
||||||
|
* @param Param 统计参数信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean checkParamNameUnique(ComStatsParameter Param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计参数编码是否唯一
|
||||||
|
*
|
||||||
|
* @param Param 统计参数信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean checkParamCodeUnique(ComStatsParameter Param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计参数ID查询统计参数使用数量
|
||||||
|
*
|
||||||
|
* @param ParamId 统计参数ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int countUserParamById(Long ParamId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计参数信息
|
||||||
|
*
|
||||||
|
* @param ParamId 统计参数ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteParamById(Long ParamId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计参数信息
|
||||||
|
*
|
||||||
|
* @param ParamIds 需要删除的统计参数ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteParamByIds(Long[] ParamIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存统计参数信息
|
||||||
|
*
|
||||||
|
* @param Param 统计参数信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertParam(ComStatsParameter Param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存统计参数信息
|
||||||
|
*
|
||||||
|
* @param Param 统计参数信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateParam(ComStatsParameter Param);
|
||||||
|
}
|
||||||
@ -0,0 +1,87 @@
|
|||||||
|
package com.czlis.liswork.service;
|
||||||
|
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsTemplate;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ComStatsTemplateService {
|
||||||
|
/**
|
||||||
|
* 查询统计模板信息集合
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 统计模板信息集合
|
||||||
|
*/
|
||||||
|
List<ComStatsTemplate> selectComStatsTemplateList(ComStatsTemplate Stats);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有统计模板
|
||||||
|
*
|
||||||
|
* @return 统计模板列表
|
||||||
|
*/
|
||||||
|
List<ComStatsTemplate> selectComStatsTemplateAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板信息
|
||||||
|
*
|
||||||
|
* @param StatsId 统计模板ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
ComStatsTemplate selectComStatsTemplateById(Long StatsId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板名称是否唯一
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean checkStatsNameUnique(ComStatsTemplate Stats);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板编码是否唯一
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
boolean checkStatsCodeUnique(ComStatsTemplate Stats);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板使用数量
|
||||||
|
*
|
||||||
|
* @param StatsId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int countUserStatsById(Long StatsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param StatsId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteStatsById(Long StatsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param StatsIds 需要删除的统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteStatsByIds(Long[] StatsIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存统计模板信息
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertStats(ComStatsTemplate Stats);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存统计模板信息
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateStats(ComStatsTemplate Stats);
|
||||||
|
}
|
||||||
@ -6,5 +6,5 @@ import com.czlis.liswork.pojo.DTO.QcGraphParamDTO;
|
|||||||
public interface QcGraphService {
|
public interface QcGraphService {
|
||||||
Result querysample(QcGraphParamDTO qcGraphParamDTO);
|
Result querysample(QcGraphParamDTO qcGraphParamDTO);
|
||||||
Result query(QcGraphParamDTO qcGraphParamDTO);
|
Result query(QcGraphParamDTO qcGraphParamDTO);
|
||||||
Result queryhead(QcGraphParamDTO qcGraphParamDTO);
|
Result calc(QcGraphParamDTO qcGraphParamDTO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,11 @@ public class QcGraphServiceImpl implements QcGraphService {
|
|||||||
public Result query(QcGraphParamDTO qcGraphParamDTO){
|
public Result query(QcGraphParamDTO qcGraphParamDTO){
|
||||||
Integer lb=qcGraphParamDTO.getCs();
|
Integer lb=qcGraphParamDTO.getCs();
|
||||||
if(lb==null)return new Result("-1","次数类别不能为空!");
|
if(lb==null)return new Result("-1","次数类别不能为空!");
|
||||||
|
String zkph=qcGraphParamDTO.getZkph();
|
||||||
|
if(zkph!=null||"".equals(zkph)) {
|
||||||
|
List<String> zkphList = Arrays.asList(zkph.split(","));
|
||||||
|
qcGraphParamDTO.setZkphList(zkphList);
|
||||||
|
}
|
||||||
List<QcValDTO> QcValDTOList;
|
List<QcValDTO> QcValDTOList;
|
||||||
switch (lb){
|
switch (lb){
|
||||||
case 0:
|
case 0:
|
||||||
@ -61,18 +66,8 @@ public class QcGraphServiceImpl implements QcGraphService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result queryhead(QcGraphParamDTO qcGraphParamDTO){
|
public Result calc(QcGraphParamDTO qcGraphParamDTO){
|
||||||
List<QcMonthstDTO> QcSamplelist=qcGraphMapper.queryhead(qcGraphParamDTO);
|
List<QcMonthstDTO> QcSamplelist=qcGraphMapper.calc(qcGraphParamDTO);
|
||||||
List<QcMonthstDTO> QcSamplelist3=qcGraphMapper.queryhead3(qcGraphParamDTO);
|
|
||||||
for(QcMonthstDTO qcMonthstDTO:QcSamplelist){
|
|
||||||
String xmdh=qcMonthstDTO.getXmdh();
|
|
||||||
Optional<QcMonthstDTO> monthst0=QcSamplelist3.stream().filter(ss->xmdh.equals(ss.getXmdh())).findAny();
|
|
||||||
if(monthst0.isPresent()) {
|
|
||||||
qcMonthstDTO.setAvg3(monthst0.get().getAvg3());
|
|
||||||
qcMonthstDTO.setCv3(monthst0.get().getCv3());
|
|
||||||
qcMonthstDTO.setSd3(monthst0.get().getSd3());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return new Result("0","成功",QcSamplelist);
|
return new Result("0","成功",QcSamplelist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,144 @@
|
|||||||
|
package com.czlis.liswork.service.impl.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.constant.UserConstants;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsParameter;
|
||||||
|
import com.czlis.common.exception.ServiceException;
|
||||||
|
import com.czlis.common.utils.StringUtils;
|
||||||
|
import com.czlis.liswork.mapper.xtwh.ComStatsParameterMapper;
|
||||||
|
import com.czlis.liswork.service.ComStatsParameterService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ComStatsParameterServiceImpl implements ComStatsParameterService {
|
||||||
|
@Autowired
|
||||||
|
ComStatsParameterMapper comStatsParameterMapper;
|
||||||
|
/**
|
||||||
|
* 查询统计模板信息集合
|
||||||
|
*
|
||||||
|
* @param Param 统计模板信息
|
||||||
|
* @return 统计模板信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ComStatsParameter> selectComStatsParameterList(ComStatsParameter Param) {
|
||||||
|
return comStatsParameterMapper.selectComStatsParameterList(Param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有统计模板
|
||||||
|
*
|
||||||
|
* @return 统计模板列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ComStatsParameter> selectComStatsParameterAll() {
|
||||||
|
return comStatsParameterMapper.selectComStatsParameterAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板信息
|
||||||
|
*
|
||||||
|
* @param ParamId 统计模板ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ComStatsParameter selectComStatsParameterById(Long ParamId) {
|
||||||
|
return comStatsParameterMapper.selectComStatsParameterById(ParamId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板名称是否唯一
|
||||||
|
*
|
||||||
|
* @param Param 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkParamNameUnique(ComStatsParameter Param) {
|
||||||
|
Long ParamId = StringUtils.isNull(Param.getParamId()) ? -1L : Param.getParamId();
|
||||||
|
ComStatsParameter info = comStatsParameterMapper.checkDictNameUnique(Param.getParamName(),Param.getParamType(),Param.getStatsCode());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getParamId().longValue() != ParamId.longValue()) {
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板编码是否唯一
|
||||||
|
*
|
||||||
|
* @param Param 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkParamCodeUnique(ComStatsParameter Param) {
|
||||||
|
Long ParamId = StringUtils.isNull(Param.getParamId()) ? -1L : Param.getParamId();
|
||||||
|
ComStatsParameter info = comStatsParameterMapper.checkDictCodeUnique(Param.getParamCode(),Param.getParamType(),Param.getStatsCode());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getParamId().longValue() != ParamId.longValue()) {
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板使用数量
|
||||||
|
*
|
||||||
|
* @param ParamId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int countUserParamById(Long ParamId) {
|
||||||
|
return 0;//comStatsParameterMapper.countUserParamById(ParamId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param ParamId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteParamById(Long ParamId) {
|
||||||
|
return comStatsParameterMapper.delComStatsParameterById(ParamId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param ParamIds 需要删除的统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteParamByIds(Long[] ParamIds) {
|
||||||
|
for (Long ParamId : ParamIds) {
|
||||||
|
ComStatsParameter Param = selectComStatsParameterById(ParamId);
|
||||||
|
if (countUserParamById(ParamId) > 0) {
|
||||||
|
throw new ServiceException(String.format("%1$s已分配,不能删除", Param.getParamName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return comStatsParameterMapper.delComStatsParameterByIds(ParamIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存统计模板信息
|
||||||
|
*
|
||||||
|
* @param Param 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertParam(ComStatsParameter Param) {
|
||||||
|
return comStatsParameterMapper.insertComStatsParameter(Param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存统计模板信息
|
||||||
|
*
|
||||||
|
* @param Param 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateParam(ComStatsParameter Param) {
|
||||||
|
return comStatsParameterMapper.updateComStatsParameterall(Param);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,156 @@
|
|||||||
|
package com.czlis.liswork.service.impl.xtwh;
|
||||||
|
|
||||||
|
import com.czlis.common.constant.UserConstants;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsParameter;
|
||||||
|
import com.czlis.common.core.domain.entity.lis.ComStatsTemplate;
|
||||||
|
import com.czlis.common.exception.ServiceException;
|
||||||
|
import com.czlis.common.utils.StringUtils;
|
||||||
|
import com.czlis.liswork.mapper.xtwh.ComStatsParameterMapper;
|
||||||
|
import com.czlis.liswork.mapper.xtwh.ComStatsTemplateMapper;
|
||||||
|
import com.czlis.liswork.service.ComStatsTemplateService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class ComStatsTemplateServiceImpl implements ComStatsTemplateService {
|
||||||
|
@Autowired
|
||||||
|
ComStatsParameterMapper comStatsParameterMapper;
|
||||||
|
@Autowired
|
||||||
|
ComStatsTemplateMapper comStatsTemplateMapper;
|
||||||
|
/**
|
||||||
|
* 查询统计模板信息集合
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 统计模板信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ComStatsTemplate> selectComStatsTemplateList(ComStatsTemplate Stats) {
|
||||||
|
return comStatsTemplateMapper.selectComStatsTemplateList(Stats);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有统计模板
|
||||||
|
*
|
||||||
|
* @return 统计模板列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ComStatsTemplate> selectComStatsTemplateAll() {
|
||||||
|
return comStatsTemplateMapper.selectComStatsTemplateAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板信息
|
||||||
|
*
|
||||||
|
* @param StatsId 统计模板ID
|
||||||
|
* @return 角色对象信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ComStatsTemplate selectComStatsTemplateById(Long StatsId) {
|
||||||
|
return comStatsTemplateMapper.selectComStatsTemplateById(StatsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板名称是否唯一
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkStatsNameUnique(ComStatsTemplate Stats) {
|
||||||
|
Long StatsId = StringUtils.isNull(Stats.getStatsId()) ? -1L : Stats.getStatsId();
|
||||||
|
ComStatsTemplate info = comStatsTemplateMapper.checkDictNameUnique(Stats.getStatsName(),Stats.getStatsType());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getStatsId().longValue() != StatsId.longValue()) {
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统计模板编码是否唯一
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkStatsCodeUnique(ComStatsTemplate Stats) {
|
||||||
|
Long StatsId = StringUtils.isNull(Stats.getStatsId()) ? -1L : Stats.getStatsId();
|
||||||
|
ComStatsTemplate info = comStatsTemplateMapper.checkDictCodeUnique(Stats.getStatsCode(),Stats.getStatsType());
|
||||||
|
if (StringUtils.isNotNull(info) && info.getStatsId().longValue() != StatsId.longValue()) {
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过统计模板ID查询统计模板使用数量
|
||||||
|
*
|
||||||
|
* @param StatsId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int countUserStatsById(Long StatsId) {
|
||||||
|
ComStatsTemplate temp=comStatsTemplateMapper.selectComStatsTemplateById(StatsId);
|
||||||
|
if(temp==null)return 0;
|
||||||
|
String statsCode=temp.getStatsCode();
|
||||||
|
ComStatsParameter param = new ComStatsParameter();
|
||||||
|
temp.setStatsCode(statsCode);
|
||||||
|
List<ComStatsParameter> list=comStatsParameterMapper.selectComStatsParameterList(param);
|
||||||
|
if(list==null||list.size()==0)return 0;
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param StatsId 统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteStatsById(Long StatsId) {
|
||||||
|
return comStatsTemplateMapper.delComStatsTemplateById(StatsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除统计模板信息
|
||||||
|
*
|
||||||
|
* @param StatsIds 需要删除的统计模板ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteStatsByIds(Long[] StatsIds) {
|
||||||
|
for (Long StatsId : StatsIds) {
|
||||||
|
ComStatsTemplate Stats = selectComStatsTemplateById(StatsId);
|
||||||
|
if (countUserStatsById(StatsId) > 0) {
|
||||||
|
throw new ServiceException(String.format("%1$s已分配,不能删除", Stats.getStatsName()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return comStatsTemplateMapper.delComStatsTemplateByIds(StatsIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存统计模板信息
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertStats(ComStatsTemplate Stats) {
|
||||||
|
return comStatsTemplateMapper.insertComStatsTemplate(Stats);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存统计模板信息
|
||||||
|
*
|
||||||
|
* @param Stats 统计模板信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateStats(ComStatsTemplate Stats) {
|
||||||
|
return comStatsTemplateMapper.updateComStatsTemplate(Stats);
|
||||||
|
}
|
||||||
|
}
|
||||||
167
liswork/src/main/resources/mapper/ComStatsParameterMapper.xml
Normal file
167
liswork/src/main/resources/mapper/ComStatsParameterMapper.xml
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.czlis.liswork.mapper.xtwh.ComStatsParameterMapper">
|
||||||
|
<resultMap type="com.czlis.common.core.domain.entity.lis.ComStatsParameter" id="ComStatsParameterResult">
|
||||||
|
<id property="paramId" column="param_id" />
|
||||||
|
<result property="statsCode" column="stats_code" />
|
||||||
|
<result property="paramType" column="param_type" />
|
||||||
|
<result property="paramCode" column="param_code" />
|
||||||
|
<result property="paramName" column="param_name" />
|
||||||
|
<result property="paramOptiontype" column="param_optiontype" />
|
||||||
|
<result property="paramDefvalue" column="param_defvalue" />
|
||||||
|
<result property="paramSql" column="param_sql" />
|
||||||
|
<result property="paramHide" column="param_hide" />
|
||||||
|
<result property="paramSequence" column="param_sequence" />
|
||||||
|
<result property="precondition" column="precondition" />
|
||||||
|
<result property="paramSort" column="param_sort" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="selectComStatsParameterVo">
|
||||||
|
select param_id,param_type,param_code,param_name,param_optiontype,param_sql,param_hide,param_sort,stats_code,param_defvalue,param_sequence,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark,precondition from Com_stats_parameter
|
||||||
|
</sql>
|
||||||
|
<select id="selectComStatsParameterList" resultMap="ComStatsParameterResult" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsParameter" >
|
||||||
|
<include refid="selectComStatsParameterVo"></include>
|
||||||
|
<where>
|
||||||
|
<if test="paramId != null and paramId != 0">
|
||||||
|
and param_id = #{paramId}
|
||||||
|
</if>
|
||||||
|
<if test="paramType != null and paramType != ''">
|
||||||
|
and param_type = #{paramType}
|
||||||
|
</if>
|
||||||
|
<if test="paramCode != null and paramCode != ''">
|
||||||
|
and param_code = #{paramCode}
|
||||||
|
</if>
|
||||||
|
<if test="paramName != null and paramName != ''">
|
||||||
|
and param_name = #{paramName}
|
||||||
|
</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">
|
||||||
|
and stats_code = #{statsCode}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by param_sort ASC
|
||||||
|
</select>
|
||||||
|
<select id="getCountById" resultType="Long">
|
||||||
|
select count(1) from Com_stats_parameter where param_id = #{paramId}
|
||||||
|
</select>
|
||||||
|
<select id="selectComStatsParameterAll" resultMap="ComStatsParameterResult">
|
||||||
|
<include refid="selectComStatsParameterVo"/>
|
||||||
|
order by param_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectComStatsParameterById" parameterType="Long" resultMap="ComStatsParameterResult">
|
||||||
|
<include refid="selectComStatsParameterVo"/>
|
||||||
|
where param_id = #{paramId}
|
||||||
|
</select>
|
||||||
|
<select id="selectComStatsParameterByType" parameterType="String" resultMap="ComStatsParameterResult">
|
||||||
|
<include refid="selectComStatsParameterVo"/>
|
||||||
|
where param_type = #{paramType}
|
||||||
|
order by param_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="checkDictNameUnique" parameterType="String" resultMap="ComStatsParameterResult">
|
||||||
|
select top 1 param_id,param_type,param_code,param_name,param_optiontype,param_sql,param_sort,param_hide,stats_code,param_defvalue,param_sequence,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark,precondition
|
||||||
|
from Com_stats_parameter
|
||||||
|
where param_name=#{paramName} and param_type = #{paramType} and stats_code = #{statsCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComStatsParameterResult">
|
||||||
|
select top 1 param_id,param_type,param_code,param_name,param_optiontype,param_sql,
|
||||||
|
param_sort,param_hide,stats_code,param_defvalue,param_sequence,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark,precondition
|
||||||
|
from Com_stats_parameter
|
||||||
|
where param_code=#{paramCode} and param_type = #{paramType} and stats_code = #{statsCode}
|
||||||
|
</select>
|
||||||
|
<insert id="insertComStatsParameter" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsParameter" useGeneratedKeys="true" keyProperty="paramId">
|
||||||
|
insert into Com_stats_parameter(
|
||||||
|
<if test="paramId != null and paramId != 0">param_id,</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">stats_code,</if>
|
||||||
|
<if test="paramType != null and paramType != ''">param_type,</if>
|
||||||
|
<if test="paramCode != null and paramCode != ''">param_code,</if>
|
||||||
|
<if test="paramName != null and paramName != ''">param_name,</if>
|
||||||
|
<if test="paramOptiontype != null and paramOptiontype != ''">param_optiontype,</if>
|
||||||
|
<if test="paramDefvalue != null and paramDefvalue != ''">param_defvalue,</if>
|
||||||
|
<if test="precondition != null and precondition != ''">precondition,</if>
|
||||||
|
<if test="paramSequence != null ">param_sequence,</if>
|
||||||
|
<if test="paramSql != null and paramSql != ''">param_sql,</if>
|
||||||
|
<if test="paramHide != null and paramHide != ''">param_hide ,</if>
|
||||||
|
<if test="paramSort != null">param_sort,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="paramId != null and paramId != 0">#{paramId},</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">#{statsCode},</if>
|
||||||
|
<if test="paramType != null and paramType != ''">#{paramType},</if>
|
||||||
|
<if test="paramCode != null and paramCode != ''">#{paramCode},</if>
|
||||||
|
<if test="paramName != null and paramName != ''">#{paramName},</if>
|
||||||
|
<if test="paramOptiontype != null and paramOptiontype != ''">#{paramOptiontype},</if>
|
||||||
|
<if test="paramDefvalue != null and paramDefvalue != ''">#{paramDefvalue},</if>
|
||||||
|
<if test="precondition != null and precondition != ''">#{precondition},</if>
|
||||||
|
<if test="paramSequence != null ">#{paramSequence},</if>
|
||||||
|
<if test="paramSql != null and paramSql != ''">#{paramSql},</if>
|
||||||
|
<if test="paramHide != null and paramHide != ''">#{paramHide},</if>
|
||||||
|
<if test="paramSort != null">#{paramSort},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
getdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="delComStatsParameterById" parameterType="Long">
|
||||||
|
delete from Com_stats_parameter where param_id = #{paramId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="delComStatsParameterByIds" parameterType="Long">
|
||||||
|
delete from Com_stats_parameter where param_id in
|
||||||
|
<foreach collection="array" item="paramId" open="(" separator="," close=")">
|
||||||
|
#{paramId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateComStatsParameterall" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsParameter">
|
||||||
|
update Com_stats_parameter
|
||||||
|
set param_type = #{paramType}, stats_code= #{statsCode},
|
||||||
|
param_code = #{paramCode},param_name = #{paramName},
|
||||||
|
param_optiontype = #{paramOptiontype},param_defvalue= #{paramDefvalue},
|
||||||
|
param_sequence= #{paramSequence},precondition=#{precondition},
|
||||||
|
param_sql = #{paramSql},param_hide = #{paramHide},
|
||||||
|
param_sort = #{paramSort},status = #{status},
|
||||||
|
remark = #{remark},update_by = #{updateBy},update_time = getdate()
|
||||||
|
where param_id = #{paramId}
|
||||||
|
</update>
|
||||||
|
<update id="updateComStatsParameter" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsParameter">
|
||||||
|
update Com_stats_parameter
|
||||||
|
<set>
|
||||||
|
<if test="paramType != null and paramType != ''">param_type = #{paramType},</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">stats_code= #{statsCode},</if>
|
||||||
|
<if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if>
|
||||||
|
<if test="paramName != null and paramName != ''">param_name = #{paramName},</if>
|
||||||
|
<if test="paramOptiontype != null and paramOptiontype != ''">param_optiontype = #{paramOptiontype},</if>
|
||||||
|
<if test="paramDefvalue != null and paramDefvalue != ''">param_defvalue= #{paramDefvalue},</if>
|
||||||
|
<if test="paramSequence != null ">param_sequence= #{paramSequence},</if>
|
||||||
|
<if test="paramSql != null and paramSql != ''">param_sql = #{paramSql},</if>
|
||||||
|
<if test="paramHide != null and paramHide != ''">param_hide = #{paramHide},</if>
|
||||||
|
<if test="paramSort != null">param_sort = #{paramSort},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = getdate()
|
||||||
|
</set>
|
||||||
|
where param_id = #{paramId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
141
liswork/src/main/resources/mapper/ComStatsTemplateMapper.xml
Normal file
141
liswork/src/main/resources/mapper/ComStatsTemplateMapper.xml
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.czlis.liswork.mapper.xtwh.ComStatsTemplateMapper">
|
||||||
|
<resultMap type="com.czlis.common.core.domain.entity.lis.ComStatsTemplate" id="ComStatsTemplateResult">
|
||||||
|
<id property="statsId" column="stats_id" />
|
||||||
|
<result property="statsType" column="stats_type" />
|
||||||
|
<result property="statsCode" column="stats_code" />
|
||||||
|
<result property="statsName" column="stats_name" />
|
||||||
|
<result property="statsTitle" column="stats_title" />
|
||||||
|
<result property="statsSql" column="stats_sql" />
|
||||||
|
<result property="statsGraph" column="stats_graph" />
|
||||||
|
<result property="statsSort" column="stats_sort" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="selectComStatsTemplateVo">
|
||||||
|
select stats_id,stats_type,stats_code,stats_name,stats_title,stats_sql,stats_graph,stats_sort,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark from Com_stats_template
|
||||||
|
</sql>
|
||||||
|
<select id="selectComStatsTemplateList" resultMap="ComStatsTemplateResult" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsTemplate" >
|
||||||
|
<include refid="selectComStatsTemplateVo"></include>
|
||||||
|
<where>
|
||||||
|
<if test="statsId != null and statsId != 0">
|
||||||
|
and stats_id = #{statsId}
|
||||||
|
</if>
|
||||||
|
<if test="statsType != null and statsType != ''">
|
||||||
|
and stats_type = #{statsType}
|
||||||
|
</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">
|
||||||
|
and stats_code = #{statsCode}
|
||||||
|
</if>
|
||||||
|
<if test="statsName != null and statsName != ''">
|
||||||
|
and stats_name = #{statsName}
|
||||||
|
</if>
|
||||||
|
<if test="statsTitle != null and statsTitle != ''">
|
||||||
|
and stats_title = #{statsTitle}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by stats_sort ASC
|
||||||
|
</select>
|
||||||
|
<select id="getCountById" resultType="Long">
|
||||||
|
select count(1) from Com_stats_template where stats_id = #{statsId}
|
||||||
|
</select>
|
||||||
|
<select id="selectComStatsTemplateAll" resultMap="ComStatsTemplateResult">
|
||||||
|
<include refid="selectComStatsTemplateVo"/>
|
||||||
|
order by stats_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectComStatsTemplateById" parameterType="Long" resultMap="ComStatsTemplateResult">
|
||||||
|
<include refid="selectComStatsTemplateVo"/>
|
||||||
|
where stats_id = #{statsId}
|
||||||
|
</select>
|
||||||
|
<select id="selectComStatsTemplateByType" parameterType="String" resultMap="ComStatsTemplateResult">
|
||||||
|
<include refid="selectComStatsTemplateVo"/>
|
||||||
|
where stats_type = #{statsType}
|
||||||
|
order by stats_sort
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="checkDictNameUnique" parameterType="String" resultMap="ComStatsTemplateResult">
|
||||||
|
select top 1 stats_id,stats_type,stats_code,stats_name,stats_title,stats_sql,stats_sort,stats_graph,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark
|
||||||
|
from Com_stats_template
|
||||||
|
where stats_name=#{statsName} and stats_type = #{statsType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkDictCodeUnique" parameterType="String" resultMap="ComStatsTemplateResult">
|
||||||
|
select top 1 stats_id,stats_type,stats_code,stats_name,stats_title,stats_sql,stats_sort,stats_graph,
|
||||||
|
status,create_by,create_time,update_by,update_time,remark
|
||||||
|
from Com_stats_template
|
||||||
|
where stats_code=#{statsCode} and stats_type = #{statsType}
|
||||||
|
</select>
|
||||||
|
<insert id="insertComStatsTemplate" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsTemplate" useGeneratedKeys="true" keyProperty="statsId">
|
||||||
|
insert into Com_stats_template(
|
||||||
|
<if test="statsId != null and statsId != 0">stats_id,</if>
|
||||||
|
<if test="statsType != null and statsType != ''">stats_type,</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">stats_code,</if>
|
||||||
|
<if test="statsName != null and statsName != ''">stats_name,</if>
|
||||||
|
<if test="statsTitle != null and statsTitle != ''">stats_title,</if>
|
||||||
|
<if test="statsSql != null and statsSql != ''">stats_sql,</if>
|
||||||
|
<if test="statsGraph != null and statsGraph != ''">stats_graph ,</if>
|
||||||
|
<if test="statsSort != null">stats_sort,</if>
|
||||||
|
<if test="status != null and status != ''">status,</if>
|
||||||
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
create_time
|
||||||
|
)values(
|
||||||
|
<if test="statsId != null and statsId != 0">#{statsId},</if>
|
||||||
|
<if test="statsType != null and statsType != ''">#{statsType},</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">#{statsCode},</if>
|
||||||
|
<if test="statsName != null and statsName != ''">#{statsName},</if>
|
||||||
|
<if test="statsTitle != null and statsTitle != ''">#{statsTitle},</if>
|
||||||
|
<if test="statsSql != null and statsSql != ''">#{statsSql},</if>
|
||||||
|
<if test="statsGraph != null and statsGraph != ''">#{statsGraph},</if>
|
||||||
|
<if test="statsSort != null">#{statsSort},</if>
|
||||||
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
getdate()
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<delete id="delComStatsTemplateById" parameterType="Long">
|
||||||
|
delete from Com_stats_template where stats_id = #{statsId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="delComStatsTemplateByIds" parameterType="Long">
|
||||||
|
delete from Com_stats_template where stats_id in
|
||||||
|
<foreach collection="array" item="statsId" open="(" separator="," close=")">
|
||||||
|
#{statsId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateComStatsTemplate" parameterType="com.czlis.common.core.domain.entity.lis.ComStatsTemplate">
|
||||||
|
update Com_stats_template
|
||||||
|
<set>
|
||||||
|
<if test="statsType != null and statsType != ''">stats_type = #{statsType},</if>
|
||||||
|
<if test="statsCode != null and statsCode != ''">stats_code = #{statsCode},</if>
|
||||||
|
<if test="statsName != null and statsName != ''">stats_name = #{statsName},</if>
|
||||||
|
<if test="statsTitle != null and statsTitle != ''">stats_title = #{statsTitle},</if>
|
||||||
|
<if test="statsSql != null and statsSql != ''">stats_sql = #{statsSql},</if>
|
||||||
|
<if test="statsGraph != null and statsGraph != ''">stats_graph = #{statsGraph},</if>
|
||||||
|
<if test="statsSort != null">stats_sort = #{statsSort},</if>
|
||||||
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
|
update_time = getdate()
|
||||||
|
</set>
|
||||||
|
where stats_id = #{statsId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -27,9 +27,14 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
<if test="zkph != null and zkph !=''">and qc_val.zkph = #{zkph}</if>
|
<if test="zkphList != null ">
|
||||||
|
and qc_val.zkph IN
|
||||||
|
<foreach collection="zkphList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
||||||
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} </if>
|
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} and #{zkrq1}>=qc_sample.ksrq </if>
|
||||||
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
<if test="cs != null and cs !=10">and qc_val.cs = #{cs}</if>
|
<if test="cs != null and cs !=10">and qc_val.cs = #{cs}</if>
|
||||||
</where>
|
</where>
|
||||||
@ -46,9 +51,14 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
<if test="zkph != null and zkph !=''">and qc_val.zkph = #{zkph}</if>
|
<if test="zkphList != null ">
|
||||||
|
and qc_val.zkph IN
|
||||||
|
<foreach collection="zkphList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
||||||
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} </if>
|
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} and #{zkrq1}>=qc_sample.ksrq </if>
|
||||||
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
<if test="cs != null and cs !=10">and qc_val.cs =(select max(cs) from qc_val a where a.yq=qc_val.yq and a.xmdh=qc_val.xmdh and a.zkph=qc_val.zkph and a.zkrq=qc_val.zkrq) </if>
|
<if test="cs != null and cs !=10">and qc_val.cs =(select max(cs) from qc_val a where a.yq=qc_val.yq and a.xmdh=qc_val.xmdh and a.zkph=qc_val.zkph and a.zkrq=qc_val.zkrq) </if>
|
||||||
</where>
|
</where>
|
||||||
@ -65,9 +75,14 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
<if test="zkph != null and zkph !=''">and qc_val.zkph = #{zkph}</if>
|
<if test="zkphList != null ">
|
||||||
|
and qc_val.zkph IN
|
||||||
|
<foreach collection="zkphList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
||||||
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} </if>
|
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} and #{zkrq1}>=qc_sample.ksrq </if>
|
||||||
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
<if test="cs != null and cs !=10">and abs(qc_sample.zkbz - qc_val.zkjg)=(select min(abs(qc_sample.zkbz - a.zkjg)) from qc_val a where a.yq=qc_val.yq and a.xmdh=qc_val.xmdh and a.zkph=qc_val.zkph and a.zkrq=qc_val.zkrq) </if>
|
<if test="cs != null and cs !=10">and abs(qc_sample.zkbz - qc_val.zkjg)=(select min(abs(qc_sample.zkbz - a.zkjg)) from qc_val a where a.yq=qc_val.yq and a.xmdh=qc_val.xmdh and a.zkph=qc_val.zkph and a.zkrq=qc_val.zkrq) </if>
|
||||||
</where>
|
</where>
|
||||||
@ -87,9 +102,14 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
<if test="zkph != null and zkph !=''">and qc_val.zkph = #{zkph}</if>
|
<if test="zkphList != null ">
|
||||||
|
and qc_val.zkph IN
|
||||||
|
<foreach collection="zkphList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
<if test="zkpph != null and zkpph !=''">and qc_sample.zkpph = #{zkpph}</if>
|
||||||
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} </if>
|
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} and #{zkrq1}>=qc_sample.ksrq </if>
|
||||||
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
<if test="cs != null and cs !=10">and qc_val.cs =1</if>
|
<if test="cs != null and cs !=10">and qc_val.cs =1</if>
|
||||||
</where>
|
</where>
|
||||||
@ -115,14 +135,32 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
<if test="zkph != null and zkph !=''">and qc_val.zkph = #{zkph}</if>
|
<if test="zkphList != null ">
|
||||||
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} </if>
|
and qc_val.zkph IN
|
||||||
|
<foreach collection="zkphList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} and #{zkrq1}>=qc_sample.ksrq </if>
|
||||||
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
</where>
|
</where>
|
||||||
group by qc_val.yq,qc_val.zkph,qc_val.xmdh,xm_info.xmmc,xm_info.dyxh,qc_sample.zkbz,qc_sample.sd,qc_sample.cv
|
group by qc_val.yq,qc_val.zkph,qc_val.xmdh,xm_info.xmmc,xm_info.dyxh,qc_sample.zkbz,qc_sample.sd,qc_sample.cv
|
||||||
order by xm_info.dyxh,qc_val.zkph
|
order by xm_info.dyxh,qc_val.zkph
|
||||||
</select>
|
</select>
|
||||||
|
<select id="calc" resultType="com.czlis.liswork.pojo.DTO.QcMonthstDTO">
|
||||||
|
SELECT qc_val.yq,qc_val.xmdh,qc_val.zkph,count(1) cnt,
|
||||||
|
cast(avg(zkjg) as decimal(12, 3)) avg1,
|
||||||
|
cast(STDEV(zkjg) as decimal(12, 3)) sd1
|
||||||
|
FROM qc_val
|
||||||
|
<where>
|
||||||
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
|
<if test="zkph != null ">and qc_val.zkph=#{zkph}</if>
|
||||||
|
<if test="zkrq1 != null">and qc_val.zkrq>= #{zkrq1} </if>
|
||||||
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
|
</where>
|
||||||
|
group by qc_val.yq,qc_val.zkph,qc_val.xmdh
|
||||||
|
</select>
|
||||||
<select id="queryhead3" resultType="com.czlis.liswork.pojo.DTO.QcMonthstDTO">
|
<select id="queryhead3" resultType="com.czlis.liswork.pojo.DTO.QcMonthstDTO">
|
||||||
SELECT qc_val.yq,qc_val.xmdh,qc_val.zkph,count(1) cnt3,cast(avg(zkjg) as decimal(12, 3)) avg3,
|
SELECT qc_val.yq,qc_val.xmdh,qc_val.zkph,count(1) cnt3,cast(avg(zkjg) as decimal(12, 3)) avg3,
|
||||||
cast(STDEV(zkjg) as decimal(12, 3)) sd3,cast(100*STDEV(zkjg)/avg(zkjg) as decimal(12, 3)) as cv3
|
cast(STDEV(zkjg) as decimal(12, 3)) sd3,cast(100*STDEV(zkjg)/avg(zkjg) as decimal(12, 3)) as cv3
|
||||||
@ -133,7 +171,12 @@
|
|||||||
<where>
|
<where>
|
||||||
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
<if test="yq != null and yq !=''">and qc_val.yq = #{yq}</if>
|
||||||
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
<if test="xmdh != null and xmdh !=''">and qc_val.xmdh = #{xmdh}</if>
|
||||||
<if test="zkph != null and zkph !=''">and qc_val.zkph = #{zkph}</if>
|
<if test="zkphList != null ">
|
||||||
|
and qc_val.zkph IN
|
||||||
|
<foreach collection="zkphList" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="zkrq1 != null">and qc_val.zkrq>=(select min(ksrq) from qc_sample x where x.yq=qc_val.yq and x.xmdh=qc_val.xmdh and x.zkph=qc_val.zkph and qc_sample.zkpph=x.zkpph)</if>
|
<if test="zkrq1 != null">and qc_val.zkrq>=(select min(ksrq) from qc_sample x where x.yq=qc_val.yq and x.xmdh=qc_val.xmdh and x.zkph=qc_val.zkph and qc_sample.zkpph=x.zkpph)</if>
|
||||||
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
<if test="zkrq2 != null">and #{zkrq2}>= qc_val.zkrq </if>
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
@ -452,50 +452,60 @@ if not exists(select 1 from dbo.com_dict where zdlb = 'ZKGZ' and zddh = '12X')
|
|||||||
insert into com_dict(zdlb,zddh,zdmc,zjf,zdbz,bz,yljg)values('ZKGZ','12X','十二个连续的质控测定值落在靶值(X)的同一侧','','','','1')
|
insert into com_dict(zdlb,zddh,zdmc,zjf,zdbz,bz,yljg)values('ZKGZ','12X','十二个连续的质控测定值落在靶值(X)的同一侧','','','','1')
|
||||||
end
|
end
|
||||||
|
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '1')
|
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_stats_parameter')
|
||||||
begin
|
begin
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
CREATE TABLE [dbo].[com_stats_parameter](
|
||||||
VALUES ('ST', '1', '开单', 'xz', 'N', NULL, '1', NULL)
|
[param_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||||
|
[stats_code] [varchar](64) NOT NULL,
|
||||||
|
[param_type] [varchar](20) NOT NULL,
|
||||||
|
[param_code] [varchar](64) NOT NULL,
|
||||||
|
[param_name] [varchar](250) NOT NULL,
|
||||||
|
[param_optiontype] [char](1) NULL,
|
||||||
|
[param_defvalue] [varchar](250) NULL,
|
||||||
|
[param_sql] [varchar](250) NULL,
|
||||||
|
[param_hide] [char](1) NULL,
|
||||||
|
[param_sequence] [int] NULL,
|
||||||
|
[param_sort] [int] NOT NULL,
|
||||||
|
[status] [char](1) NOT NULL,
|
||||||
|
[create_by] [varchar](64) NULL,
|
||||||
|
[create_time] [datetime] NULL,
|
||||||
|
[update_by] [varchar](64) NULL,
|
||||||
|
[update_time] [datetime] NULL,
|
||||||
|
[remark] [varchar](500) NULL,
|
||||||
|
PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[param_id] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
) ON [PRIMARY];
|
||||||
|
ALTER TABLE [dbo].[com_stats_parameter] ADD DEFAULT ('') FOR [create_by];
|
||||||
|
ALTER TABLE [dbo].[com_stats_parameter] ADD DEFAULT ('') FOR [update_by];
|
||||||
|
ALTER TABLE [dbo].[com_stats_parameter] ADD DEFAULT (NULL) FOR [remark];
|
||||||
end
|
end
|
||||||
|
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '11')
|
|
||||||
begin
|
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
|
||||||
VALUES ('ST', '11', '打印', 'dy', 'N', NULL, '1', NULL)
|
|
||||||
end
|
|
||||||
|
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '12')
|
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'com_stats_template')
|
||||||
begin
|
begin
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
CREATE TABLE [dbo].[com_stats_template](
|
||||||
VALUES ('ST', '12', '采样', 'cy', 'N', NULL, '1', NULL)
|
[stats_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||||
end
|
[stats_type] [varchar](20) NOT NULL,
|
||||||
|
[stats_code] [varchar](64) NOT NULL,
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '13')
|
[stats_name] [varchar](250) NOT NULL,
|
||||||
begin
|
[stats_title] [varchar](250) NULL,
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
[stats_sql] [varchar](8000) NULL,
|
||||||
VALUES ('ST', '13', '送检', 'sj', 'N', NULL, '1', NULL)
|
[stats_graph] [varchar](100) NULL,
|
||||||
end
|
[stats_sort] [int] NOT NULL,
|
||||||
|
[status] [char](1) NOT NULL,
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '2')
|
[create_by] [varchar](64) NULL,
|
||||||
begin
|
[create_time] [datetime] NULL,
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
[update_by] [varchar](64) NULL,
|
||||||
VALUES ('ST', '2', '上机', 'sj', 'N', NULL, '1', NULL)
|
[update_time] [datetime] NULL,
|
||||||
end
|
[remark] [varchar](500) NULL,
|
||||||
|
PRIMARY KEY CLUSTERED
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '4')
|
(
|
||||||
begin
|
[stats_id] ASC
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
VALUES ('ST', '4', '审核', 'sh', 'N', NULL, '1', NULL)
|
) ON [PRIMARY]
|
||||||
end
|
ALTER TABLE [dbo].[com_stats_template] ADD DEFAULT ('') FOR [create_by];
|
||||||
|
ALTER TABLE [dbo].[com_stats_template] ADD DEFAULT ('') FOR [update_by];
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '8')
|
ALTER TABLE [dbo].[com_stats_template] ADD DEFAULT (NULL) FOR [remark];
|
||||||
begin
|
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
|
||||||
VALUES ('ST', '8', '剔回', 'th', 'N', NULL, '1', NULL)
|
|
||||||
end
|
|
||||||
|
|
||||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '9')
|
|
||||||
begin
|
|
||||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
|
||||||
VALUES ('ST', '9', '作废', 'zf', 'N', NULL, '1', NULL)
|
|
||||||
end
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user