测试bug提交
This commit is contained in:
parent
8cc289e502
commit
35e264680c
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -96,7 +97,7 @@ public class RepairApplyRecord implements Serializable {
|
||||||
* 配件单价
|
* 配件单价
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "配件单价")
|
@ApiModelProperty(value = "配件单价")
|
||||||
private String partPrice;
|
private BigDecimal partPrice;
|
||||||
/**
|
/**
|
||||||
* 维修内容
|
* 维修内容
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
partDetails.setCreateBy(loginUser.getUserid());
|
partDetails.setCreateBy(loginUser.getUserid());
|
||||||
partDetails.setCompanyId(bean.getCompanyId());
|
partDetails.setCompanyId(bean.getCompanyId());
|
||||||
mapper.addPart(partDetails);
|
mapper.addPart(partDetails);
|
||||||
bean.setPartPrice(partDetails.getPartCost());
|
bean.setPartPrice(new BigDecimal(partDetails.getPartCost()));
|
||||||
partNum += partDetails.getPartNum();
|
partNum += partDetails.getPartNum();
|
||||||
bean.setRepairContent(partDetails.getRepairContent());
|
bean.setRepairContent(partDetails.getRepairContent());
|
||||||
bean.setPartType(partDetails.getPartType());
|
bean.setPartType(partDetails.getPartType());
|
||||||
|
|
@ -152,7 +152,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
} else {
|
} else {
|
||||||
bean.setSupplierId(partList.get(0).getSupplierId());
|
bean.setSupplierId(partList.get(0).getSupplierId());
|
||||||
}
|
}
|
||||||
bean.setPartPrice(partList.get(0).getPartPrice());
|
bean.setPartPrice(new BigDecimal(partList.get(0).getPartPrice()));
|
||||||
bean.setPartNum(partList.get(0).getPartNum());
|
bean.setPartNum(partList.get(0).getPartNum());
|
||||||
}
|
}
|
||||||
for (RepairPartDetails partDetails : partList) {
|
for (RepairPartDetails partDetails : partList) {
|
||||||
|
|
|
||||||
|
|
@ -1045,12 +1045,27 @@
|
||||||
SELECT
|
SELECT
|
||||||
lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,
|
lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,
|
||||||
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
|
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
|
||||||
IFNULL(mt.num,0) AS num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode
|
CASE mt.manage_type
|
||||||
|
WHEN 0 THEN
|
||||||
|
IFNULL(subquery0.num, 0)
|
||||||
|
ELSE
|
||||||
|
IFNULL(mt.num, 0)
|
||||||
|
END as num,
|
||||||
|
(lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode
|
||||||
FROM
|
FROM
|
||||||
lease_apply_details lad
|
lease_apply_details lad
|
||||||
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id
|
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id
|
||||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||||
LEFT JOIN ma_machine mm ON lad.type_id = mm.type_id
|
LEFT JOIN (SELECT mt.type_id,
|
||||||
|
mt2.type_name AS typeName,
|
||||||
|
mt.type_name AS typeModelName,
|
||||||
|
mm.ma_code,
|
||||||
|
count(mm.ma_id) num
|
||||||
|
FROM ma_machine mm
|
||||||
|
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
|
||||||
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
|
WHERE mm.ma_code is not null and mm.ma_status in (15)
|
||||||
|
GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = mt.type_id
|
||||||
WHERE
|
WHERE
|
||||||
lad.parennt_id = #{record.id}
|
lad.parennt_id = #{record.id}
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue