Merge branch 'develop_master' into FOTON
This commit is contained in:
+11
-6
@@ -15,11 +15,8 @@ import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -77,6 +74,14 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "增加意见")
|
||||
@PostMapping("/saveBatch")
|
||||
public ResponseMessage saveBatch(@RequestBody List<SarPublicIdeaAll> sar){
|
||||
boolean flag=sarPublicIdeaAllImpl.saveBatch(sar);
|
||||
return Result.success("200",flag);
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除意见")
|
||||
@GetMapping("/deleteStand")
|
||||
public ResponseMessage deleteStand(DelStandDto delStandDto){
|
||||
@@ -94,7 +99,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
|
||||
@ApiOperation(value = "导出全部意见")
|
||||
@GetMapping("/tuallStand")
|
||||
public void getAllStand(HttpServletResponse response,String cid){
|
||||
public void getAllStand(HttpServletResponse response,@RequestParam(value = "cid")String cid,@RequestParam(value = "type",required = false)String type){
|
||||
try {
|
||||
response.setContentType("application/vnd.ms-excel");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
@@ -102,7 +107,7 @@ public class SarPublicIdeaAllController extends BaseController<SarPublicIdeaAll>
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
List<SarPublicIdeaAll> data=new ArrayList<>();
|
||||
if (!StringUtils.isEmpty(cid)){
|
||||
data=sarPublicIdeaAllDao.getPublicAllIdea(cid);
|
||||
data=sarPublicIdeaAllDao.getPublicAllIdea(cid,type);
|
||||
}
|
||||
List<GetExcelDto> standExcel=new ArrayList<>();
|
||||
for (SarPublicIdeaAll sarPublicIdeaAll:data){
|
||||
|
||||
@@ -27,5 +27,5 @@ public interface SarPublicIdeaAllDao extends BaseMapper<SarPublicIdeaAll> {
|
||||
|
||||
Integer getAllDataByIdeaCount( @Param("ideaId")String ideaId);
|
||||
|
||||
List<SarPublicIdeaAll> getPublicAllIdea(@Param("cid") String cid);
|
||||
List<SarPublicIdeaAll> getPublicAllIdea(@Param("cid") String cid,@Param("type")String type);
|
||||
}
|
||||
|
||||
@@ -72,5 +72,8 @@ public class SarPublicIdea extends BaseEntity {
|
||||
@TableField("files_name")
|
||||
private String filesName;
|
||||
|
||||
@TableField("wkfiles")
|
||||
private String wkfiles;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -63,4 +63,13 @@ public class SarPublicIdeaAll extends BaseEntity {
|
||||
|
||||
public static final String CID = "cid";
|
||||
|
||||
@TableField("chapter_name")
|
||||
private String chapterName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String department;
|
||||
|
||||
@TableField("wk_flag")
|
||||
private String wkFlag;
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -162,7 +162,7 @@ public class SarStandFileEOController extends BaseController<SarStandFileEO> {
|
||||
@GetMapping("/querySourceFileInfo")
|
||||
public ResponseMessage<List<SarStandFileEO>> querySourceFileInfo(String standId){
|
||||
|
||||
List<SarStandFileEO> sarStandFileEOS = sarStandFileEOService.selectFileByStandId(standId);
|
||||
List<SarStandFileEO> sarStandFileEOS = sarStandFileEOService.querySourceFileInfo(standId);
|
||||
return Result.success(sarStandFileEOS);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -38,12 +38,13 @@
|
||||
<!-- 只查询这个部门下的子一级人员-->
|
||||
<select id="selectNextUser" resultMap="TsUser">
|
||||
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
|
||||
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.INSTITUTION_ID,t2.name as INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname,
|
||||
ts_institution.name as unit,ts_institution.id as unitId
|
||||
from ts_user
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
|
||||
WHERE institution_id=#{institutionId}
|
||||
<if test="userName != null and userName != '' ">
|
||||
and ( ts_user.ACCOUNT like concat(concat('%',#{userName}),'%') or ts_user.UNAME like concat(concat('%',#{userName}),'%') )
|
||||
@@ -52,10 +53,11 @@
|
||||
|
||||
<select id="selectNextUserByIds" resultMap="TsUser">
|
||||
select ts_user.EMAIL,ts_user.ACCOUNT,ts_user.CREATION_TIME,ts_user.DISABLE_FLAG,ts_user.EXT_INFO,ts_user.USID,
|
||||
ts_user.INSTITUTION_ID,ts_user.INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.INSTITUTION_ID,ts_institution.name as INSTITUTION_NAME,ts_user.MODIFY_TIME,ts_user.OPER_USER,ts_user.PASSWORD,ts_user.PHONE,
|
||||
ts_user.POSITION_ID,ts_user.POSITION_NAME,ts_user.SEX,ts_user.SSO_ID,ts_user.STATE,ts_user.UNLOCK_FLAG,ts_user.USER_SOURCE,
|
||||
ts_user.USER_TYPE,ts_user.VALID_FLAG,ts_user.WORK_NUM,concat(ts_user.UNAME,concat(concat("(",ts_user.ACCOUNT),")")) as uname
|
||||
from ts_user
|
||||
left join ts_institution on ts_user.INSTITUTION_ID=ts_institution.id
|
||||
WHERE 1=1
|
||||
<if test="ids != null and ids.size()> 0 ">
|
||||
and ts_user.USID in
|
||||
|
||||
+21
-7
@@ -3,33 +3,47 @@
|
||||
<mapper namespace="com.adc.da.slrs.sarStandIdea.dao.SarPublicIdeaAllDao">
|
||||
|
||||
<select id="getPublicIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.* FROM sar_public_idea
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,ts_institution.name as department,sar_public_idea_all.old_text,
|
||||
sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,
|
||||
sar_public_idea_all.chapter_name as chapterName,sar_public_idea_all.wk_flag
|
||||
FROM sar_public_idea
|
||||
INNER JOIN sar_public_idea_all on sar_public_idea_all.idea_id = sar_public_idea.id
|
||||
WHERE sar_public_idea_all.idea_id IS NOT NULL and sar_public_idea.uniques = #{unique}
|
||||
left join ts_user on ts_user.USID = sar_public_idea_all.user_id
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE sar_public_idea_all.idea_id IS NOT NULL and sar_public_idea.uniques = #{unique} and sar_public_idea_all.wk_flag is null
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_user.INSTITUTION_NAME as dept_name,sar_public_idea_all.old_text,
|
||||
SELECT sar_public_idea_all.id,sar_public_idea_all.reason,ts_institution.name as dept_name,sar_public_idea_all.old_text,sar_public_idea_all.wk_flag,
|
||||
sar_public_idea_all.new_text,ts_user.INSTITUTION_ID as dept_id,sar_public_idea_all.part_code,sar_public_idea_all.user_name,
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid
|
||||
sar_public_idea_all.user_id,sar_public_idea_all.content,sar_public_idea_all.idea_id,sar_public_idea_all.cid,sar_public_idea_all.chapter_name as chapterName
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE
|
||||
sar_public_idea_all.idea_id = #{ideaId}
|
||||
sar_public_idea_all.idea_id = #{ideaId} and sar_public_idea_all.wk_flag is null
|
||||
LIMIT ${(page-1)*size},${size}
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdeaCount" resultType="java.lang.Integer">
|
||||
SELECT count(id)
|
||||
FROM sar_public_idea_all WHERE
|
||||
idea_id = #{ideaId}
|
||||
idea_id = #{ideaId} and sar_public_idea_all.wk_flag is null
|
||||
</select>
|
||||
|
||||
<select id="getPublicAllIdea" resultType="com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll">
|
||||
SELECT sar_public_idea_all.id,reason,ts_user.INSTITUTION_NAME as deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid
|
||||
SELECT sar_public_idea_all.id,reason,ts_institution.name as deptName,old_text,new_text,dept_id,part_code,user_name,user_id,content,idea_id,cid,chapter_name,wk_flag
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on ts_user.USID=sar_public_idea_all.user_id
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
WHERE cid = #{cid}
|
||||
<if test="null==type or ''==type">
|
||||
and sar_public_idea_all.wk_flag is null
|
||||
</if>
|
||||
<if test="null!=type and type != ''">
|
||||
and sar_public_idea_all.wk_flag =='1'
|
||||
</if>
|
||||
ORDER BY part_code ASC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+2
-1
@@ -61,7 +61,7 @@
|
||||
c.*
|
||||
FROM
|
||||
(
|
||||
SELECT b.*,sar_standards_info.STAND_TYPE as standType , ts_user.UNAME as dutyEngineerName , ts_user.INSTITUTION_NAME as responsibleUnit FROM (
|
||||
SELECT b.*,sar_standards_info.STAND_TYPE as standType , ts_user.UNAME as dutyEngineerName , ts_institution.name as responsibleUnit FROM (
|
||||
SELECT (@i:=@i+1) as rows,sar_stand_unqualified.* FROM
|
||||
sar_stand_unqualified,(SELECT @i:=0)j
|
||||
WHERE
|
||||
@@ -84,6 +84,7 @@
|
||||
)b
|
||||
left join sar_standards_info on b.STAND_ID = sar_standards_info.id
|
||||
left join ts_user on ts_user.USID = b.DUTY_ENGINEER
|
||||
left join ts_institution on ts_institution.id=ts_user.INSTITUTION_ID
|
||||
)c
|
||||
ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.ITEMS_NUM,1,(SELECT LOCATE('.',CONCAT(c.ITEMS_NUM,'.')))),SIGNED) ,c.rows
|
||||
</select>
|
||||
|
||||
@@ -4,20 +4,22 @@
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName ,ts_institution.name as unitName , ts_institution.id as unit
|
||||
,t2.name as deptName ,ts_institution.name as unitName , ts_institution.id as unit
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
|
||||
where wg_dept.wg_id =#{data}
|
||||
</select>
|
||||
|
||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,concat(ts_user.UNAME,concat('(',concat(ts_user.USID,')'))) as name ,wg_dept.PHONE as phone ,wg_dept.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName ,ts_institution.name as unit , ts_institution.id as unitId
|
||||
,t2.name as deptName ,ts_institution.name as unit , ts_institution.id as unitId
|
||||
from wg_dept
|
||||
left join ts_user on ts_user.ACCOUNT = wg_dept.dept_people_id
|
||||
left join wg_work_group on wg_work_group.id = wg_dept.wg_id
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE id = ts_user.INSTITUTION_ID)
|
||||
left join ts_institution t2 on t2.id=ts_user.INSTITUTION_ID
|
||||
where wg_work_group.type = #{type}
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user