Commit af3e8e13 authored by 竹天卫's avatar 竹天卫

优化 + bug修改

parent 3863e862
...@@ -154,4 +154,3 @@ public class TeamController { ...@@ -154,4 +154,3 @@ public class TeamController {
} }
...@@ -43,8 +43,14 @@ public class Team extends BaseEntity implements Serializable { ...@@ -43,8 +43,14 @@ public class Team extends BaseEntity implements Serializable {
@ApiModelProperty("检测组表id") @ApiModelProperty("检测组表id")
private Integer groupId; private Integer groupId;
@ApiModelProperty("检测依据表id") @ApiModelProperty("检测依据表id 1、2、3")
private Integer methodId; private String methodId;
@ApiModelProperty("检测依据编号 11、22、33")
private String number;
@ApiModelProperty("检测依据名称 a、b、c")
private String methodName;
@ApiModelProperty("收费标准") @ApiModelProperty("收费标准")
private BigDecimal charge; private BigDecimal charge;
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
SELECT SELECT
(@i:=@i+1) as 序号, (@i:=@i+1) as 序号,
e.id as entrustId, e.id as entrustId,
e.entrust_code as 委托编号, IF(ISNULL(e.entrust_code),'',e.entrust_code) as 委托编号,
( (
CASE e.is_urgent CASE e.is_urgent
WHEN 0 THEN '不加急' WHEN 0 THEN '不加急'
...@@ -75,12 +75,12 @@ ...@@ -75,12 +75,12 @@
ELSE NULL ELSE NULL
END END
) as 是否加急, ) as 是否加急,
e.project_name as 项目名称, IF(ISNULL(e.project_name),'',e.project_name) as 项目名称,
e.project_code as 项目编号, IF(ISNULL(e.project_code),'',e.project_code) as 项目编号,
su.name as 委托人, IF(ISNULL(su.name),'',su.name) su.name as 委托人,
c.name as 委托单位, IF(ISNULL(c.name),'',c.name) c.name as 委托单位,
e.entrust_date as 委托日期, IF(ISNULL(e.entrust_date),'',e.entrust_date) as 委托日期,
e.sample_num as 样品数量, IF(ISNULL(e.sample_num),'',e.sample_num) as 样品数量,
( (
CASE e.status CASE e.status
WHEN 0 THEN '未评审' WHEN 0 THEN '未评审'
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.TeamVo"> <select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.TeamVo">
SELECT t.*, tg.name as groupName, SELECT t.*, tg.name as groupName,
m.name as methodName, m.standard as standard, m.number as number,
( (
CASE t.qualifications CASE t.qualifications
WHEN 0 THEN '资质外' WHEN 0 THEN '资质外'
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
h.name as handleName h.name as handleName
FROM team t FROM team t
left join team_group tg on tg.id = t.group_id left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
left join handle h on h.id = t.handle_id left join handle h on h.id = t.handle_id
<include refid="where"/> <include refid="where"/>
ORDER BY t.create_time desc ORDER BY t.create_time desc
...@@ -42,9 +40,8 @@ ...@@ -42,9 +40,8 @@
(@i:=@i+1) as 序号, (@i:=@i+1) as 序号,
t.name as 检测项目, t.name as 检测项目,
IF(ISNULL(tg.name ),'',tg.name ) 所在检测组, IF(ISNULL(tg.name ),'',tg.name ) 所在检测组,
m.name as 检测依据, t.method_name as 检测依据,
t.charge as 收费标准, t.charge as 收费标准,
t.pro_charge as 建议产值,
( (
CASE t.qualifications CASE t.qualifications
WHEN 0 THEN '资质外' WHEN 0 THEN '资质外'
...@@ -54,16 +51,14 @@ ...@@ -54,16 +51,14 @@
) as 资质范围 ) as 资质范围
FROM team t FROM team t
left join team_group tg on tg.id = t.group_id left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
,(select @i:=0)t ,(select @i:=0)t
<include refid="where"/> <include refid="where"/>
</select> </select>
<select id="getList" resultType="cn.wise.sc.cement.business.model.vo.TeamListVo"> <select id="getList" resultType="cn.wise.sc.cement.business.model.vo.TeamListVo">
SELECT t.id as id, t.name as name, t.group_id as groupId, t.method_id as methodId, SELECT t.id as id, t.name as name, t.group_id as groupId, t.method_id as methodId,
m.name as methodName, m.number as number t.method_name as methodName, t.number as number
FROM team t FROM team t
left join method m on m.id = t.method_id
where t.status=1 and t.is_display = 1 where t.status=1 and t.is_display = 1
ORDER BY t.id ASC ORDER BY t.id ASC
</select> </select>
...@@ -71,7 +66,6 @@ ...@@ -71,7 +66,6 @@
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.TeamVo"> <select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.TeamVo">
SELECT t.*, tg.name as groupName, SELECT t.*, tg.name as groupName,
m.name as methodName, m.standard as standard, m.number as number,
( (
CASE t.qualifications CASE t.qualifications
WHEN 0 THEN '资质范围外' WHEN 0 THEN '资质范围外'
...@@ -82,7 +76,6 @@ ...@@ -82,7 +76,6 @@
h.name as handleName h.name as handleName
FROM team t FROM team t
left join team_group tg on tg.id = t.group_id left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
left join handle h on h.id = t.handle_id left join handle h on h.id = t.handle_id
where t.id = #{id} where t.id = #{id}
</select> </select>
......
...@@ -24,8 +24,8 @@ public class TeamQuery { ...@@ -24,8 +24,8 @@ public class TeamQuery {
@ApiModelProperty("检测项组id") @ApiModelProperty("检测项组id")
private Integer groupId; private Integer groupId;
@ApiModelProperty("检测依据表id") @ApiModelProperty("检测依据表id 1、2、3")
private Integer methodId; private String methodId;
@ApiModelProperty("收费标准") @ApiModelProperty("收费标准")
private BigDecimal charge; private BigDecimal charge;
......
package cn.wise.sc.cement.business.model.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @description:
* @author: ztw
* @create: 2021-01-08
**/
@Data
@ApiModel("校核元素输入值-临时类")
public class InputResultVo {
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("值")
private String value;
}
...@@ -24,10 +24,10 @@ public class TeamListVo { ...@@ -24,10 +24,10 @@ public class TeamListVo {
@ApiModelProperty("检测组表id") @ApiModelProperty("检测组表id")
private Integer groupId; private Integer groupId;
@ApiModelProperty("检测依据表id") @ApiModelProperty("检测依据表id 1、2、3")
private Integer methodId; private String methodId;
@ApiModelProperty("检测依据名称") @ApiModelProperty("检测依据名称 a、b、c")
private String methodName; private String methodName;
@ApiModelProperty("检测依据编号") @ApiModelProperty("检测依据编号")
......
...@@ -29,10 +29,10 @@ public class TeamVo { ...@@ -29,10 +29,10 @@ public class TeamVo {
@ApiModelProperty("检测组名称") @ApiModelProperty("检测组名称")
private String groupName; private String groupName;
@ApiModelProperty("检测依据表id") @ApiModelProperty("检测依据表id 1、2、3")
private Integer methodId; private String methodId;
@ApiModelProperty("检测依据名称") @ApiModelProperty("检测依据名称 a、b、c")
private String methodName; private String methodName;
@ApiModelProperty("检测依据标准号") @ApiModelProperty("检测依据标准号")
...@@ -48,7 +48,7 @@ public class TeamVo { ...@@ -48,7 +48,7 @@ public class TeamVo {
private BigDecimal proCharge; private BigDecimal proCharge;
@ApiModelProperty("资质范围") @ApiModelProperty("资质范围")
private String qualifications; private Integer qualifications;
@ApiModelProperty("资质范围(1资质内,0资质外)") @ApiModelProperty("资质范围(1资质内,0资质外)")
private String qualificationsValue; private String qualificationsValue;
......
...@@ -77,6 +77,9 @@ public class ClientServiceImpl extends ServiceImpl<ClientMapper, Client> impleme ...@@ -77,6 +77,9 @@ public class ClientServiceImpl extends ServiceImpl<ClientMapper, Client> impleme
if (count > 0) { if (count > 0) {
return BaseResponse.errorMsg("单位名称已存在!"); return BaseResponse.errorMsg("单位名称已存在!");
} }
if(query.getPrincipalPhone().length() > 15 ){
return BaseResponse.errorMsg("联系人电话过长!");
}
Client create = new Client(); Client create = new Client();
BeanUtils.copyProperties(query, create); BeanUtils.copyProperties(query, create);
create.setStatus(1) create.setStatus(1)
......
...@@ -9,6 +9,7 @@ import cn.wise.sc.cement.business.mapper.TeamGroupMapper; ...@@ -9,6 +9,7 @@ import cn.wise.sc.cement.business.mapper.TeamGroupMapper;
import cn.wise.sc.cement.business.mapper.TeamMapper; import cn.wise.sc.cement.business.mapper.TeamMapper;
import cn.wise.sc.cement.business.model.BaseResponse; import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.query.EnclosureQuery; import cn.wise.sc.cement.business.model.query.EnclosureQuery;
import cn.wise.sc.cement.business.model.vo.InputResultVo;
import cn.wise.sc.cement.business.service.IEntityEnclosureService; import cn.wise.sc.cement.business.service.IEntityEnclosureService;
import cn.wise.sc.cement.business.util.CheckCountUtil; import cn.wise.sc.cement.business.util.CheckCountUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -16,6 +17,7 @@ import com.alibaba.fastjson.JSONArray; ...@@ -16,6 +17,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.models.auth.In; import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -35,6 +37,10 @@ public class CommonServiceImpl { ...@@ -35,6 +37,10 @@ public class CommonServiceImpl {
private IEntityEnclosureService entityEnclosureService; private IEntityEnclosureService entityEnclosureService;
@Resource @Resource
private TeamMapper teamMapper; private TeamMapper teamMapper;
@Resource
private TeamGroupMapper teamGroupMapper;
/** /**
* 生成编号 * 生成编号
...@@ -168,6 +174,85 @@ public class CommonServiceImpl { ...@@ -168,6 +174,85 @@ public class CommonServiceImpl {
return jsonArray; return jsonArray;
} }
//Map转json数组
public JSONArray mapToJSONArray2(Integer groupId, Map<String, String> map){
JSONArray jsonArray = new JSONArray();
for(Map.Entry entry : map.entrySet() ){
JSONObject jsonObject = new JSONObject();
jsonObject.put("name",entry.getKey());
jsonObject.put("value",entry.getValue());
jsonArray.add(jsonObject);
}
//如果包含滴定度,直接更新检测组配置的校核元素值,下次校核直接带过来
TeamGroup teamGroup = teamGroupMapper.selectById(groupId);
if(teamGroup != null && StringUtils.isNotBlank(teamGroup.getCheckElement())){
JSONArray jsonArr = JSON.parseArray(teamGroup.getCheckElement());
Map<String, String> teamgroupMap = jSONArrayToMap(jsonArr);
if(teamgroupMap.containsKey("TSiO<sub>2</sub>")){
if(map.containsKey("TSiO<sub>2</sub>")){
teamgroupMap.put("TSiO<sub>2</sub>",map.get("TSiO<sub>2</sub>"));
}
}
if(teamgroupMap.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
if(map.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
teamgroupMap.put("TAl<sub>2</sub>O<sub>3</sub>",map.get("TAl<sub>2</sub>O<sub>3</sub>"));
}
}
if(teamgroupMap.containsKey("TFe<sub>2</sub>O<sub>3</sub>")){
if(map.containsKey("TFe<sub>2</sub>O<sub>3</sub>")){
teamgroupMap.put("TFe<sub>2</sub>O<sub>3</sub>",map.get("TFe<sub>2</sub>O<sub>3</sub>"));
}
}
if(teamgroupMap.containsKey("TMgO")){
if(map.containsKey("TMgO")){
teamgroupMap.put("TMgO",map.get("TMgO"));
}
}
if(teamgroupMap.containsKey("TTiO<sub>2</sub>")){
if(map.containsKey("TTiO<sub>2</sub>")){
teamgroupMap.put("TTiO<sub>2</sub>",map.get("TTiO<sub>2</sub>"));
}
}
if(teamgroupMap.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
if(map.containsKey("TAl<sub>2</sub>O<sub>3</sub>")){
teamgroupMap.put("TAl<sub>2</sub>O<sub>3</sub>",map.get("TAl<sub>2</sub>O<sub>3</sub>"));
}
}
if(teamgroupMap.containsKey("TTiO<sub>2</sub>")){
if(map.containsKey("TTiO<sub>2</sub>")){
teamgroupMap.put("TTiO<sub>2</sub>",map.get("TTiO<sub>2</sub>"));
}
}
if(teamgroupMap.containsKey("TCaO")){
if(map.containsKey("TCaO")){
teamgroupMap.put("TCaO",map.get("TCaO"));
}
}
JSONArray checkElementArray = mapToJSONArray(teamgroupMap);
String checkElement = JSON.toJSON(checkElementArray).toString();
teamGroup.setCheckElement(checkElement);
teamGroupMapper.updateById(teamGroup);
}
return jsonArray;
}
//json数组转Map
public Map<String, String> jSONArrayToMap(JSONArray jsonArray){
Map<String, String> map = new LinkedHashMap<>();
for(int i=0; i < jsonArray.size(); i++){
//获取每一个JsonObject对象
JSONObject jObject = jsonArray.getJSONObject(i);
map.put(jObject.getString("name"),jObject.getString("value"));
}
return map;
}
/** /**
* *
* @param checkResutlList 检测组id集合 * @param checkResutlList 检测组id集合
......
...@@ -263,6 +263,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -263,6 +263,9 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if (StringUtils.isEmpty(query.getSendName()) || StringUtils.isEmpty(query.getSendPhone())) { if (StringUtils.isEmpty(query.getSendName()) || StringUtils.isEmpty(query.getSendPhone())) {
return BaseResponse.errorMsg("请填写送样人信息"); return BaseResponse.errorMsg("请填写送样人信息");
} }
if (query.getSendPhone().length() > 15) {
return BaseResponse.errorMsg("送样人电话过长");
}
Entrust entrust = new Entrust(); Entrust entrust = new Entrust();
BeanUtils.copyProperties(query, entrust); BeanUtils.copyProperties(query, entrust);
//生成委托编号 //生成委托编号
...@@ -2267,7 +2270,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -2267,7 +2270,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if(sampleQuery.getIntputResult() == null){ if(sampleQuery.getIntputResult() == null){
return BaseResponse.errorMsg("请输入检测数据"); return BaseResponse.errorMsg("请输入检测数据");
} }
JSONArray inputResult_jsonArray = commonService.mapToJSONArray(sampleQuery.getIntputResult()); JSONArray inputResult_jsonArray = commonService.mapToJSONArray2(check.getTeamGroupId(), sampleQuery.getIntputResult());
String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString(); String inputResult_String = JSON.toJSON(inputResult_jsonArray).toString();
System.out.println(inputResult_String); System.out.println(inputResult_String);
//计算检测结果 //计算检测结果
...@@ -3066,7 +3070,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl ...@@ -3066,7 +3070,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
for (String teamId : teamIdS) { for (String teamId : teamIdS) {
Team team = teamMapper.selectById(Integer.valueOf(teamId)); Team team = teamMapper.selectById(Integer.valueOf(teamId));
if (team != null && team.getQualifications() == 1) { if (team != null && team.getQualifications() == 1) {
checkTeam = checkTeam.equals("") ? team.getName() : (checkTeam + "、" + team.getName()); String teamName = team.getName();
if(team.getName().contains("<sub>") || team.getName().contains("</sub>") ){
teamName = team.getName().replaceAll("<sub>","")
.replaceAll("</sub>","");
}
checkTeam = checkTeam.equals("") ? teamName : (checkTeam + "、" + teamName);
Method method = methodMapper.selectById(team.getMethodId()); Method method = methodMapper.selectById(team.getMethodId());
if (method != null) { if (method != null) {
checkMethod = checkMethod.equals("") ? method.getNumber() : (checkMethod + "、" + method.getNumber()); checkMethod = checkMethod.equals("") ? method.getNumber() : (checkMethod + "、" + method.getNumber());
......
...@@ -64,6 +64,9 @@ public class MethodServiceImpl extends ServiceImpl<MethodMapper, Method> impleme ...@@ -64,6 +64,9 @@ public class MethodServiceImpl extends ServiceImpl<MethodMapper, Method> impleme
@Override @Override
public BaseResponse<Method> create(MethodQuery query) { public BaseResponse<Method> create(MethodQuery query) {
if(query.getName().contains("、") || query.getNumber().contains("、") ){
return BaseResponse.errorMsg("检测依据名称和编号不能出现特殊符号");
}
QueryWrapper<Method> qw = new QueryWrapper<>(); QueryWrapper<Method> qw = new QueryWrapper<>();
qw.eq("name", query.getName()); qw.eq("name", query.getName());
int count = methodMapper.selectCount(qw); int count = methodMapper.selectCount(qw);
...@@ -80,6 +83,9 @@ public class MethodServiceImpl extends ServiceImpl<MethodMapper, Method> impleme ...@@ -80,6 +83,9 @@ public class MethodServiceImpl extends ServiceImpl<MethodMapper, Method> impleme
@Override @Override
public BaseResponse<Method> update(MethodQuery query) { public BaseResponse<Method> update(MethodQuery query) {
if(query.getName().contains("、") || query.getNumber().contains("、") ){
return BaseResponse.errorMsg("检测依据名称和编号不能出现特殊符号");
}
Method update = Method.crate(query); Method update = Method.crate(query);
update.setId(query.getId()); update.setId(query.getId());
this.updateById(update); this.updateById(update);
......
package cn.wise.sc.cement.business.service.impl; package cn.wise.sc.cement.business.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.wise.sc.cement.business.entity.Method;
import cn.wise.sc.cement.business.entity.Team; import cn.wise.sc.cement.business.entity.Team;
import cn.wise.sc.cement.business.entity.TeamGroup; import cn.wise.sc.cement.business.entity.TeamGroup;
import cn.wise.sc.cement.business.exception.BusinessExceptionEnum; import cn.wise.sc.cement.business.exception.BusinessExceptionEnum;
import cn.wise.sc.cement.business.mapper.MethodMapper;
import cn.wise.sc.cement.business.mapper.TeamMapper; import cn.wise.sc.cement.business.mapper.TeamMapper;
import cn.wise.sc.cement.business.model.BaseResponse; import cn.wise.sc.cement.business.model.BaseResponse;
import cn.wise.sc.cement.business.model.PageQuery; import cn.wise.sc.cement.business.model.PageQuery;
...@@ -47,6 +49,8 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT ...@@ -47,6 +49,8 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
@Resource @Resource
private TeamMapper teamMapper; private TeamMapper teamMapper;
@Resource
private MethodMapper methodMapper;
/** /**
* 分页查询 * 分页查询
...@@ -83,7 +87,7 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT ...@@ -83,7 +87,7 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
if (query.getGroupId() == null) { if (query.getGroupId() == null) {
return BaseResponse.errorMsg("请选择检测组"); return BaseResponse.errorMsg("请选择检测组");
} }
if (query.getMethodId() == null) { if (query.getMethodId() == null || query.getMethodId().equals("")) {
return BaseResponse.errorMsg("请选择检依据"); return BaseResponse.errorMsg("请选择检依据");
} }
if (query.getIsDisplay() == null) { if (query.getIsDisplay() == null) {
...@@ -103,12 +107,42 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT ...@@ -103,12 +107,42 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
return BaseResponse.errorMsg(query.getName() + "已存在"); return BaseResponse.errorMsg(query.getName() + "已存在");
} }
BeanUtils.copyProperties(query, create); BeanUtils.copyProperties(query, create);
//检测依据id转成检测依据名称
Map<String, String> map = methodId2Name(create.getMethodId());
//no_check 标识校核计算的时候不显示计算的结果,因为没有公式 //no_check 标识校核计算的时候不显示计算的结果,因为没有公式
create.setStatus(1).setCreateTime(LocalDateTime.now()).setRemark("no_check"); create.setMethodName(map.get("methodNames"))
.setNumber(map.get("number"))
.setStatus(1).setCreateTime(LocalDateTime.now()).setRemark("no_check");
teamMapper.insert(create); teamMapper.insert(create);
return BaseResponse.okData(create); return BaseResponse.okData(create);
} }
/**
* 检测依据编号转为检测依据名称
* @return
*/
private Map<String, String> methodId2Name(String methodId){
Map<String, String> map = new HashMap<>();
String[] methodIds = methodId.split("、");
if(methodIds != null){
String methodNames = "";
String number = "";
for(String methodid:methodIds){
Method method = methodMapper.selectById(Integer.valueOf(methodid));
if(method != null){
methodNames = methodNames.equals("")?method.getName():methodNames+"、"+method.getName();
number = number.equals("")?method.getNumber():number+"、"+method.getNumber();
}
}
map.put("methodNames", methodNames);
map.put("number", number);
return map;
}
return null;
}
/** /**
* 修改检测项 * 修改检测项
* *
...@@ -125,7 +159,7 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT ...@@ -125,7 +159,7 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
if (query.getGroupId() == null) { if (query.getGroupId() == null) {
return BaseResponse.errorMsg("请选择检测组"); return BaseResponse.errorMsg("请选择检测组");
} }
if (query.getMethodId() == null) { if (query.getMethodId() == null || query.getMethodId().equals("")) {
return BaseResponse.errorMsg("请选择检依据"); return BaseResponse.errorMsg("请选择检依据");
} }
if (query.getHandleId() == null) { if (query.getHandleId() == null) {
...@@ -138,8 +172,12 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT ...@@ -138,8 +172,12 @@ public class TeamServiceImpl extends ServiceImpl<TeamMapper, Team> implements IT
if (count > 0) { if (count > 0) {
return BaseResponse.errorMsg(query.getName() + "已存在"); return BaseResponse.errorMsg(query.getName() + "已存在");
} }
//检测依据id转成检测依据名称
Map<String, String> map = methodId2Name(query.getMethodId());
update.setGroupId(query.getGroupId()) update.setGroupId(query.getGroupId())
.setMethodId(query.getMethodId()) .setMethodId(query.getMethodId())
.setMethodName(map.get("methodNames"))
.setNumber(map.get("number"))
.setCharge(query.getCharge()) .setCharge(query.getCharge())
.setName(query.getName()) .setName(query.getName())
.setIsDisplay(query.getIsDisplay()) .setIsDisplay(query.getIsDisplay())
......
...@@ -59,12 +59,12 @@ public class CheckCountUtil { ...@@ -59,12 +59,12 @@ public class CheckCountUtil {
BigDecimal endResult = null; BigDecimal endResult = null;
if(name.equals("L.O.I")){ if(name.equals("L.O.I")){
if( StringUtils.isNotBlank(resultMap.get("样重m1")) && if( StringUtils.isNotBlank(resultMap.get("样重m1")) &&
StringUtils.isNotBlank(resultMap.get("空重m2"))&& StringUtils.isNotBlank(resultMap.get("空重m2"))&&
StringUtils.isNotBlank(resultMap.get("烧后重m3"))){ StringUtils.isNotBlank(resultMap.get("烧后重m3"))){
//样重m1—保留4位⼩数 //样重m1—保留4位⼩数
BigDecimal m1 = getBigDecimal(resultMap.get("样重m1").trim()).setScale(4,BigDecimal.ROUND_HALF_UP); BigDecimal m1 = getBigDecimal(resultMap.get("样重m1").trim()).setScale(4,BigDecimal.ROUND_HALF_UP);
//空重m2—保留4位⼩数 //空重m2—保留4位⼩数
BigDecimal m2 = getBigDecimal(resultMap.get("空重m2").trim()).setScale(4,BigDecimal.ROUND_HALF_UP); BigDecimal m2 = getBigDecimal(resultMap.get("空重m2").trim()).setScale(4,BigDecimal.ROUND_HALF_UP);
//烧后重m3—保留4位⼩数 //烧后重m3—保留4位⼩数
BigDecimal m3 = getBigDecimal(resultMap.get("烧后重m3").trim()).setScale(4,BigDecimal.ROUND_HALF_UP); BigDecimal m3 = getBigDecimal(resultMap.get("烧后重m3").trim()).setScale(4,BigDecimal.ROUND_HALF_UP);
//计算的核心公式结果 //计算的核心公式结果
......
...@@ -40,25 +40,25 @@ mybatis-plus: ...@@ -40,25 +40,25 @@ mybatis-plus:
mapper-locations: classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml mapper-locations: classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#正式服务器 #正式服务器
#weixin: weixin:
# corpId: wwc7ae84e6af6ba921 corpId: wwc7ae84e6af6ba921
# agentIdPC: 1000151 agentIdPC: 1000151
# agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
# agentId: 1000150 agentId: 1000150
# agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
# backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
# systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,' systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#测试服务器 #测试服务器
weixin: #weixin:
corpId: ww348f91b2573c1867 # corpId: ww348f91b2573c1867
agentId: 1000002 # agentId: 1000002
agentIdPC: 1000003 # agentIdPC: 1000003
agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o # agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A # agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system # backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,' # systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
......
...@@ -40,25 +40,25 @@ mybatis-plus: ...@@ -40,25 +40,25 @@ mybatis-plus:
mapper-locations: classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml mapper-locations: classpath:/cn/wise/sc/cement/business/mapper/xml/*Mapper.xml
#正式服务器 #正式服务器
#weixin: weixin:
# corpId: wwc7ae84e6af6ba921 corpId: wwc7ae84e6af6ba921
# agentIdPC: 1000151 agentIdPC: 1000151
# agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg agentSecretPC: h4K-GL1y7pCADFZQ7m1tO1GOSa3zU4kGEItFknvwOAg
# agentId: 1000150 agentId: 1000150
# agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc agentSecret: zWIO_kt36d1jta3R76s6WmKFdfs2TuJ1wTQu1IXO0Fc
# backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
# systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,' systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wwc7ae84e6af6ba921&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
#测试服务器 #测试服务器
weixin: #weixin:
corpId: ww348f91b2573c1867 # corpId: ww348f91b2573c1867
agentId: 1000002 # agentId: 1000002
agentIdPC: 1000003 # agentIdPC: 1000003
agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o # agentSecret: gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o
agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A # agentSecretPC: itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A
backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system # backUrl: https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system
systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,' # systemUrl: '<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww348f91b2573c1867&redirect_uri=https%3a%2f%2fccdcmtl.sinoma-tianjin.com%2flab-system%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect">物化检测流程</a>,'
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
<select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.TeamVo"> <select id="getPage" resultType="cn.wise.sc.cement.business.model.vo.TeamVo">
SELECT t.*, tg.name as groupName, SELECT t.*, tg.name as groupName,
m.name as methodName, m.standard as standard, m.number as number,
( (
CASE t.qualifications CASE t.qualifications
WHEN 0 THEN '资质外' WHEN 0 THEN '资质外'
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
h.name as handleName h.name as handleName
FROM team t FROM team t
left join team_group tg on tg.id = t.group_id left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
left join handle h on h.id = t.handle_id left join handle h on h.id = t.handle_id
<include refid="where"/> <include refid="where"/>
ORDER BY t.create_time desc ORDER BY t.create_time desc
...@@ -42,9 +40,8 @@ ...@@ -42,9 +40,8 @@
(@i:=@i+1) as 序号, (@i:=@i+1) as 序号,
t.name as 检测项目, t.name as 检测项目,
IF(ISNULL(tg.name ),'',tg.name ) 所在检测组, IF(ISNULL(tg.name ),'',tg.name ) 所在检测组,
m.name as 检测依据, t.method_name as 检测依据,
t.charge as 收费标准, t.charge as 收费标准,
t.pro_charge as 建议产值,
( (
CASE t.qualifications CASE t.qualifications
WHEN 0 THEN '资质外' WHEN 0 THEN '资质外'
...@@ -54,16 +51,14 @@ ...@@ -54,16 +51,14 @@
) as 资质范围 ) as 资质范围
FROM team t FROM team t
left join team_group tg on tg.id = t.group_id left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
,(select @i:=0)t ,(select @i:=0)t
<include refid="where"/> <include refid="where"/>
</select> </select>
<select id="getList" resultType="cn.wise.sc.cement.business.model.vo.TeamListVo"> <select id="getList" resultType="cn.wise.sc.cement.business.model.vo.TeamListVo">
SELECT t.id as id, t.name as name, t.group_id as groupId, t.method_id as methodId, SELECT t.id as id, t.name as name, t.group_id as groupId, t.method_id as methodId,
m.name as methodName, m.number as number t.method_name as methodName, t.number as number
FROM team t FROM team t
left join method m on m.id = t.method_id
where t.status=1 and t.is_display = 1 where t.status=1 and t.is_display = 1
ORDER BY t.id ASC ORDER BY t.id ASC
</select> </select>
...@@ -71,7 +66,6 @@ ...@@ -71,7 +66,6 @@
<select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.TeamVo"> <select id="getDetail" resultType="cn.wise.sc.cement.business.model.vo.TeamVo">
SELECT t.*, tg.name as groupName, SELECT t.*, tg.name as groupName,
m.name as methodName, m.standard as standard, m.number as number,
( (
CASE t.qualifications CASE t.qualifications
WHEN 0 THEN '资质范围外' WHEN 0 THEN '资质范围外'
...@@ -82,7 +76,6 @@ ...@@ -82,7 +76,6 @@
h.name as handleName h.name as handleName
FROM team t FROM team t
left join team_group tg on tg.id = t.group_id left join team_group tg on tg.id = t.group_id
left join method m on m.id = t.method_id
left join handle h on h.id = t.handle_id left join handle h on h.id = t.handle_id
where t.id = #{id} where t.id = #{id}
</select> </select>
......
...@@ -137,6 +137,7 @@ cn\wise\sc\cement\business\model\BaseController.class ...@@ -137,6 +137,7 @@ cn\wise\sc\cement\business\model\BaseController.class
cn\wise\sc\cement\business\mapper\StandardValueMapper.class cn\wise\sc\cement\business\mapper\StandardValueMapper.class
cn\wise\sc\cement\business\service\impl\SampleCheckServiceImpl.class cn\wise\sc\cement\business\service\impl\SampleCheckServiceImpl.class
cn\wise\sc\cement\business\service\impl\ChinastdcodeServiceImpl.class cn\wise\sc\cement\business\service\impl\ChinastdcodeServiceImpl.class
cn\wise\sc\cement\business\model\vo\InputResultVo.class
cn\wise\sc\cement\business\util\weixin\message\send\BaseMessage.class cn\wise\sc\cement\business\util\weixin\message\send\BaseMessage.class
cn\wise\sc\cement\business\model\query\SampleHandleQuery.class cn\wise\sc\cement\business\model\query\SampleHandleQuery.class
cn\wise\sc\cement\business\controller\SysUserMessageController.class cn\wise\sc\cement\business\controller\SysUserMessageController.class
......
...@@ -234,6 +234,7 @@ D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cemen ...@@ -234,6 +234,7 @@ D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cemen
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\mapper\SysUserMapper.java D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\mapper\SysUserMapper.java
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\service\impl\EntrustApprovalServiceImpl.java D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\service\impl\EntrustApprovalServiceImpl.java
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\entity\Sample.java D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\entity\Sample.java
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\model\vo\InputResultVo.java
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\util\weixin\message\send\VoiceMessage.java D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\util\weixin\message\send\VoiceMessage.java
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\controller\PlanEquipmentPurchaseController.java D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\controller\PlanEquipmentPurchaseController.java
D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\controller\MethodController.java D:\idea_workspases\tianjin-cement\cement-business\src\main\java\cn\wise\sc\cement\business\controller\MethodController.java
......
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