Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
9a55ef1441
|
|
@ -159,7 +159,8 @@ public class RepairServiceImpl implements RepairService {
|
||||||
partDetails.setPartCost("0");
|
partDetails.setPartCost("0");
|
||||||
}
|
}
|
||||||
BigDecimal partCost = new BigDecimal(partDetails.getPartCost());
|
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())) {
|
} else if (bsfPart.equals(partDetails.getPartType())) {
|
||||||
if (StringUtils.isEmpty(partDetails.getPartCost())) {
|
if (StringUtils.isEmpty(partDetails.getPartCost())) {
|
||||||
partDetails.setPartCost("0");
|
partDetails.setPartCost("0");
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@
|
||||||
values (#{taskId},#{id},#{maId},#{typeId},#{repairNum},#{repairedNum},#{scrapNum},'0',#{createBy},now(),#{companyId});
|
values (#{taskId},#{id},#{maId},#{typeId},#{repairNum},#{repairedNum},#{scrapNum},'0',#{createBy},now(),#{companyId});
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="addRepairCost">
|
<insert id="addRepairCost">
|
||||||
insert into repair_cost (task_id,repair_id,type_id,ma_id,repair_num,costs,part_type,status,company_id)
|
insert into repair_cost (task_id,repair_id,type_id,ma_id,repair_num,costs,part_type,status,company_id,repair_type)
|
||||||
values (#{bean.taskId},#{bean.id},#{bean.typeId},#{bean.maId},#{bean.repairNum},#{costs},#{partType},'0',#{bean.companyId});
|
values (#{bean.taskId},#{bean.id},#{bean.typeId},#{bean.maId},#{bean.repairNum},#{costs},#{partType},'0',#{bean.companyId},#{bean.repairType});
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateRepairedNum">
|
<update id="updateRepairedNum">
|
||||||
update repair_apply_details
|
update repair_apply_details
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
return leaseList;
|
return leaseList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**结算单号编码生成规则*/
|
/**
|
||||||
|
* 结算单号编码生成规则
|
||||||
|
*/
|
||||||
private String sltCodeRule(String code) {
|
private String sltCodeRule(String code) {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
Date nowDate = DateUtils.getNowDate();
|
Date nowDate = DateUtils.getNowDate();
|
||||||
|
|
|
||||||
|
|
@ -94,12 +94,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
<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,
|
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,
|
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,
|
||||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol,sar.cost as cost,
|
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
|
case when sar.id is null then '1' when sar.status = '0' then '2' when sar.status = '1' then '3' end as sltStatus
|
||||||
FROM bm_agreement_info bai
|
FROM bm_agreement_info bai
|
||||||
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_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_unit_info bui ON bui.unit_id = bai.unit_id
|
||||||
left join slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
|
LEFT JOIN slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
|
||||||
|
LEFT JOIN slt_agreement_apply saa on saa.id = sar.apply_id
|
||||||
where bai.status = '1'
|
where bai.status = '1'
|
||||||
<if test="unitId != null and unitId != ''">
|
<if test="unitId != null and unitId != ''">
|
||||||
and bui.unit_id = #{unitId}
|
and bui.unit_id = #{unitId}
|
||||||
|
|
@ -184,9 +185,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mt1.type_name as typeName,
|
mt1.type_name as typeName,
|
||||||
mt.type_name as modelName,
|
mt.type_name as modelName,
|
||||||
mt.unit_name as nuitName,
|
mt.unit_name as nuitName,
|
||||||
sum(rc.repair_num ) as num,
|
rc.repair_num as num,
|
||||||
sum(rc.costs * rc.repair_num) as costs,
|
rc.costs as costs,
|
||||||
case rc.part_type when '0' then '不收费' when '1' then '收费' else '' end as partType,
|
case rc.repair_type when '1' then '内部维修' when '2' then '返厂维修' else '' end as partType,
|
||||||
sd.name as repairStatus,
|
sd.name as repairStatus,
|
||||||
rc.company_id as companyId
|
rc.company_id as companyId
|
||||||
from repair_cost rc
|
from repair_cost rc
|
||||||
|
|
@ -205,7 +206,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{task.taskId}
|
#{task.taskId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
group by rc.type_id,rc.ma_id,rc.part_type,rc.status
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getScrapDetailsList" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
<select id="getScrapDetailsList" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||||
select tta.agreement_id as agreementId,
|
select tta.agreement_id as agreementId,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue