Compare commits

..

No commits in common. "699e66ee32a3c9f7177c395b256a7acbc83a44d9" and "5dae109c54e8385ca4e3778970f0223a51683067" have entirely different histories.

15 changed files with 65 additions and 102 deletions

View File

@ -4,7 +4,6 @@ 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;
@ -796,19 +795,6 @@ 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,10 +112,7 @@ 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);
@ -139,14 +136,13 @@ public class RepairServiceImpl implements RepairService {
for (RepairPartDetails partDetails : partList) {
if (sfPart.equals(partDetails.getPartType())) {
if (StringUtils.isBlank(partDetails.getPartCost())) {
if (StringUtils.isEmpty(partDetails.getPartCost())) {
partDetails.setPartCost("0");
}
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
BigDecimal partNumber = new BigDecimal(partDetails.getPartNum());
sfCosts = sfCosts.add(partCost.multiply(partNumber));
sfCosts = sfCosts.add(partCost);
} else if (bsfPart.equals(partDetails.getPartType())) {
if (StringUtils.isBlank(partDetails.getPartCost())) {
if (StringUtils.isEmpty(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 = 9;
private final int CAL_DAY = 6;
// @Scheduled(cron = "0 */1 * * * ? ") // 间隔5分钟执行
// @Scheduled(cron = "0 0 1 22 * ? ") // 每个月22日凌晨1点执行

View File

@ -58,7 +58,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
//维修费用列表
List<SltAgreementInfo> repairList = getRepairList(list);
//报废费用列表
List<SltAgreementInfo> scrapList = getScrapList(list);
//预报废费用列表
List<SltAgreementInfo> preScrapList = getPreScrapList(list);
@ -75,7 +74,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return sltInfoVo;
}
@Override
public List<SltAgreementInfo> getPreScrapList(List<AgreementInfo> list) {
List<SltAgreementInfo> scrapList = new ArrayList<>();
String taskType = "57";
@ -225,9 +223,7 @@ 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;
@ -337,7 +333,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
}
@Override
public List<SltAgreementInfo> getLoseList(List<AgreementInfo> list) {
List<SltAgreementInfo> loseList = new ArrayList<>();
for (AgreementInfo bean : list) {
@ -366,7 +361,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return loseList;
}
@Override
public List<SltAgreementInfo> getScrapList(List<AgreementInfo> list) {
List<SltAgreementInfo> scrapList = new ArrayList<>();
String taskType = "57";
@ -416,12 +410,12 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
Integer num = 0;
//租赁费用列表
for (AgreementInfo agreementInfo : list) {
// 如果选择了最新月份则需要查数据
if (StringUtils.isNotBlank(agreementInfo.getStartTime()) && StringUtils.isNotBlank(agreementInfo.getEndTime()) && DateTimeHelper.getNowMonth().equals(DateTimeHelper.getNowMonth(DateTimeHelper.parse(agreementInfo.getEndTime(), "yyyy-MM")))) {
// 如果不选择具体日期或者选择了最新月份则需要查数据
if (agreementInfo.getStartTime() == null || 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);
}
@ -430,10 +424,6 @@ 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) {
@ -452,7 +442,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();
@ -467,7 +457,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();
@ -481,7 +471,7 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
sltAgreementInfo.setNode(leaseListOneMonth);
}
leaseList.addAll(oneOfList);
}*/
}
// }
return leaseList;
}
@ -526,7 +516,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return leaseList;
}
@Override
public List<SltAgreementInfo> getRepairList(List<AgreementInfo> list) {
List<SltAgreementInfo> repairList = new ArrayList<>();
String taskType = "41";
@ -541,7 +530,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
return repairList;
}
@Override
public List<SltAgreementInfo> getLeaseListOne(List<AgreementInfo> list) {
List<SltAgreementInfo> leaseList = new ArrayList<>();
for (AgreementInfo bean : list) {
@ -571,9 +559,7 @@ 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,14 +40,8 @@ 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 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>
WHERE
spm.month = DATE_FORMAT(#{endTime}, '%Y-%m')
</select>
<select id="getMonthDetails" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
SELECT

View File

@ -95,7 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
end_time = #{endTime},
</if>
</set>
where id = #{id}
where agreement_id = #{agreementId} and type_id = #{typeId}
<if test="maId != null and maId != ''">
and ma_id = #{maId}
</if>
</update>
<update id="updateInfoOneStatus">
UPDATE slt_agreement_info sai
@ -204,8 +207,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
rc.repair_num as num,
rc.costs as costs,
rc.out_source_costs as outSourceCosts,
rc.costs AS partAllCosts,
ROUND(rc.costs + IFNULL(rc.out_source_costs ,0), 2) AS allCosts,
ROUND(rc.repair_num * rc.costs, 2) AS partAllCosts,
ROUND(rc.repair_num * 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,
@ -246,8 +249,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_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 bm_unit_info bui ON bui.unit_id = bai.unit_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,3 +889,4 @@ 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,9 +267,8 @@
></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,8 +791,7 @@ export default {
this.$tab.closeOpenPage(obj)
},
async handleBindDetails(row) {
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId, row)
this.surplusNoBindNum = row.checkNum - row.bindNum
console.log('🚀 ~ handleBindDetails ~ row:', row.taskId)
this.open = true
this.isDetail = true
this.title = '编码绑定详情'

View File

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

View File

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

View File

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

View File

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

View File

@ -713,7 +713,6 @@ export default {
maCode: row.maCode,
typeId: row.typeId,
num: row.num,
manageType: row.manageType,
}
let param = {
@ -767,7 +766,6 @@ 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://192.168.2.216:39080`, //福
// target: `http://10.40.92.253:28080`, //福
// target: `http://192.168.2.120:39080`, //跃
//******** 注意事项 ********* */