Merge remote-tracking branch 'origin/master'

This commit is contained in:
liang.chao 2024-08-23 13:05:07 +08:00
commit 04256b9154
22 changed files with 526 additions and 18 deletions

View File

@ -5,7 +5,7 @@ pipeline {
JAVA_HOME = '/usr/lib/jvm/jdk1.8.0_381'
JOBNAME="${JOB_NAME}"
JENKINS_NODE_COOKIE = "dontKillMe"
SPRING_PROFILES_ACTIVE = "sgzb_cloud_dev"
SPRING_PROFILES_ACTIVE = "sgzb_cq_dev"
}
stages {
stage('Check out') {

View File

@ -0,0 +1,34 @@
# Spring
spring:
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
onlineApprove: /lbcloud-oauth/oauth/token
wechatAppId: crhmaxnE
wechatAppsecret: 3893e6ed90d325f00e34583dd970a56580c05549
getNowPersonDetailData: /lbcloud-user/user/queryLoginUserInfo
baseUrl: https://test-sso.csgmall.com.cn
appAppsecret: d8e6db9fa9bb09da0e270fa739233c823bf9c5f0
personEasyList: /lbcloud-user/api/user/queryAndPaging/basicInfo
h5Appsecret: 3c4a67b7f6a268b4202a5328e6a1726979d5903b
h5AppId: G3NksDH2
appsecret: 596e4863c8d112842ce820c130b236001297ea73
appId: akvVFYgy
appAppId: u8LLfynf
getPersonDetailData: /lbcloud-user/api/user/queryById
registerPhone: /lbcloud-user/api/user/registrationByPhone
userBindUrl: /lbcloud-authority/api/RoleClient/bindDefaultSystemRole
verifyPhoneCode: /lbcloud-mbroker/api/broker/simpleVerificationCode

View File

@ -0,0 +1,34 @@
# Spring
spring:
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
onlineApprove: /lbcloud-oauth/oauth/token
wechatAppId: crhmaxnE
wechatAppsecret: 3893e6ed90d325f00e34583dd970a56580c05549
getNowPersonDetailData: /lbcloud-user/user/queryLoginUserInfo
baseUrl: https://test-sso.csgmall.com.cn
appAppsecret: d8e6db9fa9bb09da0e270fa739233c823bf9c5f0
personEasyList: /lbcloud-user/api/user/queryAndPaging/basicInfo
h5Appsecret: 3c4a67b7f6a268b4202a5328e6a1726979d5903b
h5AppId: G3NksDH2
appsecret: 596e4863c8d112842ce820c130b236001297ea73
appId: akvVFYgy
appAppId: u8LLfynf
getPersonDetailData: /lbcloud-user/api/user/queryById
registerPhone: /lbcloud-user/api/user/registrationByPhone
userBindUrl: /lbcloud-authority/api/RoleClient/bindDefaultSystemRole
verifyPhoneCode: /lbcloud-mbroker/api/broker/simpleVerificationCode

View File

@ -0,0 +1,50 @@
# Spring Boot Actuator V2中风险漏洞处理禁止远程端口访问
management:
endpoint:
env:
enabled: false
# Spring
spring:
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
sentinel:
# 取消控制台懒加载
eager: true
transport:
# 控制台地址
dashboard: 127.0.0.1:8718
# nacos配置持久化
datasource:
ds1:
nacos:
server-addr: 192.168.0.56:8848
dataId: sentinel-sgzb-gateway
groupId: DEFAULT_GROUP
data-type: json
rule-type: gw-flow
#加密组件
jasypt:
encryptor:
password: Encrypt

View File

@ -0,0 +1,50 @@
# Spring Boot Actuator V2中风险漏洞处理禁止远程端口访问
management:
endpoint:
env:
enabled: false
# Spring
spring:
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
sentinel:
# 取消控制台懒加载
eager: true
transport:
# 控制台地址
dashboard: 127.0.0.1:8718
# nacos配置持久化
datasource:
ds1:
nacos:
server-addr: 127.0.0.1:8848
dataId: sentinel-sgzb-gateway
groupId: DEFAULT_GROUP
data-type: json
rule-type: gw-flow
#加密组件
jasypt:
encryptor:
password: Encrypt

View File

@ -120,6 +120,12 @@ public interface BackApplyMapper {
*/
List<TypeTreeNode> getUseTypeTree(BackApplyInfo bean);
List<TypeTreeNode> getUseTypeTreeL4(BackApplyInfo bean);
List<TypeTreeNode> getUseTypeTreeL3(List<Long> list);
List<TypeTreeNode> getUseTypeTreeL21(List<Long> list);
/**
* 退料申请导出
* @param bean

View File

@ -44,7 +44,7 @@ public interface WorkSiteDirectManageMapper {
int batchDel(@Param("ids") ArrayList<Integer> ids);
String getMachineStatus(LeaseOutDetails leaseOutDetails);
DirectApplyInfo getMachineStatus(LeaseOutDetails leaseOutDetails);
int updateLeaseApplyDetailsOutNum(@Param("record")LeaseOutDetails leaseOutDetails);

View File

@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author hay
@ -364,8 +365,19 @@ public class BackApplyServiceImpl implements BackApplyService {
public AjaxResult getUseTypeTree(BackApplyInfo bean) {
List<TypeTreeNode> groupList = new ArrayList<>();
List<TypeTreeNode> list = new ArrayList<>();
List<TypeTreeNode> listL4 = new ArrayList<>();
List<TypeTreeNode> listL3 = new ArrayList<>();
List<TypeTreeNode> listL21 = new ArrayList<>();
try {
list = backApplyMapper.getUseTypeTree(bean);
//list = backApplyMapper.getUseTypeTree(bean);
listL4 = backApplyMapper.getUseTypeTreeL4(bean);
List<Long> list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList());
listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds);
List<Long> list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList());
listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds);
list.addAll(listL4);
list.addAll(listL3);
list.addAll(listL21);
if (CollectionUtils.isNotEmpty(list)) {
// 创建树形结构数据集合作为参数
TypeTreeBuild treeBuild = new TypeTreeBuild(list);

View File

@ -13,7 +13,6 @@ import com.bonus.sgzb.material.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -179,7 +178,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
@Transactional(rollbackFor = Exception.class)
public int insertLeaseOutDetail(List<LeaseOutDetails> leaseOutDetails, TmTask lTask) {
int res = 0;
String maStatus = "15";
String maStatus = "16";
double outNum = 0.1;
if (StringUtils.isNull(leaseOutDetails)) {
log.info("领料出库失败,请检查参数是否填写完整!");
@ -187,9 +186,9 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
}
for (LeaseOutDetails leaseOutDetail : leaseOutDetails) {
if (!(Objects.equals(Integer.valueOf(0), leaseOutDetail.getMaId()) || leaseOutDetail.getMaId() == null)) {
String status = workSiteDirectManageMapper.getMachineStatus(leaseOutDetail);
if (!maStatus.equals(status)) {
log.info("领料出库失败,该设备不是在库状态!");
DirectApplyInfo directApplyInfo = workSiteDirectManageMapper.getMachineStatus(leaseOutDetail);
if (!maStatus.equals(directApplyInfo.getStatus())) {
log.info("领料出库失败,该设备不是再用状态!");
return res;
}
}

View File

@ -1,3 +1,7 @@
# Tomcat
server:
port: 39302
# Spring
spring:
cloud:

View File

@ -1,3 +1,7 @@
# Tomcat
server:
port: 39302
# Spring
spring:
cloud:

View File

@ -0,0 +1,35 @@
# Tomcat
server:
port: 39302
# Spring
spring:
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 多站点特殊配置
sgzb:
site: cq
job:
settlementJobDay: 21
settlementJobCron: "0 0 1 21 * ?"

View File

@ -0,0 +1,35 @@
# Tomcat
server:
port: 39302
# Spring
spring:
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 多站点特殊配置
sgzb:
site: cq
job:
settlementJobDay: 21
settlementJobCron: "0 0 1 21 * ?"

View File

@ -0,0 +1,41 @@
# Tomcat
server:
port: 49302
# Spring
spring:
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.62:8848
namespace: sgzb_nwjj
config:
# 配置中心地址
server-addr: 192.168.0.62:8848
namespace: sgzb_nwjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 禁用Actuator端点的未经身份验证的访问
management:
endpoint:
env:
enabled: false
sgzb:
site: nw
job:
settlementJobDay: 1
settlementJobCron: "0 0 1 1 * ?"

View File

@ -0,0 +1,41 @@
# Tomcat
server:
port: 49302
# Spring
spring:
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: sgzb_nwjj
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: sgzb_nwjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
# 禁用Actuator端点的未经身份验证的访问
management:
endpoint:
env:
enabled: false
sgzb:
site: nw
job:
settlementJobDay: 1
settlementJobCron: "0 0 1 1 * ?"

View File

@ -1,7 +1,3 @@
# Tomcat
server:
port: 39302
# Spring
spring:
application:

View File

@ -690,6 +690,82 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEVEL ASC, type_id;
</select>
<select id="getUseTypeTreeL4" resultType="com.bonus.sgzb.material.domain.TypeTreeNode">
SELECT
mt.type_id,
mt.type_name,
mt.parent_id,
mt.unit_name as unitNames,
mt.company_id,
SUM( CASE WHEN sai.agreement_id = #{agreementId} AND sai.STATUS = '0' THEN sai.num ELSE 0 END ) AS num,
mt.LEVEL
FROM
ma_type mt
LEFT JOIN slt_agreement_info sai ON mt.type_id = sai.type_id
WHERE
EXISTS ( SELECT 1 FROM slt_agreement_info sai2 WHERE sai2.type_id = mt.type_id AND sai2.agreement_id = #{agreementId} AND sai2.STATUS = '0' and sai.lease_type = 0)
GROUP BY
mt.type_id
</select>
<select id="getUseTypeTreeL3" resultType="com.bonus.sgzb.material.domain.TypeTreeNode">
SELECT
mt3.type_id,
mt3.type_name,
mt3.parent_id,
mt3.unit_name,
mt3.company_id,
0 AS num,
mt3.LEVEL
FROM
ma_type mt3 where type_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="getUseTypeTreeL21" resultType="com.bonus.sgzb.material.domain.TypeTreeNode">
SELECT
mt3.type_id,
mt3.type_name,
mt3.parent_id,
mt3.unit_name,
mt3.company_id,
0 AS num,
mt3.LEVEL
FROM
ma_type mt3 where type_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
union
SELECT
mt2.type_id,
mt2.type_name,
mt2.parent_id,
mt2.unit_name,
mt2.company_id,
0 AS num,
mt2.LEVEL
FROM
ma_type mt2 left join (
SELECT
mt3.type_id,
mt3.type_name,
mt3.parent_id,
mt3.unit_name,
mt3.company_id,
0 AS num,
mt3.LEVEL
FROM
ma_type mt3) mt3 on mt3.parent_id=mt2.type_id where mt3.type_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="exportList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
SELECT
bai.`code`,

View File

@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
baif.`code`,
mm.ma_code AS maCode,
bcd.back_num AS backNum,
su.nick_name AS backPerson,
baif.back_person AS backPerson,
bcd.create_time AS createTime,
bpl.lot_name AS proName,
bui.unit_name AS unitName
@ -114,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
LEFT JOIN sys_user su ON su.user_id = baif.back_person
-- LEFT JOIN sys_user su ON su.user_id = baif.back_person
where 1 = 1
<if test="keyWord != null and keyWord != ''">
and (baif.`code` like concat('%',#{keyWord},'%') or

View File

@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mm.ma_code as maCode,
mt.unit_name as unit,
lod.out_num as preNum,
su.nick_name as leasePerson,
lai.lease_person as leasePerson,
lod.create_time as createTime,
bpl.lot_name as proName,
bui.unit_name as unitName
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt on mt.type_id = lod.type_id
LEFT JOIN ma_type mt2 on mt2.type_id = mt.parent_id
LEFT JOIN ma_machine mm on mm.ma_id = lod.ma_id
LEFT JOIN sys_user su on su.user_id = lai.lease_person
-- LEFT JOIN sys_user su on su.user_id = lai.lease_person
where 1 = 1
<if test="keyWord != null and keyWord != ''">
and (bai.agreement_code like concat('%',#{keyWord},'%') or

View File

@ -431,8 +431,8 @@
<select id="getDirectApplyInfoById" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
select * from direct_apply_info where id = #{id}
</select>
<select id="getMachineStatus" resultType="java.lang.String">
select ma_status
<select id="getMachineStatus" resultType="com.bonus.sgzb.base.api.domain.DirectApplyInfo">
select ma_status as status
from ma_machine
where ma_id = #{maId}
</select>

View File

@ -0,0 +1,46 @@
# Spring
spring:
servlet:
multipart:
max-request-size: 50MB
max-file-size: 30MB
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 192.168.0.56:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#腾讯云sms
tencent:
sms:
#api秘钥标识
accessKeyId: AKIDrreCVaRKDtMcgfU5QW9iEfv67tMfldJn
#api秘钥
accessKeySecret: OXUgeMo0yhBRTGo6sVu3yiFX4rQtAzc3
#请求域名
endpoint: sms.tencentcloudapi.com
#所属区域
region: ap-guangzhou
#腾讯云申请应用id
sdkAppId: 1400494336
#签名
smsSign: 南方电网互联网
#云平台模板id 2116937-验收通知 2115503-登录验证
templateId: 2116937,2115503

View File

@ -0,0 +1,45 @@
# Spring
spring:
servlet:
multipart:
max-request-size: 50MB
max-file-size: 30MB
cloud:
loadbalancer:
# 关闭Ribbon的负载均衡器
ribbon:
enabled: false
# 开启Nacos的负载均衡器
nacos:
enabled: true
nacos:
discovery:
# 服务注册地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
config:
# 配置中心地址
server-addr: 127.0.0.1:8848
namespace: sgzb_cqjj
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#腾讯云sms
tencent:
sms:
#api秘钥标识
accessKeyId: AKIDrreCVaRKDtMcgfU5QW9iEfv67tMfldJn
#api秘钥
accessKeySecret: OXUgeMo0yhBRTGo6sVu3yiFX4rQtAzc3
#请求域名
endpoint: sms.tencentcloudapi.com
#所属区域
region: ap-guangzhou
#腾讯云申请应用id
sdkAppId: 1400494336
#签名
smsSign: 南方电网互联网
#云平台模板id 2116937-验收通知 2115503-登录验证
templateId: 2116937,2115503