Browse Source

fix: bug修复

release-sy-v1.0.0
hxh 1 month ago
parent
commit
a1e6faec18
  1. 2
      shuili-common/src/main/java/com/shuili/common/constant/Constants.java
  2. 25
      shuili-framework/src/main/java/com/kms/framework/config/ServerConfig.java
  3. 98
      shuili-framework/src/main/java/com/shuili/common/config/ShuiliConfig.java
  4. 4
      shuili-system/src/main/java/com/kms/yxgh/df/service/DfCheckingRecordV2Service.java
  5. 4
      shuili-system/src/main/java/com/kms/yxgh/dw/service/DwCheckingRecordV2Service.java
  6. 15
      shuili-system/src/main/java/com/kms/yxgh/sz/service/SzCheckingRecordV2Service.java
  7. 6
      shuili-system/src/main/resources/mapper/yxgh/DwYhV2Mapper.xml
  8. 2
      shuili-system/src/main/resources/mapper/yxgh/SzYhV2Mapper.xml

2
shuili-common/src/main/java/com/shuili/common/constant/Constants.java

@ -125,5 +125,5 @@ public class Constants
/** /**
* 资源映射路径 前缀 * 资源映射路径 前缀
*/ */
public static final String RESOURCE_PREFIX = "/profile"; public static final String RESOURCE_PREFIX = "/sgcyy-slgcyxgl/profile";
} }

25
shuili-framework/src/main/java/com/kms/framework/config/ServerConfig.java

@ -1,32 +1,31 @@
package com.kms.framework.config; package com.kms.framework.config;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;
import com.shuili.common.utils.ServletUtils; import com.shuili.common.utils.ServletUtils;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.net.URI;
/** /**
* 服务相关配置 * 服务相关配置
* *
* @author kms * @author kms
*/ */
@Component @Component
public class ServerConfig public class ServerConfig {
{
/** /**
* 获取完整的请求路径包括域名端口上下文访问路径 * 获取完整的请求路径包括域名端口上下文访问路径
* *
* @return 服务地址 * @return 服务地址
*/ */
public String getUrl() public String getUrl() {
{
HttpServletRequest request = ServletUtils.getRequest(); HttpServletRequest request = ServletUtils.getRequest();
return getDomain(request); return getDomain(request);
} }
public static String getDomain(HttpServletRequest request) public static String getDomain(HttpServletRequest request) {
{ String host = request.getHeader("Referer");
StringBuffer url = request.getRequestURL(); URI uri = URI.create(host);
String contextPath = request.getServletContext().getContextPath(); return uri.getScheme() + "://" + uri.getAuthority() ;
return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString();
} }
} }

98
shuili-framework/src/main/java/com/shuili/common/config/ShuiliConfig.java

@ -1,8 +1,6 @@
package com.shuili.common.config; package com.shuili.common.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
@ -11,26 +9,35 @@ import org.springframework.stereotype.Component;
* @author shuili * @author shuili
*/ */
@Component @Component
//@ConfigurationProperties(prefix = "shuili") @ConfigurationProperties(prefix = "shuili")
public class ShuiliConfig public class ShuiliConfig {
{ /**
/** 项目名称 */ * 项目名称
*/
private static String name; private static String name;
private static String nameKey; private static String nameKey;
/** 版本 */ /**
* 版本
*/
private String version; private String version;
/** 版权年份 */ /**
* 版权年份
*/
private String copyrightYear; private String copyrightYear;
/** 实例演示开关 */ /**
* 实例演示开关
*/
private boolean demoEnabled; private boolean demoEnabled;
/** 上传路径 */ /**
* 上传路径
*/
private static String profile="D:/tianhui"; private static String profile = "D:/tianhui";
private static String licensePath; private static String licensePath;
@ -38,11 +45,13 @@ public class ShuiliConfig
return licensePath; return licensePath;
} }
public void setLicensePath(String licensePath) { public void setLicensePath(String licensePath) {
ShuiliConfig.licensePath = licensePath; ShuiliConfig.licensePath = licensePath;
} }
/** 获取地址开关 */ /**
* 获取地址开关
*/
private static boolean addressEnabled; private static boolean addressEnabled;
private static boolean init; private static boolean init;
@ -56,7 +65,7 @@ public class ShuiliConfig
return detectLang; return detectLang;
} }
public void setDetectLang(String detectLang) { public void setDetectLang(String detectLang) {
ShuiliConfig.detectLang = detectLang; ShuiliConfig.detectLang = detectLang;
} }
@ -68,48 +77,39 @@ public class ShuiliConfig
ShuiliConfig.nameKey = nameKey; ShuiliConfig.nameKey = nameKey;
} }
public static String getName() public static String getName() {
{
return name; return name;
} }
public void setName(String name) public void setName(String name) {
{ ShuiliConfig.name = name;
ShuiliConfig.name = name;
} }
public String getVersion() public String getVersion() {
{
return version; return version;
} }
public void setVersion(String version) public void setVersion(String version) {
{
this.version = version; this.version = version;
} }
public String getCopyrightYear() public String getCopyrightYear() {
{
return copyrightYear; return copyrightYear;
} }
public void setCopyrightYear(String copyrightYear) public void setCopyrightYear(String copyrightYear) {
{
this.copyrightYear = copyrightYear; this.copyrightYear = copyrightYear;
} }
public boolean isDemoEnabled() public boolean isDemoEnabled() {
{
return demoEnabled; return demoEnabled;
} }
public void setDemoEnabled(boolean demoEnabled) public void setDemoEnabled(boolean demoEnabled) {
{
this.demoEnabled = demoEnabled; this.demoEnabled = demoEnabled;
} }
public static String getProfile() public static String getProfile() {
{
return profile; return profile;
} }
@ -117,8 +117,7 @@ public class ShuiliConfig
return uploadType; return uploadType;
} }
public void setProfile(String profile) public void setProfile(String profile) {
{
ShuiliConfig.profile = profile; ShuiliConfig.profile = profile;
} }
@ -126,45 +125,40 @@ public class ShuiliConfig
ShuiliConfig.uploadType = uploadType; ShuiliConfig.uploadType = uploadType;
} }
public static boolean isAddressEnabled() public static boolean isAddressEnabled() {
{
return addressEnabled; return addressEnabled;
} }
public void setAddressEnabled(boolean addressEnabled) public void setAddressEnabled(boolean addressEnabled) {
{
ShuiliConfig.addressEnabled = addressEnabled; ShuiliConfig.addressEnabled = addressEnabled;
} }
/** /**
* 获取头像上传路径 * 获取头像上传路径
*/ */
public static String getAvatarPath() public static String getAvatarPath() {
{
return getProfile() + "/avatar"; return getProfile() + "/avatar";
} }
/** /**
* 获取下载路径 * 获取下载路径
*/ */
public static String getDownloadPath() public static String getDownloadPath() {
{
return getProfile(); return getProfile();
} }
/** /**
* 获取上传路径 * 获取上传路径
*/ */
public static String getUploadPath() public static String getUploadPath() {
{
return getProfile() + "/upload"; return getProfile() + "/upload";
} }
public static boolean isInit() { public static boolean isInit() {
return init; return init;
} }
public void setInit(boolean init) { public void setInit(boolean init) {
ShuiliConfig.init = init; ShuiliConfig.init = init;
} }
} }

4
shuili-system/src/main/java/com/kms/yxgh/df/service/DfCheckingRecordV2Service.java

