Compare commits

...

12 Commits

Author SHA1 Message Date
liang.chao 699e66ee32 Merge branch 'master' into lc20240808 2024-08-13 10:57:45 +08:00
liang.chao c42d2099d1 Merge branch 'dev-cq-bug' of http://192.168.0.56:3000/bonus/cqdevicemgt into dev-cq-bug 2024-08-13 10:53:35 +08:00
liang.chao a7991c4005 Merge branch 'master' into dev-cq-bug 2024-08-13 10:28:28 +08:00
liang.chao ce2396aafc 短信功能完善 2024-08-13 10:27:54 +08:00
liang.chao c0fd7885dc 短信功能完善 2024-08-13 10:12:37 +08:00
liang.chao ee396ed430 结算功能完善 2024-08-13 09:07:25 +08:00
BianLzhaoMin 5aae85cadb bug修改 2024-08-12 17:38:28 +08:00
BianLzhaoMin 3619269ee4 代码优化 2024-08-12 13:11:46 +08:00
liang.chao a2baadf840 结算功能完善 2024-08-09 17:03:26 +08:00
liang.chao 84e3e319fa Merge branch 'master' into lc20240808 2024-08-09 11:00:34 +08:00
liang.chao 7506398006 结算功能完善 2024-08-09 10:59:52 +08:00
liang.chao 1add2b914b 开启新分支 2024-08-08 17:06:39 +08:00
15 changed files with 102 additions and 65 deletions

View File

