Merge remote-tracking branch 'origin/develop_master' into develop_3
# Conflicts: # adc-da-activiti/src/main/java/com/adc/da/FeignClient/workFlowFeignClient.java # adc-da-activiti/src/main/java/com/adc/da/workFlow/controller/WorkFlowController.java
This commit is contained in:
@@ -409,6 +409,6 @@ public interface workFlowFeignClient {
|
||||
@RequestMapping(value = "/bat-wkflow/datas/bus-process-new/everyDayTenOlockSAM",method = RequestMethod.GET)
|
||||
List<BusProcessNew> everyDayTenOlockSAM();
|
||||
|
||||
@RequestMapping(value = "/bat-wkflow/delCG",method = RequestMethod.GET)
|
||||
@RequestMapping(value = "/bat-wkflow/delCG",method = RequestMethod.POST)
|
||||
String delCG(@RequestParam("id") String id);
|
||||
}
|
||||
|
||||
+1
-1
@@ -689,7 +689,7 @@ public class WorkFlowController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "草稿删除")
|
||||
@GetMapping("/delCG")
|
||||
@PostMapping("/delCG")
|
||||
public String delCG(@RequestParam("id")String id){
|
||||
return workFlowFeignClient.delCG(id);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ProcessDetailExport {
|
||||
private Date startTime;
|
||||
@Excel(name = "完成时间", orderNum = "4",exportFormat = "yyyy/MM/dd",width = 15)
|
||||
private Date endTime;
|
||||
@Excel(name = "审批意见", orderNum = "5",width = 15)
|
||||
@Excel(name = "流程信息", orderNum = "5",width = 15)
|
||||
private String comment;
|
||||
@Excel(name = "状态", orderNum = "6",width = 15)
|
||||
private String flag;
|
||||
|
||||
@@ -118,4 +118,12 @@ public class TsUserVO {
|
||||
@ApiModelProperty(value = "岗位")
|
||||
@TableField(exist = false)
|
||||
private List<TsPosition> positions;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
@TableField(exist = false)
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位Id")
|
||||
@TableField(exist = false)
|
||||
private String unitId;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.adc.da.slrs.sarStandIdea.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandIdea.entity.SarPublicIdeaAll;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -21,4 +22,8 @@ import java.util.List;
|
||||
public interface SarPublicIdeaAllDao extends BaseMapper<SarPublicIdeaAll> {
|
||||
|
||||
List<SarPublicIdeaAll> getPublicIdea(@Param("unique")String unique);
|
||||
|
||||
List<SarPublicIdeaAll> getAllDataByIdea(@Param("page")Integer page,@Param("size")Integer size, @Param("ideaId")String ideaId);
|
||||
|
||||
Integer getAllDataByIdeaCount( @Param("ideaId")String ideaId);
|
||||
}
|
||||
|
||||
+7
-4
@@ -48,10 +48,13 @@ public class SarPublicIdeaAllServiceImpl extends ServiceImpl<SarPublicIdeaAllDao
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
QueryWrapper<SarPublicIdeaAll> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq("idea_id", detAllStandDto.getIdeaId());
|
||||
Page<SarPublicIdeaAll> page = new Page<>(detAllStandDto.getPage(), detAllStandDto.getSize());
|
||||
IPage<SarPublicIdeaAll> userIPage = sarPublicIdeaAllDao.selectPage(page, wrapper);
|
||||
List<SarPublicIdeaAll> sarPublicIdeaAlls=sarPublicIdeaAllDao.getAllDataByIdea(detAllStandDto.getPage(),detAllStandDto.getSize(),detAllStandDto.getIdeaId());
|
||||
Integer a=sarPublicIdeaAllDao.getAllDataByIdeaCount(detAllStandDto.getIdeaId());
|
||||
Page userIPage=new Page();
|
||||
userIPage.setTotal(a);
|
||||
userIPage.setRecords(sarPublicIdeaAlls);
|
||||
userIPage.setSize(detAllStandDto.getSize());
|
||||
userIPage.setCurrent(detAllStandDto.getPage());
|
||||
System.out.println("总条数" + userIPage.getTotal());
|
||||
System.out.println("总页数" + userIPage.getPages());
|
||||
List<SarPublicIdeaAll> list = userIPage.getRecords();
|
||||
|
||||
+6
-14
@@ -234,20 +234,12 @@ public class SarStandardComplianceAssessResultController {
|
||||
public ResponseMessage<Object> selectNationalStandard(InterpretationEO eo) throws Exception {
|
||||
if (eo.getPosition() == 1) {
|
||||
IPage<SarInterpretationNationalStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarInterpretationNationalStandard> queryWrapper = new QueryWrapper<>();
|
||||
//如果查询条件里标准编号不为空,查询
|
||||
if (eo.getStandNumber() != null) queryWrapper.like("STAND_NUMBER",eo.getStandNumber());
|
||||
//如果查询条件里标准名称不为空,查询
|
||||
if (eo.getStandName() != null) queryWrapper.like("STAND_NAME",eo.getStandName());
|
||||
//如果查询条件里具体章条不为空,查询
|
||||
if (eo.getSpecificItem() != null) queryWrapper.like("specific_item",eo.getSpecificItem());
|
||||
|
||||
if (eo.getInterpretationTime() != null) queryWrapper.eq("INTERPRETATION_TIME", eo.getInterpretationTime());
|
||||
if (eo.getStandId() != null) queryWrapper.eq("STAND_ID", eo.getStandId());
|
||||
|
||||
IPage<SarInterpretationNationalStandard> page = iSarInterpretationNationalStandardService.page(iPage, queryWrapper);
|
||||
while (page.getRecords().remove(null)) ;
|
||||
return Result.success(page);
|
||||
List<SarInterpretationNationalStandard> standards=iSarInterpretationNationalStandardService.getAllDatas(eo);
|
||||
Integer datasCount=iSarInterpretationNationalStandardService.getAllDatasCount(eo);
|
||||
iPage.setTotal(datasCount);
|
||||
iPage.setRecords(standards);
|
||||
while (iPage.getRecords().remove(null)) ;
|
||||
return Result.success(iPage);
|
||||
} else {
|
||||
IPage<SarInterpretationForeignStandard> iPage = new Page<>(eo.getCurrent(), eo.getSize());
|
||||
QueryWrapper<SarInterpretationForeignStandard> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
+7
@@ -1,9 +1,12 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.InterpretationEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
@@ -16,4 +19,8 @@ public interface SarInterpretationNationalStandardDao extends BaseMapper<SarInte
|
||||
|
||||
boolean updateData(@Param("find") SarInterpretationNationalStandard findStandDto);
|
||||
|
||||
List<SarInterpretationNationalStandard> getAllDatas(InterpretationEO sarInterpretationNationalStandard);
|
||||
|
||||
Integer getAllDatasCout(InterpretationEO sarInterpretationNationalStandard);
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.InterpretationEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
@@ -18,4 +19,8 @@ public interface ISarInterpretationNationalStandardService extends IService<SarI
|
||||
String saveBath(List<SarInterpretationNationalStandard> sarInterpretationNationalStandards);
|
||||
|
||||
boolean updateData(SarInterpretationNationalStandard findStandDto);
|
||||
|
||||
List<SarInterpretationNationalStandard> getAllDatas(InterpretationEO sarInterpretationNationalStandard);
|
||||
|
||||
Integer getAllDatasCount(InterpretationEO sarInterpretationNationalStandard);
|
||||
}
|
||||
|
||||
+11
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.slrs.sarStandardComplianceAssessResult.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarStandardComplianceProductAssessDao;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.InterpretationEO;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.dao.SarInterpretationNationalStandardDao;
|
||||
import com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarStandardComplianceProductAssess;
|
||||
@@ -55,4 +56,14 @@ public class SarInterpretationNationalStandardServiceImpl extends ServiceImpl<Sa
|
||||
public boolean updateData(SarInterpretationNationalStandard findStandDto) {
|
||||
return sarInterpretationNationalStandardDao.updateData(findStandDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SarInterpretationNationalStandard> getAllDatas(InterpretationEO sarInterpretationNationalStandard) {
|
||||
return sarInterpretationNationalStandardDao.getAllDatas(sarInterpretationNationalStandard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getAllDatasCount(InterpretationEO sarInterpretationNationalStandard) {
|
||||
return sarInterpretationNationalStandardDao.getAllDatasCout(sarInterpretationNationalStandard);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -383,6 +383,7 @@ public class SarFileSplitMenuEOServiceImpl implements SarFileSplitMenuEOService
|
||||
sarFileSplitItemsEO.setModifyTime(new Date());
|
||||
sarFileSplitItemsEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
sarFileSplitItemsEO.setModifyUser(LoginUserUtil.getUserId());
|
||||
sarFileSplitItemsEO.setEditFlag(String.valueOf(UUID.randomUUID()));
|
||||
result += sarFileSplitItemsEODao.insertSelective(sarFileSplitItemsEO);
|
||||
|
||||
// SAR_FILE_ITEMS_VAL 添加数据,
|
||||
|
||||
@@ -58,5 +58,12 @@ public class WgDept extends BaseEntity {
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
}
|
||||
|
||||
@@ -44,5 +44,14 @@ public class WgNetInfo extends BaseEntity {
|
||||
@TableField("join_id")
|
||||
private String joinId;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
-2
@@ -40,9 +40,11 @@
|
||||
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.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_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
|
||||
WHERE institution_id=#{institutionId}
|
||||
left join ts_institution ON ts_institution.id = (SELECT parent_id from ts_institution WHERE 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}),'%') )
|
||||
</if>
|
||||
|
||||
@@ -7,4 +7,21 @@
|
||||
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}
|
||||
</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,
|
||||
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
|
||||
FROM sar_public_idea_all
|
||||
left join ts_user on sar_public_idea_all.user_id=ts_user.USID
|
||||
WHERE
|
||||
sar_public_idea_all.idea_id = #{ideaId}
|
||||
LIMIT ${(page-1)*size},${page*size}
|
||||
</select>
|
||||
|
||||
<select id="getAllDataByIdeaCount" resultType="java.lang.Integer">
|
||||
SELECT count(id)
|
||||
FROM sar_public_idea_all WHERE
|
||||
idea_id = #{ideaId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+71
@@ -14,4 +14,75 @@
|
||||
and sar_interpretation_national_standard.STAND_NAME=#{find.standName}
|
||||
and sar_interpretation_national_standard.INTERPRETATION_TIME = #{find.interpretationTime}
|
||||
</update>
|
||||
|
||||
<select id="getAllDatas"
|
||||
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.SarInterpretationNationalStandard">
|
||||
|
||||
SELECT c.* FROM (
|
||||
SELECT
|
||||
(@i:=@i+1) as rows,
|
||||
id,
|
||||
INTERPRETATION_TIME,
|
||||
STAND_NUMBER,
|
||||
specific_item,
|
||||
compared_with_previous,
|
||||
CREATION_USER,
|
||||
CREATION_TIME,
|
||||
VALID_FLAG,
|
||||
LAST_VERSION_NUMBER,
|
||||
risk_degree,
|
||||
compliance_state,
|
||||
INTERPRETATION_STATE,
|
||||
STAND_TYPE,
|
||||
MODIFY_TIME,
|
||||
STAND_SORT,
|
||||
STAND_ID,
|
||||
STAND_NAME,
|
||||
core_technical_requirement
|
||||
FROM
|
||||
sar_interpretation_national_standard ,(SELECT @i:=0)j
|
||||
WHERE
|
||||
1=1
|
||||
<if test="interpretationTime!=null ">
|
||||
and INTERPRETATION_TIME = #{interpretationTime}
|
||||
</if>
|
||||
<if test="standId!=null and standId!=''">
|
||||
AND STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="standNumber!=null and standNumber!=''">
|
||||
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName!=null and standName!=''">
|
||||
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="specificItem!=null and specificItem!=''">
|
||||
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
||||
</if>
|
||||
ORDER BY STAND_ID, specific_item
|
||||
LIMIT ${(current-1)*size},${current*size}
|
||||
) c ORDER BY c.STAND_ID, CONVERT(SUBSTRING(c.specific_item,1,(SELECT LOCATE('.',CONCAT(c.specific_item,'.')))),SIGNED) ,rows
|
||||
</select>
|
||||
<select id="getAllDatasCout" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(id)
|
||||
FROM
|
||||
sar_interpretation_national_standard
|
||||
WHERE
|
||||
1=1
|
||||
<if test="interpretationTime!=null ">
|
||||
and INTERPRETATION_TIME = #{interpretationTime}
|
||||
</if>
|
||||
<if test="standId!=null and standId!=''">
|
||||
AND STAND_ID = #{standId}
|
||||
</if>
|
||||
<if test="standNumber!=null and standNumber!=''">
|
||||
AND STAND_NUMBER like concat(concat('%',#{standNumber}),'%')
|
||||
</if>
|
||||
<if test="standName!=null and standName!=''">
|
||||
AND STAND_NAME like concat(concat('%',#{standName}),'%')
|
||||
</if>
|
||||
<if test="specificItem!=null and specificItem!=''">
|
||||
AND specific_item like concat(concat('%',#{specificItem}),'%')
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -205,7 +205,7 @@
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="modifyUser != null" >modify_user,</if>
|
||||
|
||||
<if test="editFlag != null" >edit_flag,</if>
|
||||
<if test="fo != null" >fo,</if>
|
||||
<if test="dutyEngineer != null" >duty_engineer,</if>
|
||||
<if test="claimType != null" >claim_type,</if>
|
||||
@@ -233,7 +233,7 @@
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyUser != null" >#{modifyUser, jdbcType=VARCHAR},</if>
|
||||
|
||||
<if test="editFlag != null" >#{editFlag,jdbcType=VARCHAR}</if>
|
||||
<if test="fo != null" >#{fo, jdbcType=VARCHAR},</if>
|
||||
<if test="dutyEngineer != null" >#{dutyEngineer, jdbcType=VARCHAR},</if>
|
||||
<if test="claimType != null" >#{claimType, jdbcType=VARCHAR},</if>
|
||||
|
||||
@@ -3,19 +3,21 @@
|
||||
<mapper namespace="com.adc.da.slrs.wgDept.dao.WgDeptDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
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
|
||||
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)
|
||||
where wg_dept.wg_id =#{data}
|
||||
</select>
|
||||
|
||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgDept.entity.WgDeptShow">
|
||||
select wg_dept.* ,ts_user.UNAME as name ,ts_user.PHONE as phone ,ts_user.EMAIL as email,ts_user.INSTITUTION_ID as deptId
|
||||
,ts_user.INSTITUTION_NAME as deptName
|
||||
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
|
||||
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)
|
||||
where wg_work_group.type = #{type}
|
||||
</select>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.adc.da.slrs.wgNetInfo.dao.WgNetInfoDao">
|
||||
|
||||
<select id="researchDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,ts_user.PHONE as phone, ts_user.EMAIL as email
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
|
||||
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
|
||||
from wg_net_info
|
||||
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
|
||||
@@ -11,7 +11,7 @@
|
||||
</select>
|
||||
|
||||
<select id="researchAllDatas" resultType="com.adc.da.slrs.wgNetInfo.entity.WgNetInfoDTO">
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,ts_user.PHONE as phone, ts_user.EMAIL as email
|
||||
select wg_net_info.net_id,ts_user.UNAME as name ,wg_net_info.PHONE as phone, wg_net_info.EMAIL as email
|
||||
,wg_net_info.id,wg_net_info.wg_id , wg_net_info.join_id
|
||||
from wg_net_info
|
||||
left join ts_user on ts_user.ACCOUNT = wg_net_info.net_id
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
and name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="project_id != null and project_id != ''">
|
||||
and project_id = #{project_id}
|
||||
and project_id = #{projectId}
|
||||
</if>
|
||||
<if test="project_name != null and project_name != ''">
|
||||
and project_name = #{project_name}
|
||||
@@ -111,7 +111,7 @@
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="project_id != null and project_id != ''">
|
||||
project_id = #{project_id},
|
||||
project_id = #{projectId},
|
||||
</if>
|
||||
<if test="project_name != null and project_name != ''">
|
||||
project_name = #{project_name},
|
||||
@@ -254,7 +254,7 @@
|
||||
#{name},
|
||||
</if>
|
||||
<if test="project_id != null and project_id != ''">
|
||||
#{project_id},
|
||||
#{projectId},
|
||||
</if>
|
||||
<if test="project_name != null and project_name != ''">
|
||||
#{project_name},
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.adc.da.ocr.service.OCRRestfulService;
|
||||
import com.adc.da.ocr.service.OcrRecordEOService;
|
||||
import com.adc.da.ocr.util.MD5Util;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -107,11 +108,13 @@ public class OCRRestfulController extends BaseController<OcrRecordEO> {
|
||||
page.setOrder("desc");
|
||||
}
|
||||
List<OcrRecordEO> rows = ocrRecordEOService.queryByPage(page);
|
||||
Integer integer = ocrRecordEOService.queryByPageCount(page);
|
||||
DecimalFormat df = new DecimalFormat("0.00");//设置保留位数
|
||||
for (OcrRecordEO ocrRecordEO : rows){
|
||||
ocrRecordEO.setDocRealFile(ocrDownPath+ocrRecordEO.getDocRealName());
|
||||
ocrRecordEO.setJsonRealFile(ocrDownPath+ocrRecordEO.getJsonRealName());
|
||||
}
|
||||
page.getPager().setRowCount(integer);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ public interface OcrRecordEODao extends BaseMapper<OcrRecordEO> {
|
||||
// int deleteByIds(@Param("idList") List<String> idList);
|
||||
|
||||
List<OcrRecordEO> queryByPage(BasePage var1);
|
||||
Integer queryByPageCount(BasePage var1);
|
||||
|
||||
int insertSelective(OcrRecordEO ocrRecordEO);
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ public interface OcrRecordEOService {
|
||||
|
||||
List<OcrRecordEO> queryByPage(OcrRecordEOPage page);
|
||||
|
||||
Integer queryByPageCount(OcrRecordEOPage page);
|
||||
|
||||
int updateByPrimaryKeySelective(OcrRecordEO ocrRecordEO);
|
||||
|
||||
int deleteByIds(List<String> idList);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
|
||||
String saveWordFileName=null;
|
||||
logger.info("将文件保存至本地");
|
||||
if(wordFile!=null && !wordFile.isEmpty()){
|
||||
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename();
|
||||
saveWordFileName=UUIDUtils.randomUUID20()+"_"+wordFile.getOriginalFilename().replace("/","_");
|
||||
saveWordFilePath=ocrFilePath+saveWordFileName;
|
||||
logger.info(saveWordFilePath);
|
||||
//生成保存文件
|
||||
@@ -175,12 +175,12 @@ public class OCRRestfulServiceImpl implements OCRRestfulService {
|
||||
String saveJsonFilePath=null;
|
||||
String saveJsonFileName=null;
|
||||
if(jsonFile!=null && !jsonFile.isEmpty()){
|
||||
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename();
|
||||
saveJsonFileName=UUIDUtils.randomUUID20()+"_"+jsonFile.getOriginalFilename().replace("/","_");
|
||||
saveJsonFilePath=ocrFilePath+saveJsonFileName;
|
||||
logger.info(saveJsonFilePath);
|
||||
File saveJsonFile = new File(saveJsonFilePath);
|
||||
System.out.println(saveJsonFile);
|
||||
wordFile.transferTo(saveJsonFile);
|
||||
jsonFile.transferTo(saveJsonFile);
|
||||
// FileUtils.copyInputStreamToFile(jsonFile.getInputStream(),new File(saveJsonFilePath));
|
||||
// savePic(jsonFile.getInputStream(),saveJsonFilePath);
|
||||
logger.info("Json存储完成");
|
||||
|
||||
@@ -26,6 +26,11 @@ public class OcrRecordEOServiceImpl implements OcrRecordEOService {
|
||||
return ocrRecordEODao.queryByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer queryByPageCount(OcrRecordEOPage page) {
|
||||
return ocrRecordEODao.queryByPageCount(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(OcrRecordEO ocrRecordEO) {
|
||||
return ocrRecordEODao.updateByPrimaryKeySelective(ocrRecordEO);
|
||||
|
||||
@@ -221,6 +221,20 @@
|
||||
) tmp_tb limit ${pager.startIndex-1},${pageSize}) a
|
||||
</select>
|
||||
|
||||
<select id="queryByPageCount" parameterType="com.adc.da.base.page.BasePage" resultType="java.lang.Integer">
|
||||
select count(id) from
|
||||
(select tmp_tb.* from
|
||||
(select <include refid="Base_Column_List" />,(UNIX_TIMESTAMP(modify_time)-UNIX_TIMESTAMP(creation_time)) as spendTime from OCR_RECORD
|
||||
<include refid="Base_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''" >
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
<if test="sql != null">
|
||||
ORDER BY ${sql}
|
||||
</if>
|
||||
) tmp_tb ) a
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from OCR_RECORD
|
||||
<include refid="Base_Where_Clause"/>
|
||||
|
||||
Reference in New Issue
Block a user