Compare commits
12 Commits
5dae109c54
...
699e66ee32
| Author | SHA1 | Date |
|---|---|---|
|
|
699e66ee32 | |
|
|
c42d2099d1 | |
|
|
a7991c4005 | |
|
|
ce2396aafc | |
|
|
c0fd7885dc | |
|
|
ee396ed430 | |
|
|
5aae85cadb | |
|
|
3619269ee4 | |
|
|
a2baadf840 | |
|
|
84e3e319fa | |
|
|
7506398006 | |
|
|
1add2b914b |
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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点执行
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 = '编码绑定详情'
|
||||
|
|
|
|||
|
|
@ -558,7 +558,6 @@ export default {
|
|||
// .then(() => {
|
||||
// this.$tab.refreshPage()
|
||||
// })
|
||||
|
||||
this.$emit('queryTools', row.taskId)
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@
|
|||
>
|
||||
验收
|
||||
</el-button>
|
||||
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ export default {
|
|||
/* 查询工机具 */
|
||||
queryTools(taskId) {
|
||||
this.isView = true
|
||||
|
||||
this.pageContent = '详情信息'
|
||||
this.queryTaskId = taskId
|
||||
this.isShowComponent = 'QueryTools'
|
||||
|
|
|
|||
|
|
@ -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="序号"
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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`, //跃
|
||||
|
||||
//******** 注意事项 ********* */
|
||||
|
|
|
|||
Loading…
Reference in New Issue