Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx

This commit is contained in:
BianLzhaoMin 2024-09-19 13:22:44 +08:00
commit 9ec44744da
8 changed files with 146 additions and 27 deletions

96
config/nginx.conf0914 Normal file
View File

@ -0,0 +1,96 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
client_max_body_size 100M;
client_body_buffer_size 100M;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
#gzip on;
server {
listen 80;
server_name localhost;
charset utf-8;
location / {
# 网站根目录,此处使用容器内的路径
root /usr/local/www/dist;
# 默认首页
index index.html;
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
try_files $uri $uri/ /index.html;
}
location /APP {
# 网站根目录,此处使用容器内的路径
alias /usr/local/www/APP;
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
#index cqjj.apk;
# try_files $uri $uri/ /index.html;
}
location /bigScrap {
# 网站根目录,此处使用容器内的路径
alias /usr/local/www/bigScrap;
# 默认首页
index index01.html;
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
try_files $uri $uri/ /bigScrap/index01.html;
}
location /dev-api/ {
#rewrite ^.+api/?(.*)$ /$1 break; #这样写有问题,在网上看有人这样写,发现有问题
rewrite ^/dev-api/(.*)$ /$1 break; #必须的写这个使用nginx的rewrite对uri进行重写 下面这行也要改为api
proxy_pass http://192.168.1.2:28080/; #跨域转发路由地址
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /screen/ {
#rewrite ^.+api/?(.*)$ /$1 break; #这样写有问题,在网上看有人这样写,发现有问题
rewrite ^/screen/(.*)$ /$1 break; #必须的写这个使用nginx的rewrite对uri进行重写 下面这行也要改为api
proxy_pass http://192.168.1.2:28080/; #跨域转发路由地址
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}

View File

@ -603,11 +603,11 @@
GROUP BY tt.task_id
order by
case when #{record.orderStatus} = 0 then tt.update_time
when #{record.orderStatus} = 1 then tt.update_time
when #{record.orderStatus} = 1 or #{record.orderStatus} is null then tt.update_time
when #{record.orderStatus} = 2 then tt.task_status
when #{record.orderStatus} = 3 then tt.task_status
end
<if test="record.orderStatus == 1 or record.orderStatus == 3">
<if test="record.orderStatus == 1 or record.orderStatus == 3 or record.orderStatus == null">
desc
</if>
</select>
@ -1051,7 +1051,7 @@
ELSE
IFNULL(mt.num, 0)
END as num,
(lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode
(lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,subquery0.ma_code as maCode
FROM
lease_apply_details lad
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id

View File

@ -135,4 +135,6 @@ public class AgreementInfo extends BaseEntity {
@ApiModelProperty(value = "导出选中列表")
private List<Long> dataCondition;
private Integer isCommit;
}

View File

@ -34,6 +34,7 @@ public interface SltAgreementInfoMapper {
int insApply(SltAgreementApply apply);
int insRelation(SltAgreementRelation relation);
int upRelation(SltAgreementRelation relation);
int insDetails(SltAgreementInfo info);

View File

@ -88,8 +88,14 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
public int settlementReview(SltAgreementApply apply) {
Long userid = SecurityUtils.getLoginUser().getUserid();
apply.setAuditor(String.valueOf(userid));
int j;
if ("2".equals(apply.getStatus())) {
// 驳回
int i = sltAgreementInfoMapper.updateRelation(apply);
j = sltAgreementInfoMapper.updateApply(apply);
} else {
// 通过
int i = sltAgreementInfoMapper.updateRelation(apply);
int j = 0;
if (i > 0) {
List<SltAgreementRelation> relations = sltAgreementInfoMapper.getRelations(apply);
List<AgreementInfo> infos = new ArrayList<>();
@ -110,6 +116,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
throw new ServiceException("结算审核失败");
//throw new ServiceException(ExceptionDict.SETTLEMENT_REVIEW_ERROR_MSG,ExceptionDict.SETTLEMENT_REVIEW_ERROR);
}
}
return j;
}
@ -181,6 +188,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
list.add(info);
relation.setApplyId(String.valueOf(apply.getId()));
sltAgreementInfoMapper.updateInfoStatus(relation.getAgreementId());
sltAgreementInfoMapper.upRelation(relation);
int j = sltAgreementInfoMapper.insRelation(relation);
if (j < 0) {
throw new ServiceException("新增协议结算记录失败");

View File

@ -91,11 +91,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where agreement_id = #{agreementId}
and type_id = #{typeId}
</update>
<delete id="upRelation">
update slt_agreement_relation
set is_commit = 1
where agreement_id = #{agreementId}
</delete>
<select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
SELECT bai.agreement_id, bai.agreement_code, contract_code,file_url ,file_name,sign_time,
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,
plan_start_time,lease_day,auth_person,phone,saa.remark,bai.protocol,sar.cost as cost,
case when sar.id is null then '1' when sar.status = '0' then '2' when sar.status = '1' then '3' end as sltStatus
plan_start_time,lease_day,auth_person,phone,saa.remark,bai.protocol,sar.cost as cost,sar.is_commit as isCommit,
case when sar.id is null then '1' when sar.status = '0' then '2' when sar.status = '1' then '3' when sar.status = '2' then '4' end as sltStatus
FROM bm_agreement_info bai
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
@ -118,6 +123,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<when test="sltStatus == '3'.toString()">
and sar.status = '1'
</when>
<when test="sltStatus == '4'.toString()">
and sar.status = '2'
</when>
</choose>
ORDER BY sltStatus,bai.agreement_id desc
</select>

View File

@ -140,6 +140,7 @@
<span v-if="scope.row.sltStatus == '1'">未结算</span>
<span v-if="scope.row.sltStatus == '2'">已结算</span>
<span v-if="scope.row.sltStatus == '3'">已审核</span>
<span v-if="scope.row.sltStatus == '4'">已驳回</span>
</template>
</el-table-column>
<el-table-column
@ -164,7 +165,7 @@
type="primary"
icon="el-icon-edit"
@click="handleApply(scope.row)"
v-if="scope.row.sltStatus == '1'"
v-if="scope.row.sltStatus == '1' || (scope.row.sltStatus == '4' && scope.row.isCommit == 0 )"
>结算申请</el-button
>
<!-- <el-button
@ -220,6 +221,7 @@ export default {
{ id: '1', name: '未结算' },
{ id: '2', name: '已结算' },
{ id: '3', name: '已审核' },
{ id: '4', name: '已驳回' },
], //
//
agreementList: [],
@ -235,6 +237,7 @@ export default {
pageSize: 10,
keyWord: undefined,
sltStatus: '',
isCommit:'',
unitId: '',
projectId: '',
},

View File

@ -218,6 +218,7 @@ export default {
pageSize: 10,
keyWord: undefined,
sltStatus: '',
isCommit: '',
unitId: '',
projectId: '',
},