@ -127,10 +127,10 @@ public class DfCheckingRecordV2Service extends BaseService<DfCheckingRecordV2Map
List<DfRecordDetailV2Dto.DfRecordItemDetailV2Dto> dtoList = new ArrayList<>(); List<DfRecordDetailV2Dto.DfRecordItemDetailV2Dto> dtoList = new ArrayList<>();
for (DfCheckingProblemV2 record : recordsList) { for (DfCheckingProblemV2 record : recordsList) {
DfRecordDetailV2Dto.DfRecordItemDetailV2Dto detailV2Dto = new DfRecordDetailV2Dto.DfRecordItemDetailV2Dto(); DfRecordDetailV2Dto.DfRecordItemDetailV2Dto detailV2Dto = new DfRecordDetailV2Dto.DfRecordItemDetailV2Dto();
if (null != record.getParts()) { if (StringUtils.isNotBlank(record.getParts())) {
detailV2Dto.setParts(DfCheckingV2Service.getStringList(record.getParts().split(","))); detailV2Dto.setParts(DfCheckingV2Service.getStringList(record.getParts().split(",")));
} }
if (null != record.getDoc()) { if (StringUtils.isNotBlank(record.getDoc())) {
detailV2Dto.setProblemImages(DfCheckingV2Service.getStringList(record.getDoc().split(","))); detailV2Dto.setProblemImages(DfCheckingV2Service.getStringList(record.getDoc().split(",")));
} }
detailV2Dto.setItemId(record.getItemId()); detailV2Dto.setItemId(record.getItemId());

4
shuili-system/src/main/java/com/kms/yxgh/dw/service/DwCheckingRecordV2Service.java

@ -125,10 +125,10 @@ public class DwCheckingRecordV2Service extends BaseService<DwCheckingRecordV2Map
List<DwRecordDetailV2Dto.DwRecordItemDetailV2Dto> dtoList = new ArrayList<>(); List<DwRecordDetailV2Dto.DwRecordItemDetailV2Dto> dtoList = new ArrayList<>();
for (DwCheckingProblemV2 record : recordsList) { for (DwCheckingProblemV2 record : recordsList) {
DwRecordDetailV2Dto.DwRecordItemDetailV2Dto detailV2Dto = new DwRecordDetailV2Dto.DwRecordItemDetailV2Dto(); DwRecordDetailV2Dto.DwRecordItemDetailV2Dto detailV2Dto = new DwRecordDetailV2Dto.DwRecordItemDetailV2Dto();
if (null != record.getParts()) { if (StringUtils.isNotBlank(record.getParts())) {
detailV2Dto.setParts(DwCheckingV2Service.getStringList(record.getParts().split(","))); detailV2Dto.setParts(DwCheckingV2Service.getStringList(record.getParts().split(",")));
} }
if (null != record.getDoc()) { if (StringUtils.isNotBlank(record.getDoc())) {
detailV2Dto.setProblemImages(DwCheckingV2Service.getStringList(record.getDoc().split(","))); detailV2Dto.setProblemImages(DwCheckingV2Service.getStringList(record.getDoc().split(",")));
} }
detailV2Dto.setItemId(record.getItemId()); detailV2Dto.setItemId(record.getItemId());

15
shuili-system/src/main/java/com/kms/yxgh/sz/service/SzCheckingRecordV2Service.java

@ -113,12 +113,11 @@ public class SzCheckingRecordV2Service extends BaseService<SzCheckingRecordV2Map
if (szCheckingRecord == null) { if (szCheckingRecord == null) {
return dto; return dto;
} }
BeanUtils.copyProperties(szCheckingRecord, dto); BeanUtils.copyProperties(szCheckingRecord, dto);
List<SzCheckingV2ProjectItem> items = szCheckingV2ProjectItemV2Service.list(new LambdaQueryWrapper<SzCheckingV2ProjectItem>() List<SzCheckingV2ProjectItem> items = szCheckingV2ProjectItemV2Service.list(new LambdaQueryWrapper<SzCheckingV2ProjectItem>()
.eq(SzCheckingV2ProjectItem::getCheckingId,szCheckingRecord.getCheckingId())); .eq(SzCheckingV2ProjectItem::getCheckingId, szCheckingRecord.getCheckingId()));
dto.setItems(items.stream() dto.setItems(items.stream()
@ -131,10 +130,10 @@ public class SzCheckingRecordV2Service extends BaseService<SzCheckingRecordV2Map
List<SzRecordDetailV2Dto.SzRecordItemDetailV2Dto> dtoList = new ArrayList<>(); List<SzRecordDetailV2Dto.SzRecordItemDetailV2Dto> dtoList = new ArrayList<>();
for (SzCheckingProblemV2 record : recordsList) { for (SzCheckingProblemV2 record : recordsList) {
SzRecordDetailV2Dto.SzRecordItemDetailV2Dto detailV2Dto = new SzRecordDetailV2Dto.SzRecordItemDetailV2Dto(); SzRecordDetailV2Dto.SzRecordItemDetailV2Dto detailV2Dto = new SzRecordDetailV2Dto.SzRecordItemDetailV2Dto();
if (null != record.getParts()) { if (StringUtils.isNotBlank(record.getParts())) {
detailV2Dto.setParts(DfCheckingV2Service.getStringList(record.getParts().split(","))); detailV2Dto.setParts(DfCheckingV2Service.getStringList(record.getParts().split(",")));
} }
if (null != record.getDoc()) { if (StringUtils.isNotBlank(record.getDoc())) {
detailV2Dto.setProblemImages(DfCheckingV2Service.getStringList(record.getDoc().split(","))); detailV2Dto.setProblemImages(DfCheckingV2Service.getStringList(record.getDoc().split(",")));
} }
detailV2Dto.setItemId(record.getItemId()); detailV2Dto.setItemId(record.getItemId());
@ -183,11 +182,11 @@ public class SzCheckingRecordV2Service extends BaseService<SzCheckingRecordV2Map
} }
} }
public void mySaveOrUpdate (SzCheckingRecord szCheckingRecord) { public void mySaveOrUpdate(SzCheckingRecord szCheckingRecord) {
Boolean flag = org.springframework.util.StringUtils.isEmpty(szCheckingRecord.getId()) ? Boolean.TRUE :Boolean.FALSE; Boolean flag = org.springframework.util.StringUtils.isEmpty(szCheckingRecord.getId()) ? Boolean.TRUE : Boolean.FALSE;
if (flag) { if (flag) {
save(szCheckingRecord); save(szCheckingRecord);
}else { } else {
updateById(szCheckingRecord); updateById(szCheckingRecord);
} }
} }

6
shuili-system/src/main/resources/mapper/yxgh/DwYhV2Mapper.xml

@ -15,8 +15,8 @@
<id property="id" column="jl_id"/> <id property="id" column="jl_id"/>
<result property="name" column="name"/> <result property="name" column="name"/>
<result property="status" column="yh_status"/> <result property="status" column="yh_status"/>
<result property="projectCode" column="project_code"/> <result property="dikeCode" column="dike_code"/>
<result property="projectName" column="project_name"/> <result property="dikeName" column="dike_name"/>
<result property="type" column="type"/> <result property="type" column="type"/>
<result property="category" column="category"/> <result property="category" column="category"/>
<result property="problemLevel" column="problem_level"/> <result property="problemLevel" column="problem_level"/>
@ -30,7 +30,7 @@
<select id="approvalSearchPage" resultMap="approvalMap"> <select id="approvalSearchPage" resultMap="approvalMap">
SELECT ts.id id, ts.form_id formId, ts.create_time submit_time, ts.approval_time approval_time, ts.status status, SELECT ts.id id, ts.form_id formId, ts.create_time submit_time, ts.approval_time approval_time, ts.status status,
ts.operator operator, ts.comment comment, ts.doc ts_doc, ts.operator operator, ts.comment comment, ts.doc ts_doc,
jl.id , jl.name ,jl.project_code , jl.project_name , jl.type type, jl.category , jl.id , jl.name ,jl.dike_code , jl.dike_name , jl.type type, jl.category ,
jl.problem_level , jl.duty_holder_id , jl.duty_holder_name, jl.problem_id , jl.record_id, jl.status yh_status jl.problem_level , jl.duty_holder_id , jl.duty_holder_name, jl.problem_id , jl.record_id, jl.status yh_status
FROM bs_sgc_sp_task ts FROM bs_sgc_sp_task ts
LEFT JOIN bs_sgc_dw_xcyj jl ON jl.id = ts.form_id LEFT JOIN bs_sgc_dw_xcyj jl ON jl.id = ts.form_id

2
shuili-system/src/main/resources/mapper/yxgh/SzYhV2Mapper.xml

@ -33,7 +33,7 @@
jl.id , jl.name ,jl.waga_code , jl.waga_name , jl.type type, jl.category , jl.id , jl.name ,jl.waga_code , jl.waga_name , jl.type type, jl.category ,
jl.problem_level , jl.duty_holder_id , jl.duty_holder_name, jl.problem_id , jl.record_id, jl.status yh_status jl.problem_level , jl.duty_holder_id , jl.duty_holder_name, jl.problem_id , jl.record_id, jl.status yh_status
FROM bs_sgc_sp_task ts FROM bs_sgc_sp_task ts
LEFT JOIN bs_sgc_Sz_xcyj jl ON jl.id = ts.form_id LEFT JOIN bs_sgc_sz_xcyj jl ON jl.id = ts.form_id
WHERE WHERE
ts.business_type = #{dto.businessType} ts.business_type = #{dto.businessType}
and ts.status in ('1','2') and ts.status in ('1','2')

Loading…
Cancel
Save