@ -4,6 +4,7 @@ import org.apache.commons.lang3.time.DateUtils;
import java.text.*;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
@ -795,6 +796,19 @@ public class DateTimeHelper {
return lastDayOfMonth;
}
// 获取上个月的年月
public static String getLastMonthYearMonth() {
// 获取当前时间的年月
YearMonth now = YearMonth.now();
// 减去一个月
YearMonth lastMonth = now.minusMonths(1);
// 将YearMonth对象格式化为字符串
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
return lastMonth.format(formatter);
}
public static void main(String[] args) {
System.err.println(getTimeAfterThirtyDay());
System.err.println(getNowTime());

View File

@ -112,7 +112,10 @@ public class RepairServiceImpl implements RepairService {
partDetails.setCreateBy(loginUser.getUserid());
partDetails.setCompanyId(bean.getCompanyId());
mapper.addPart(partDetails);
bean.setPartPrice(partDetails.getPartCost());
partNum += partDetails.getPartNum();
bean.setRepairContent(partDetails.getRepairContent());
bean.setPartType(partDetails.getPartType());
}
}
bean.setPartNum(partNum);
@ -136,13 +139,14 @@ public class RepairServiceImpl implements RepairService {
for (RepairPartDetails partDetails : partList) {
if (sfPart.equals(partDetails.getPartType())) {
if (StringUtils.isEmpty(partDetails.getPartCost())) {
if (StringUtils.isBlank(partDetails.getPartCost())) {
partDetails.setPartCost("0");
}
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
sfCosts = sfCosts.add(partCost);
BigDecimal partNumber = new BigDecimal(partDetails.getPartNum());
sfCosts = sfCosts.add(partCost.multiply(partNumber));
} else if (bsfPart.equals(partDetails.getPartType())) {
if (StringUtils.isEmpty(partDetails.getPartCost())) {
if (StringUtils.isBlank(partDetails.getPartCost())) {
partDetails.setPartCost("0");
}
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());

View File

@ -13,7 +13,7 @@ public class Inform {
@Autowired
private CalcMonthlyService calcfourCostService;
private final int CAL_DAY = 6;
private final int CAL_DAY = 9;
// @Scheduled(cron = "0 */1 * * * ? ") // 间隔5分钟执行
// @Scheduled(cron = "0 0 1 22 * ? ") // 每个月22日凌晨1点执行

View File

@ -58,6 +58,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
//维修费用列表
List<SltAgreementInfo> repairList = getRepairList(list);
//报废费用列表
List<SltAgreementInfo> scrapList = getScrapList(list);
//预报废费用列表
List<SltAgreementInfo> preScrapList = getPreScrapList(list);
@ -74,6 +75,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return sltInfoVo;
}
@Override
public List<SltAgreementInfo> getPreScrapList(List<AgreementInfo> list) {
List<SltAgreementInfo> scrapList = new ArrayList<>();
String taskType = "57";
@ -223,7 +225,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
// 应结算金额
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
bean.setCosts(String.valueOf(costs));
//实际结算天数
bean.setRealDays(realDays);
// 实际结算金额
bean.setRealCosts(String.valueOf(realCosts));
}
return leaseList;
@ -333,6 +337,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
}
@Override
public List<SltAgreementInfo> getLoseList(List<AgreementInfo> list) {
List<SltAgreementInfo> loseList = new ArrayList<>();
for (AgreementInfo bean : list) {
@ -361,6 +366,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return loseList;
}
@Override
public List<SltAgreementInfo> getScrapList(List<AgreementInfo> list) {
List<SltAgreementInfo> scrapList = new ArrayList<>();
String taskType = "57";
@ -410,12 +416,12 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
Integer num = 0;
//租赁费用列表
for (AgreementInfo agreementInfo : list) {
// 如果不选择具体日期或者选择了最新月份则需要查数据
if (agreementInfo.getStartTime() == null || DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
// 如果选择了最新月份则需要查数据
if (StringUtils.isNotBlank(agreementInfo.getStartTime()) && StringUtils.isNotBlank(agreementInfo.getEndTime()) && DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
List<SltAgreementInfo> listMonth = getLeaseListMonth(agreementInfo, num);
leaseListMonth.addAll(listMonth);
} else {
// 查定时任务记录的数据
// 如果不传日期或传以往日期 查定时任务记录的数据
List<SltAgreementInfo> listMonth = getLeaseJobListMonth(agreementInfo);
leaseListMonth.addAll(listMonth);
}
@ -424,6 +430,10 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
}
private List<SltAgreementInfo> getLeaseJobListMonth(AgreementInfo agreementInfo) {
if (StringUtils.isBlank(agreementInfo.getEndTime())) {
String lastMonthYearMonth = DateTimeHelper.getLastMonthYearMonth();
agreementInfo.setEndTime(lastMonthYearMonth);
}
List<SltAgreementInfo> monthCosts = calMonthlyMapper.getMonthCosts(agreementInfo);
int num = 0;
for (SltAgreementInfo monthCost : monthCosts) {
@ -442,7 +452,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
private List<SltAgreementInfo> getLeaseListMonth(AgreementInfo bean, Integer num) {
List<SltAgreementInfo> leaseList = new ArrayList<>();
// for (AgreementInfo bean : list) {
if (StringUtils.isNotBlank(bean.getStartTime()) && StringUtils.isNotBlank(bean.getEndTime())) {
// if (StringUtils.isNotBlank(bean.getStartTime()) && StringUtils.isNotBlank(bean.getEndTime())) {
List<SltAgreementInfo> monthList = sltAgreementInfoMapper.getLeaseListMonthNotNull(bean);
for (SltAgreementInfo sltAgreementInfo : monthList) {
AgreementInfo agreementInfo = new AgreementInfo();
@ -457,7 +467,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
sltAgreementInfo.setNode(leaseListOneMonth);
}
leaseList.addAll(monthList);
} else {
/* } else {
List<SltAgreementInfo> oneOfList = sltAgreementInfoMapper.getLeaseListMonth(bean);
for (SltAgreementInfo sltAgreementInfo : oneOfList) {
AgreementInfo agreementInfo = new AgreementInfo();
@ -471,7 +481,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
sltAgreementInfo.setNode(leaseListOneMonth);
}
leaseList.addAll(oneOfList);
}
}*/
// }
return leaseList;
}
@ -516,6 +526,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return leaseList;
}
@Override
public List<SltAgreementInfo> getRepairList(List<AgreementInfo> list) {
List<SltAgreementInfo> repairList = new ArrayList<>();
String taskType = "41";
@ -530,6 +541,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return repairList;
}
@Override
public List<SltAgreementInfo> getLeaseListOne(List<AgreementInfo> list) {
List<SltAgreementInfo> leaseList = new ArrayList<>();
for (AgreementInfo bean : list) {
@ -559,7 +571,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
// 应结算金额
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
bean.setCosts(String.valueOf(costs));
//实际结算天数
bean.setRealDays(realDays);
// 实际结算金额
bean.setRealCosts(String.valueOf(realCosts));
}
return leaseList;

View File

@ -40,8 +40,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
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
WHERE
spm.month = DATE_FORMAT(#{endTime}, '%Y-%m')
WHERE 1=1
<if test="endTime != null and endTime != ''">
and spm.month = #{endTime}
</if>
AND pmc.agreement_id = #{agreementId}
<if test="costBearingParty != null and costBearingParty != ''">
and pmc.cost_bearing_party = #{costBearingParty}
</if>
</select>
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
SELECT

View File

@ -95,10 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
end_time = #{endTime},
</if>
</set>
where agreement_id = #{agreementId} and type_id = #{typeId}
<if test="maId != null and maId != ''">
and ma_id = #{maId}
</if>
where id = #{id}
</update>
<update id="updateInfoOneStatus">
UPDATE slt_agreement_info sai
@ -207,8 +204,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rc.repair_num as num,
rc.costs as costs,
rc.out_source_costs as outSourceCosts,
ROUND(rc.repair_num * rc.costs, 2) AS partAllCosts,
ROUND(rc.repair_num * rc.costs + IFNULL(rc.out_source_costs ,0), 2) AS allCosts,
rc.costs AS partAllCosts,
ROUND(rc.costs + IFNULL(rc.out_source_costs ,0), 2) AS allCosts,
mpt.pa_name partModelName,
mpt2.pa_name partName,
case rc.part_type when '0' then '不收费' when '1' then '收费' else '' end as partType,
@ -249,8 +246,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from scrap_apply_details sad
left join tm_task_agreement tta on sad.task_id = tta.task_id
LEFT JOIN bm_agreement_info bai on tta.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
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
left join ma_type mt on sad.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join ma_machine mm on mm.ma_id = sad.ma_id

View File

@ -598,7 +598,7 @@ export default {
this.queryParams.examineStatusId = '32'
}
this.queryParams.unitId = data.unitId
this.queryParams.costBearingParty = data?.costBearingParty
this.queryParams.costBearingParty = data.costBearingParty
this.queryParams.proId = data.proId
this.queryParams.leaseApplyInfo.phone =
data.leaseApplyInfoList[0].phone
@ -633,7 +633,7 @@ export default {
}
this.queryParams.unitId = data.unitId
this.queryParams.proId = data.proId
this.queryParams.costBearingParty = data?.costBearingParty
this.queryParams.costBearingParty = data.costBearingParty
this.queryParams.leaseApplyInfo.phone =
data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson =
@ -889,4 +889,3 @@ export default {
},
}
</script>

View File

@ -100,7 +100,7 @@
<el-form-item
v-if="domain.partType == 1"
:prop="'premiumList.' + index + '.partCost'"
label="配件费用"
label="配件单价"
:rules="{
required: false,
validator: meneyIntegerValidator,
@ -267,8 +267,9 @@
></el-input>
</el-form-item>
<el-form-item
v-if="domain.partType == 1"
:prop="'premiumListTwo.' + index + '.partCost'"
label="配件费用"
label="配件单价"
:rules="{
required: false,
validator: meneyIntegerValidator,

View File

@ -791,7 +791,8 @@ export default {
this.$tab.closeOpenPage(obj)
},
async handleBindDetails(row) {
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId)
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId, row)
this.surplusNoBindNum = row.checkNum - row.bindNum
this.open = true
this.isDetail = true
this.title = '编码绑定详情'

View File

@ -558,7 +558,6 @@ export default {
// .then(() => {
// this.$tab.refreshPage()
// })
this.$emit('queryTools', row.taskId)
},
/** 修改按钮操作 */

View File

@ -190,6 +190,7 @@
>
验收
</el-button>
<!-- <el-button
size="mini"
type="text"

View File

@ -71,6 +71,7 @@ export default {
/* 查询工机具 */
queryTools(taskId) {
this.isView = true
this.pageContent = '详情信息'
this.queryTaskId = taskId
this.isShowComponent = 'QueryTools'

View File

@ -306,18 +306,21 @@
</el-select>
</el-form-item>-->
<el-form-item label="机具类型" prop="typeId">
<treeselect
<el-form-item label="配件类型" prop="typeId">
<el-select
v-model="query.typeId"
default-expand-all
:options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
placeholder="请选择配件类型"
clearable
filterable
style="width: 240px"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"
>
<el-option
v-for="typeItem in typeList"
:key="typeItem.partId"
:label="typeItem.partName"
:value="typeItem.partId"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
@ -467,9 +470,13 @@
</el-dialog>
<!-- 入库单弹窗 -->
<el-dialog :visible.sync="openPrint" width="900px" append-to-body>
<div style="height: 400px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<el-dialog :visible.sync="openPrint" width="80%" append-to-body>
<div>
<vue-easy-print
tableShow
ref="remarksPrintRef"
class="print print-content"
>
<div
class="title"
style="
@ -528,16 +535,7 @@
<span>车辆信息</span>
</div> -->
</div>
<el-table
:data="printTableData"
class="table"
style="
margin-top: 20px;
padding-bottom: 1px;
padding-right: 1px;
"
border
>
<el-table :data="printTableData" class="table">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column
label="序号"

View File

@ -713,6 +713,7 @@ export default {
maCode: row.maCode,
typeId: row.typeId,
num: row.num,
manageType: row.manageType,
}
let param = {
@ -766,6 +767,7 @@ export default {
maCode: row.maCode,
inputNum: row.checkNum,
typeId: row.typeId,
manageType: row.manageType,
}
let param = {

View File

@ -42,11 +42,11 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
target: `http://192.168.2.154:39080`, //超
// target: `http://192.168.2.154:39080`, //超
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/
// target: `http://10.40.92.138:28080`, //帅
// target: `http://10.40.92.253:28080`, //福
target: `http://192.168.2.216:39080`, //福
// target: `http://192.168.2.120:39080`, //跃
//******** 注意事项 ********* */