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");
|
||||
}
|
||||
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())) {
|
||||
partDetails.setPartCost("0");
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
values (#{taskId},#{id},#{maId},#{typeId},#{repairNum},#{repairedNum},#{scrapNum},'0',#{createBy},now(),#{companyId});
|
||||
</insert>
|
||||
<insert id="addRepairCost">
|
||||
insert into repair_cost (task_id,repair_id,type_id,ma_id,repair_num,costs,part_type,status,company_id)
|
||||
values (#{bean.taskId},#{bean.id},#{bean.typeId},#{bean.maId},#{bean.repairNum},#{costs},#{partType},'0',#{bean.companyId});
|
||||
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},#{bean.repairType});
|
||||
</insert>
|
||||
<update id="updateRepairedNum">
|
||||
update repair_apply_details
|
||||
|
|
|
|||
|
|
@ -344,7 +344,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
return leaseList;
|
||||
}
|
||||
|
||||
/**结算单号编码生成规则*/
|
||||
/**
|
||||
* 结算单号编码生成规则
|
||||
*/
|
||||
private String sltCodeRule(String code) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
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 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,
|
||||
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
|
||||
FROM bm_agreement_info bai
|
||||
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 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'
|
||||
<if test="unitId != null and unitId != ''">
|
||||
and bui.unit_id = #{unitId}
|
||||
|
|
@ -184,9 +185,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt1.type_name as typeName,
|
||||
mt.type_name as modelName,
|
||||
mt.unit_name as nuitName,
|
||||
sum(rc.repair_num ) as num,
|
||||
sum(rc.costs * rc.repair_num) as costs,
|
||||
case rc.part_type when '0' then '不收费' when '1' then '收费' else '' end as partType,
|
||||
rc.repair_num as num,
|
||||
rc.costs as costs,
|
||||
case rc.repair_type when '1' then '内部维修' when '2' then '返厂维修' else '' end as partType,
|
||||
sd.name as repairStatus,
|
||||
rc.company_id as companyId
|
||||
from repair_cost rc
|
||||
|
|
@ -205,7 +206,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{task.taskId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by rc.type_id,rc.ma_id,rc.part_type,rc.status
|
||||
</select>
|
||||
<select id="getScrapDetailsList" resultType="com.bonus.sgzb.base.api.domain.SltAgreementInfo">
|
||||
select tta.agreement_id as agreementId,
|
||||
|
|
|
|||
Loading…
Reference in New Issue