Merge branch 'develop_master' into FOTON
This commit is contained in:
@@ -37,6 +37,15 @@ public interface workFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/busProcessModel/processModelHisOne",method = RequestMethod.GET)
|
||||
BusProcessModelHis processModelHisOne(@RequestParam("pid") String pid, @RequestParam("taskId") String taskId);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/busProcessEvaluation/evaluationHisListByOne",method = RequestMethod.GET)
|
||||
BusProcessEvaluationHis evaluationHisListByOne(@RequestParam("pid") String pid,@RequestParam("taskInfo") String taskInfo);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/busProcessEvaluation/evaluationHisListRepSum",method = RequestMethod.GET)
|
||||
Map<String,Integer> evaluationHisListRepSum(@RequestParam("pid") String pid);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/busProcessEvaluation/evaluationHisListRep",method = RequestMethod.GET)
|
||||
List<BusProcessEvaluationHis> evaluationHisListRep(@RequestParam("pid") String pid);
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/busProcessEvaluation/evaluationHisList",method = RequestMethod.GET)
|
||||
List<BusProcessEvaluationHis> evaluationHisList(@RequestParam("pid") String pid);
|
||||
|
||||
|
||||
@@ -55,6 +55,21 @@ public class workFlowFeignClientImpl {
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
public BusProcessEvaluationHis evaluationHisListByOne(@RequestParam("pid") String pid,@RequestParam("taskInfo") String taskInfo){
|
||||
BusProcessEvaluationHis stringWrapper = workFlowFeignClient.evaluationHisListByOne(pid,taskInfo);
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
public Map<String,Integer> evaluationHisListRepSum(@RequestParam("pid") String pid){
|
||||
Map<String,Integer> stringWrapper = workFlowFeignClient.evaluationHisListRepSum(pid);
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
public List<BusProcessEvaluationHis> evaluationHisListRep(@RequestParam("pid") String pid){
|
||||
List<BusProcessEvaluationHis> stringWrapper = workFlowFeignClient.evaluationHisListRep(pid);
|
||||
return stringWrapper;
|
||||
}
|
||||
|
||||
public List<BusProcessEvaluationHis> evaluationHisList(@RequestParam("pid") String pid){
|
||||
List<BusProcessEvaluationHis> stringWrapper = workFlowFeignClient.evaluationHisList(pid);
|
||||
return stringWrapper;
|
||||
|
||||
@@ -170,6 +170,24 @@ public class WorkFlowController {
|
||||
return workFlowFeignClient.processModelHisOne(pid,taskId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据pid 节点信息查询")
|
||||
@GetMapping("/evaluationHisListByOne")
|
||||
public BusProcessEvaluationHis evaluationHisListByOne(@RequestParam("pid") String pid,@RequestParam("taskInfo") String taskInfo){
|
||||
return workFlowFeignClient.evaluationHisListByOne(pid,taskInfo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询流程父节点所有评分(去重)返回节点评分总数")
|
||||
@GetMapping("/evaluationHisListRepSum")
|
||||
public Map<String,Integer> evaluationHisListRepSum(@RequestParam("pid") String pid){
|
||||
return workFlowFeignClient.evaluationHisListRepSum(pid);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询流程父节点所有评分(去重)")
|
||||
@GetMapping("/evaluationHisListRep")
|
||||
public List<BusProcessEvaluationHis> evaluationHisListRep(@RequestParam("pid") String pid){
|
||||
return workFlowFeignClient.evaluationHisListRep(pid);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询流程父节点所有评分")
|
||||
@GetMapping("/evaluationHisList")
|
||||
public List<BusProcessEvaluationHis> evaluationHisList(@RequestParam("pid") String pid){
|
||||
|
||||
+3
-1
@@ -86,5 +86,7 @@ public class BusProcessEvaluationHis implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String downLoadUrl;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "处理人姓名")
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
}
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ public class ActSarItemsBussEOService {
|
||||
|
||||
// 按 相同数据分组
|
||||
listMap = evaluationHisFilter.stream().collect(
|
||||
Collectors.groupingBy(a -> Utils.format("{0}#{1}", a.getPId(),a.getTaskInfo())));
|
||||
Collectors.groupingBy(a -> Utils.format("{0}#{1}#{2}", a.getPId(),a.getTaskInfo(),a.getUserId())));
|
||||
|
||||
List<QualityEvaluation> evaluations = new ArrayList<>();
|
||||
if(!listMap.isEmpty()){
|
||||
|
||||
+1
-1
@@ -135,4 +135,4 @@
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -61,4 +61,7 @@ public class SarStandMenu extends BaseEntity {
|
||||
@TableField(exist = false)
|
||||
private String menuName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String standCode;
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -108,4 +108,9 @@ public class SarStandardsInfoEOPage extends BasePage {
|
||||
* 标准添加到体系中的id多个
|
||||
*/
|
||||
private String menuIds;
|
||||
|
||||
/**
|
||||
* 标准号
|
||||
*/
|
||||
private String standCode;
|
||||
}
|
||||
|
||||
+63
-5
@@ -1,6 +1,8 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.slrs.sarPosition.entity.TsPosition;
|
||||
import com.adc.da.slrs.sarPosition.service.ITsPositionService;
|
||||
import com.adc.da.slrs.sarStandWarning.dao.WarningDateDao;
|
||||
@@ -814,6 +816,10 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandardsInfoEO.setCreationTime(new Date());
|
||||
sarStandardsInfoEO.setModifyTime(new Date());
|
||||
//根据新建标准所在目录,确定此处是否需要在标准目录关联表中插入数据
|
||||
|
||||
//当代替标准号在我的收藏中时此标准也关联到我的收藏中
|
||||
associatedCollection(sarStandardsInfoEO);
|
||||
|
||||
if (StringUtils.isNotEmpty(sarStandardsInfoEO.getMenuIds())) {
|
||||
|
||||
for (String menuId : sarStandardsInfoEO.getMenuIds().split(",")) {
|
||||
@@ -1411,8 +1417,57 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandardsInfoEO.setStandState(resultState);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoEOService;
|
||||
|
||||
private void associatedCollection(SarStandardsInfo standInfo){
|
||||
/**
|
||||
* 获取代替标准号
|
||||
* 判断getAttrInfoMap, dtbzh.get("DTBJH") 不为空
|
||||
*/
|
||||
|
||||
String DTBJH = Optional.ofNullable(standInfo)
|
||||
.flatMap(standEO -> Optional.ofNullable(JSONObject.fromObject(standEO.getSarStandAttrEOStr())))
|
||||
.flatMap(attrMap -> Optional.ofNullable(attrMap.get("DTBJH")))
|
||||
.map(str -> str.toString())
|
||||
.orElse("");
|
||||
|
||||
if (!"".equals(DTBJH)){
|
||||
|
||||
for (String s : DTBJH.split(",")) {
|
||||
|
||||
/**
|
||||
* 以逗号分割的代替标准号,只要其中一个存在于我的收藏之中,此标准就插入我的收藏
|
||||
*/
|
||||
|
||||
StandInfo query = new StandInfo();
|
||||
|
||||
//用户id
|
||||
query.setUserId(LoginUserUtil.getUserId());
|
||||
query.setStandCode(s);
|
||||
if (personCollectEOService.countPersonCollectByStandInfo(query)>0){
|
||||
|
||||
TsPersonCollect tsPersonCollect = new TsPersonCollect();
|
||||
tsPersonCollect.setId(UUIDUtils.randomUUID20());
|
||||
tsPersonCollect.setValidFlag(0);
|
||||
tsPersonCollect.setCreationTime(new Date());
|
||||
tsPersonCollect.setModifyTime(new Date());
|
||||
tsPersonCollect.setCollectResId(standInfo.getId());
|
||||
tsPersonCollect.setCollectType(standInfo.getStandType()+"_STAND");
|
||||
tsPersonCollect.setCollectTitle(standInfo.getStandName() +"(编号:"+ standInfo.getStandSort()+" "+standInfo.getStandNumber()+"-"+standInfo.getStandYear()+ ")");
|
||||
tsPersonCollect.setUserId(LoginUserUtil.getUserId());
|
||||
QueryWrapper<TsPersonCollect> ew = new QueryWrapper<>();
|
||||
ew.eq("COLLECT_RES_ID",standInfo.getId())
|
||||
.eq("VALID_FLAG",'0');
|
||||
personCollectEOService.saveOrUpdate(tsPersonCollect,ew);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
@@ -1466,8 +1521,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
sarStandAttrInfoEODao.deleteStandAttrByStandId(standId);
|
||||
createStandAttrInfo(sarStandardsInfoEO);
|
||||
/**
|
||||
* 编辑体系目录
|
||||
* 编辑体系目录 当代替的标准号在我的收藏中时,此条标准也需要在我的收藏中
|
||||
*/
|
||||
//当代替标准号在我的收藏中时此标准也关联到我的收藏中
|
||||
associatedCollection(sarStandardsInfoEO);
|
||||
|
||||
|
||||
if (StringUtils.isNotEmpty(sarStandardsInfoEO.getMenuIds())) {
|
||||
|
||||
@@ -1478,9 +1536,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
|
||||
|
||||
try {
|
||||
sarStandardsInfoEOService.updateStandardsMenu(standardsInfoEO);
|
||||
updateStandardsMenu(standardsInfoEO);
|
||||
}catch (NullPointerException e){
|
||||
sarStandardsInfoEOService.updateStandInfo(standardsInfoEO);
|
||||
updateStandInfo(standardsInfoEO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
where stand_id = #{standId} and valid_flag=0
|
||||
</select>
|
||||
<select id="getMenuByStandId" resultType="com.adc.da.slrs.sarStandMenu.entity.SarStandMenu">
|
||||
SELECT
|
||||
SELECT
|
||||
SAR_STAND_MENU.valid_flag as validFlag,
|
||||
menu_id as menuId,
|
||||
stand_id as standId,
|
||||
@@ -92,9 +92,55 @@
|
||||
FROM
|
||||
SAR_STAND_MENU
|
||||
LEFT JOIN ts_resource ON SAR_STAND_MENU.MENU_ID = ts_resource.ID
|
||||
WHERE
|
||||
stand_id = #{standId}
|
||||
AND SAR_STAND_MENU.VALID_FLAG = 0
|
||||
<where>
|
||||
SAR_STAND_MENU.VALID_FLAG = 0
|
||||
<if test="standId !=null and stand != ''">
|
||||
AND stand_id = #{standId}
|
||||
</if>
|
||||
|
||||
<if test="standCode !=null and standCode != ''">
|
||||
AND STAND_ID =
|
||||
(
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
sar_standards_info AS sarInfo
|
||||
WHERE
|
||||
VALID_FLAG = '0'
|
||||
AND
|
||||
(
|
||||
(
|
||||
REPLACE (
|
||||
concat(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
'-',
|
||||
sarInfo.STAND_YEAR
|
||||
),
|
||||
' ',
|
||||
''
|
||||
) = REPLACE (
|
||||
#{standCode},' ', '')
|
||||
AND sarInfo.STAND_YEAR != ''
|
||||
)
|
||||
OR (
|
||||
REPLACE (
|
||||
concat(
|
||||
sarInfo.STAND_SORT,
|
||||
sarInfo.STAND_NUMBER
|
||||
),
|
||||
' ',
|
||||
''
|
||||
) = REPLACE (#{standCode},' ', '')
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.person.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -38,4 +39,5 @@ public interface PersonCollectEODao extends BaseMapper<TsPersonCollect> {
|
||||
|
||||
int updateByPrimaryKeySelective(TsPersonCollect tsPersonCollect);
|
||||
|
||||
int countPersonCollectByStandInfo(StandInfo standInfo);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.adc.da.person.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StandInfo {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String standCode;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.person.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -29,4 +30,10 @@ public interface IPersonCollectEOService extends IService<TsPersonCollect> {
|
||||
|
||||
public ResponseMessage<IPage<TsPersonCollect>> queryCollectByWrapper(Integer pageNo, Integer pageSize, String collectTitle,String modeType, String userId);
|
||||
|
||||
/**
|
||||
* 通过标准号和用户id查询是否收藏此标准
|
||||
* @param standInfo
|
||||
* @return
|
||||
*/
|
||||
public int countPersonCollectByStandInfo(StandInfo standInfo);
|
||||
}
|
||||
|
||||
+6
@@ -5,6 +5,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonNoteEODao;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.entity.PersonNoteEO;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
@@ -156,4 +157,9 @@ public class PersonCollectEOServiceImpl extends ServiceImpl<PersonCollectEODao,
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countPersonCollectByStandInfo(StandInfo standInfo) {
|
||||
return personCollectEODao.countPersonCollectByStandInfo(standInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -403,4 +403,51 @@
|
||||
from ts_pserson_collect
|
||||
where collect_type=#{c}
|
||||
</select>
|
||||
<select id="countPersonCollectByStandInfo" resultType="java.lang.Integer">
|
||||
SELECT COUNT(1)
|
||||
from
|
||||
ts_person_collect
|
||||
WHERE
|
||||
VALID_FLAG ='0'
|
||||
AND USER_ID = #{userId}
|
||||
AND COLLECT_RES_ID =
|
||||
|
||||
(
|
||||
SELECT
|
||||
id
|
||||
FROM
|
||||
sar_standards_info AS sarInfo
|
||||
WHERE
|
||||
VALID_FLAG = '0'
|
||||
AND
|
||||
(
|
||||
(
|
||||
REPLACE (
|
||||
concat(
|
||||
sarInfo.STAND_SORT,
|
||||
' ',
|
||||
sarInfo.STAND_NUMBER,
|
||||
'-',
|
||||
sarInfo.STAND_YEAR
|
||||
),
|
||||
' ',
|
||||
''
|
||||
) = REPLACE (
|
||||
#{standCode},' ', '')
|
||||
AND sarInfo.STAND_YEAR != ''
|
||||
)
|
||||
OR (
|
||||
REPLACE (
|
||||
concat(
|
||||
sarInfo.STAND_SORT,
|
||||
sarInfo.STAND_NUMBER
|
||||
),
|
||||
' ',
|
||||
''
|
||||
) = REPLACE ( #{standCode},' ', '')
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user