结算优化
This commit is contained in:
parent
699e66ee32
commit
69c3b7a0fb
|
|
@ -153,7 +153,7 @@ public class SltAgreementInfo {
|
|||
/**
|
||||
* 费用承担方
|
||||
*/
|
||||
@Excel(name = "费用承担方")
|
||||
@Excel(name = "费用承担方(01项目,03分包)")
|
||||
private String costBearingParty;
|
||||
/**
|
||||
* 调整天数
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
|||
@Data
|
||||
public class SltInfoVo {
|
||||
/**
|
||||
* 租赁费用列表(01、03)
|
||||
* 租赁费用列表 (01项目 03分包)
|
||||
*/
|
||||
List<SltAgreementInfo> leaseList;
|
||||
List<SltAgreementInfo> leaseListOne;
|
||||
|
|
|
|||
|
|
@ -940,16 +940,46 @@ public class DateTimeHelper {
|
|||
return list;
|
||||
}
|
||||
|
||||
public static String getCalStartDay() {
|
||||
public static String getPreMonthFirstDay() {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 获取当前月第一天:
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, -1);
|
||||
c.set(Calendar.DAY_OF_MONTH, 21);
|
||||
c.set(Calendar.DAY_OF_MONTH, 1);// 设置为1号,当前日期既为本月第一天
|
||||
String first = format.format(c.getTime());
|
||||
return first;
|
||||
}
|
||||
|
||||
public static String getCalDay(int day) {
|
||||
public static String getCurrentMonthFirstDay() {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 获取当前月第一天:
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, 0);
|
||||
c.set(Calendar.DAY_OF_MONTH, 1);// 设置为1号,当前日期既为本月第一天
|
||||
String first = format.format(c.getTime());
|
||||
return first;
|
||||
}
|
||||
|
||||
public static String getPreLastDay() {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
// 获取当前月最后一天
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, -1);
|
||||
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
String last = format.format(c.getTime());
|
||||
return last;
|
||||
}
|
||||
|
||||
public static String getPreMonthCalStartDay(int day) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, -1);
|
||||
c.set(Calendar.DAY_OF_MONTH, day);
|
||||
String first = format.format(c.getTime());
|
||||
return first;
|
||||
}
|
||||
|
||||
public static String getCurrentMonthCalEndDay(int day) {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.add(Calendar.MONTH, 0);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
<module>sgzb-job</module>
|
||||
<module>sgzb-file</module>
|
||||
<module>sgzb-material</module>
|
||||
<module>sgzb-settlement</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>sgzb-modules</artifactId>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class LeaseApplyInfo implements Serializable {
|
|||
/**
|
||||
* 费用承担方
|
||||
*/
|
||||
@ApiModelProperty(value = "费用承担方")
|
||||
@ApiModelProperty(value = "费用承担方(01项目,03分包)")
|
||||
private String costBearingParty;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class TmTask implements Serializable {
|
|||
/**
|
||||
* 费用承担方
|
||||
*/
|
||||
@ApiModelProperty(value = "费用承担方")
|
||||
@ApiModelProperty(value = "费用承担方(01项目,03分包)")
|
||||
private String costBearingParty;
|
||||
/**
|
||||
* 编号
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public class AgreementInfo extends BaseEntity {
|
|||
private String cost;
|
||||
@ApiModelProperty(value = "结算状态")
|
||||
private String sltStatus;
|
||||
@ApiModelProperty(value = "费用承担方")
|
||||
@ApiModelProperty(value = "费用承担方(01项目,03分包)")
|
||||
private String costBearingParty;
|
||||
private String codeNum;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ public class ProjectMonthCosts {
|
|||
* 结算记录关联id
|
||||
*/
|
||||
private Integer sltMonthId;
|
||||
/**
|
||||
* 结算记录关联 task id
|
||||
*/
|
||||
private Integer taskId;
|
||||
/**
|
||||
* 单位id
|
||||
*/
|
||||
|
|
@ -36,7 +40,7 @@ public class ProjectMonthCosts {
|
|||
*/
|
||||
private String month;
|
||||
/**
|
||||
* 费用承担方
|
||||
* 费用承担方(01项目,03分包)
|
||||
*/
|
||||
private String costBearingParty;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class ProjectMonthDetail {
|
|||
*/
|
||||
private String leasePrice;
|
||||
/**
|
||||
* 费用承担方
|
||||
* 费用承担方(01项目,03分包)
|
||||
*/
|
||||
private String costBearingParty;
|
||||
private String leaseDays;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ public interface CalMonthlyMapper {
|
|||
|
||||
int deleteCalcRecord(CalMonthlyBean bean);
|
||||
|
||||
int deleteMonthlyDetail(CalMonthlyBean bean);
|
||||
|
||||
int deleteMonthlyCosts(CalMonthlyBean bean);
|
||||
|
||||
int insertProMonCosts(ProjectMonthCosts projectMonthCosts);
|
||||
|
|
|
|||
|
|
@ -1,28 +1,35 @@
|
|||
package com.bonus.sgzb.material.remind;
|
||||
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.material.remind.service.CalcMonthlyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@Component
|
||||
public class Inform {
|
||||
|
||||
@Autowired
|
||||
private CalcMonthlyService calcfourCostService;
|
||||
private CalcMonthlyService calcMonthlyService;
|
||||
|
||||
private final int CAL_DAY = 9;
|
||||
@Value("${sgzb.job.settlementJobDay}")
|
||||
private String settlementJobDay;
|
||||
|
||||
// @Scheduled(cron = "0 */1 * * * ? ") // 间隔5分钟执行
|
||||
// @Scheduled(cron = "0 0 1 22 * ? ") // 每个月22日凌晨1点执行
|
||||
//@Scheduled(cron = "0 */3 * * * ? ") // 间隔3分钟执行
|
||||
@Scheduled(cron = "${job.settlementJobCron}") // 结算日次日凌晨执行
|
||||
@Async
|
||||
public void taskCycle() {
|
||||
System.out.println("===springMVC定时器启动====");
|
||||
try {
|
||||
// 生成每月数据 (上月21日---本月20日)
|
||||
calcfourCostService.calcMonthInfo(CAL_DAY);
|
||||
|
||||
if (StringUtils.isEmpty(settlementJobDay)) {
|
||||
calcMonthlyService.calcMonthInfo(1);
|
||||
} else {
|
||||
int calDay = Integer.parseInt(settlementJobDay);
|
||||
calcMonthlyService.calcMonthInfo(calDay);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -34,22 +34,27 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
|||
|
||||
@Override
|
||||
public void calcMonthInfo(int day) {
|
||||
String time = DateTimeHelper.getNowDate();
|
||||
String calDay = DateTimeHelper.getCalDay(day);
|
||||
if (time.equals(calDay)) {
|
||||
CalMonthlyBean record = new CalMonthlyBean();
|
||||
String month = DateTimeHelper.getCurrentMonth();
|
||||
record.setMonth(month);
|
||||
// cleanSameMonthOldRecords(record);
|
||||
List<AgreementInfo> list = agreementInfoService.getAllAgreementId();
|
||||
String startTime = DateTimeHelper.getCalStartDay();
|
||||
String endTime = DateTimeHelper.getCalDay(day - 1);
|
||||
list.forEach(t -> {
|
||||
t.setStartTime(startTime);
|
||||
t.setEndTime(endTime);
|
||||
});
|
||||
getLeaseListMonth(list, record);
|
||||
String month;
|
||||
String startTime;
|
||||
String endTime;
|
||||
if (day == 1) {
|
||||
month = DateTimeHelper.getPrevMonth();
|
||||
startTime = DateTimeHelper.getPreMonthFirstDay();
|
||||
endTime = DateTimeHelper.getCurrentMonthFirstDay();
|
||||
} else {
|
||||
month = DateTimeHelper.getCurrentMonth();
|
||||
startTime = DateTimeHelper.getPreMonthCalStartDay(day);
|
||||
endTime = DateTimeHelper.getCurrentMonthCalEndDay(day);
|
||||
}
|
||||
CalMonthlyBean record = new CalMonthlyBean();
|
||||
record.setMonth(month);
|
||||
cleanSameMonthOldRecords(record);
|
||||
List<AgreementInfo> list = agreementInfoService.getAllAgreementId();
|
||||
list.forEach(t -> {
|
||||
t.setStartTime(startTime);
|
||||
t.setEndTime(endTime);
|
||||
});
|
||||
addProjectMonthCosts(list, record);
|
||||
}
|
||||
|
||||
private void cleanSameMonthOldRecords(CalMonthlyBean record) {
|
||||
|
|
@ -59,26 +64,27 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
|||
//清除上月之前计算过的记录 calc_project_month
|
||||
calMonthlyMapper.deleteCalcRecord(bean);
|
||||
|
||||
//清除上月之前计算过的记录 project_month_costs(表名待定)
|
||||
//清除上月之前计算过的记录 project_month_detail, project_month_costs
|
||||
calMonthlyMapper.deleteMonthlyDetail(bean);
|
||||
calMonthlyMapper.deleteMonthlyCosts(bean);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<SltAgreementInfo> getLeaseListMonth(List<AgreementInfo> list, CalMonthlyBean record) {
|
||||
private List<SltAgreementInfo> addProjectMonthCosts(List<AgreementInfo> list, CalMonthlyBean record) {
|
||||
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
||||
|
||||
calMonthlyMapper.insertCalcRecord(record);
|
||||
String taskId = record.getId();
|
||||
for (AgreementInfo bean : list) {
|
||||
if (StringUtils.isNotBlank(bean.getStartTime()) && StringUtils.isNotBlank(bean.getEndTime())) {
|
||||
List<SltAgreementInfo> monthList = sltAgreementInfoMapper.getLeaseListMonthNotNull(bean);
|
||||
monthList.stream().filter(Objects::nonNull);
|
||||
|
||||
for (SltAgreementInfo sltAgreementInfo : monthList) {
|
||||
calMonthlyMapper.insertCalcRecord(record);
|
||||
// slt_project_month的主键id
|
||||
String spmId = record.getId();
|
||||
ProjectMonthCosts projectMonthCosts = new ProjectMonthCosts();
|
||||
projectMonthCosts.setAgreementId(Integer.parseInt(sltAgreementInfo.getAgreementId()));
|
||||
projectMonthCosts.setSltMonthId(Integer.parseInt(spmId));
|
||||
projectMonthCosts.setSltMonthId(Integer.parseInt(taskId));
|
||||
projectMonthCosts.setTaskId(Integer.parseInt(taskId));
|
||||
projectMonthCosts.setUnitId(sltAgreementInfo.getUnitId());
|
||||
projectMonthCosts.setProjectId(sltAgreementInfo.getLotId());
|
||||
projectMonthCosts.setMonth(record.getMonth());
|
||||
|
|
@ -94,7 +100,7 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
|||
agreementInfo.setIds(sltAgreementInfo.getIds());
|
||||
sltAgreementInfo.setMonth(bean.getMonth());
|
||||
agreementInfo.setEndTime(sltAgreementInfo.getOffTime());
|
||||
List<SltAgreementInfo> leaseListOneMonth = getLeaseListOneMonth(agreementInfo, sltAgreementInfo, pmcId);
|
||||
List<SltAgreementInfo> leaseListOneMonth = addProjectMonthDetail(agreementInfo, sltAgreementInfo, pmcId);
|
||||
projectMonthCosts.setCosts(sltAgreementInfo.getCosts());
|
||||
calMonthlyMapper.updateProMonCosts(projectMonthCosts);
|
||||
sltAgreementInfo.setNode(leaseListOneMonth);
|
||||
|
|
@ -106,13 +112,13 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
|||
}
|
||||
|
||||
|
||||
private List<SltAgreementInfo> getLeaseListOneMonth(AgreementInfo list, SltAgreementInfo sltAgreementInfo, Integer pmcId) {
|
||||
private List<SltAgreementInfo> addProjectMonthDetail(AgreementInfo agreementInfo, SltAgreementInfo sltAgreementInfo, Integer pmcId) {
|
||||
ArrayList<String> idList = new ArrayList<>();
|
||||
String[] ids = list.getIds().split(",");
|
||||
String[] ids = agreementInfo.getIds().split(",");
|
||||
for (String id : ids) {
|
||||
idList.add(id);
|
||||
}
|
||||
List<SltAgreementInfo> leaseList = sltAgreementInfoMapper.getLeaseListOneMonth(list, idList);
|
||||
List<SltAgreementInfo> leaseList = sltAgreementInfoMapper.getLeaseListOneMonth(agreementInfo, idList);
|
||||
BigDecimal leaseCostOne = BigDecimal.ZERO;
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (bean.getLeasePrice() == null) {
|
||||
|
|
|
|||
|
|
@ -32,3 +32,10 @@ spring:
|
|||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
# 多站点特殊配置
|
||||
sgzb:
|
||||
site: cq
|
||||
job:
|
||||
settlementJobDay: 21
|
||||
settlementJobCron: "0 0 1 21 * ?"
|
||||
|
|
@ -8,9 +8,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
INSERT INTO slt_project_month (month,create_time) VALUES (#{month},now())
|
||||
</insert>
|
||||
<insert id="insertProMonCosts" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into project_month_costs(agreement_id,slt_month_id,unit_id,project_id,month,cost_bearing_party)
|
||||
insert into project_month_costs(agreement_id,task_id,unit_id,project_id,month,cost_bearing_party)
|
||||
values
|
||||
(#{agreementId},#{sltMonthId},#{unitId},#{projectId},#{month},#{costBearingParty})
|
||||
(#{agreementId},#{taskId},#{unitId},#{projectId},#{month},#{costBearingParty})
|
||||
</insert>
|
||||
<insert id="insertProjectMonthDetail">
|
||||
insert into project_month_detail (type_id,ma_id,unit,start_time,end_time,slt_days,slt_costs,month_temporarily_costs,pro_month_cost_id,num,lease_price)
|
||||
|
|
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<select id="getCalcRecords" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean" resultType="com.bonus.sgzb.material.domain.CalMonthlyBean">
|
||||
select id,month from calc_project_month
|
||||
select id,month from slt_project_month
|
||||
where month = #{month}
|
||||
</select>
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pmc.costs as costs
|
||||
FROM
|
||||
project_month_costs pmc
|
||||
LEFT JOIN slt_project_month spm ON pmc.slt_month_id = spm.id
|
||||
LEFT JOIN slt_project_month spm ON pmc.task_id = spm.id
|
||||
LEFT JOIN bm_agreement_info bai ON pmc.agreement_id = bai.agreement_id
|
||||
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
|
||||
|
|
@ -78,10 +78,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<delete id="deleteCalcRecord" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean">
|
||||
delete from calc_project_month
|
||||
delete from slt_project_month
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMonthlyDetail" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean">
|
||||
delete
|
||||
from project_month_detail
|
||||
where pro_month_cost_id in
|
||||
(select id from project_month_costs where task_id = #{id})
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMonthlyCosts" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean">
|
||||
delete from project_month_costs
|
||||
where task_id = #{id}
|
||||
|
|
|
|||
|
|
@ -553,15 +553,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND sai.start_time <= #{endTime}
|
||||
AND (sai.end_time >= #{startTime} OR sai.end_time IS NULL)
|
||||
GROUP BY
|
||||
( CASE WHEN #{startTime} >= DATE( sai.start_time ) THEN #{startTime} ELSE DATE( sai.start_time ) END ),
|
||||
CASE
|
||||
WHEN #{endTime} >= DATE( COALESCE ( sai.end_time, CURDATE() ) ) THEN
|
||||
DATE(
|
||||
COALESCE (
|
||||
sai.end_time,
|
||||
CURDATE())) ELSE #{endTime}
|
||||
END,
|
||||
lai.cost_bearing_party
|
||||
beginTime,offTime,lai.cost_bearing_party
|
||||
ORDER BY
|
||||
DATE_FORMAT( DATE_ADD( DATE( sai.start_time ), INTERVAL 1 - DAYOFMONTH( sai.start_time ) DAY ), '%Y-%m' )
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -1,107 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>sgzb-modules</artifactId>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>sgzb-modules-settlement</artifactId>
|
||||
|
||||
<description>
|
||||
sgzb-modules-settlement
|
||||
</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Swagger -->
|
||||
<!-- RuoYi Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.bonus.sgzb</groupId>
|
||||
<artifactId>sgzb-common-swagger</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
package com.bonus.sgzb.settlement;
|
||||
|
||||
|
||||
import com.bonus.sgzb.common.security.annotation.EnableCustomConfig;
|
||||
import com.bonus.sgzb.common.security.annotation.EnableRyFeignClients;
|
||||
import com.bonus.sgzb.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 结算服务
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableCustomSwagger2
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
|
||||
@EnableCustomConfig
|
||||
@EnableRyFeignClients
|
||||
public class SgzbSettlementApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(SgzbSettlementApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 结算模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ __ _ _
|
||||
(_) / _|(_)| |
|
||||
_ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
|
||||
| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
|
||||
| | | |_| || (_) || |_| || | | | | || || __/
|
||||
|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
|
||||
__/ |
|
||||
|___/
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9304
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: sgzb-settlement
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: sgzb_cloud_dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev_cqjj
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 192.168.0.14:8848
|
||||
namespace: sgzb_cloud_dev_cqjj
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/ruoyi-file" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.ruoyi" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
Loading…
Reference in New Issue