Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
ab24cae703
|
|
@ -82,10 +82,10 @@ public class RepairServiceImpl implements RepairService {
|
|||
List<RepairPartDetails> partList = bean.getPartList();
|
||||
BigDecimal sfCosts = new BigDecimal("0");
|
||||
BigDecimal bsfCosts = new BigDecimal("0");
|
||||
String nbType = "1";
|
||||
String fcType = "2";
|
||||
String sfPart = "1";
|
||||
String bsfPart = "0";
|
||||
String nbType = "1"; // 内部维修
|
||||
String fcType = "2"; //返厂维修
|
||||
String sfPart = "1"; //收费
|
||||
String bsfPart = "0"; // 不收费
|
||||
if (partList != null && partList.size() > 0) {
|
||||
bean.setRepairNum(partList.get(0).getRepairNum());
|
||||
bean.setRepairer(partList.get(0).getRepairer());
|
||||
|
|
@ -134,6 +134,10 @@ public class RepairServiceImpl implements RepairService {
|
|||
partDetails.setCreateBy(loginUser.getUserid());
|
||||
partDetails.setCompanyId(bean.getCompanyId());
|
||||
mapper.addPart(partDetails);
|
||||
bean.setPartPrice(partDetails.getPartCost());
|
||||
bean.setPartNum(partDetails.getPartNum());
|
||||
bean.setRepairContent(partDetails.getRepairContent());
|
||||
bean.setPartType(partDetails.getPartType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -146,11 +150,7 @@ public class RepairServiceImpl implements RepairService {
|
|||
} else {
|
||||
bean.setSupplierId(partList.get(0).getSupplierId());
|
||||
}
|
||||
if (bean.getPartPrice() == null || bean.getPartPrice().isEmpty()) {
|
||||
bean.setPartPrice("0");
|
||||
} else {
|
||||
bean.setPartPrice(partList.get(0).getPartPrice());
|
||||
}
|
||||
bean.setPartPrice(partList.get(0).getPartPrice());
|
||||
bean.setPartNum(partList.get(0).getPartNum());
|
||||
}
|
||||
for (RepairPartDetails partDetails : partList) {
|
||||
|
|
|
|||
|
|
@ -61,10 +61,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@Log(title = "租赁明细导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportLease")
|
||||
public void exportLease(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
|
||||
{
|
||||
public void exportLease(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getLeaseList(list);
|
||||
List<LeaseInfo> leaseInfoList = Convert.toList(LeaseInfo.class,explist);
|
||||
List<LeaseInfo> leaseInfoList = Convert.toList(LeaseInfo.class, explist);
|
||||
ExcelUtil<LeaseInfo> util = new ExcelUtil<LeaseInfo>(LeaseInfo.class);
|
||||
util.exportExcel(response, leaseInfoList, "租赁明细导出");
|
||||
}
|
||||
|
|
@ -74,10 +73,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@Log(title = "丢失明细导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportLose")
|
||||
public void exportLose(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
|
||||
{
|
||||
public void exportLose(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getLoseList(list);
|
||||
List<LoseInfo> leaseInfoList = Convert.toList(LoseInfo.class,explist);
|
||||
List<LoseInfo> leaseInfoList = Convert.toList(LoseInfo.class, explist);
|
||||
ExcelUtil<LoseInfo> util = new ExcelUtil<LoseInfo>(LoseInfo.class);
|
||||
util.exportExcel(response, leaseInfoList, "丢失明细导出");
|
||||
}
|
||||
|
|
@ -87,10 +85,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@Log(title = "维修明细导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportRepair")
|
||||
public void exportRepair(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
|
||||
{
|
||||
public void exportRepair(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getRepairList(list);
|
||||
List<LeaseInfo> leaseInfoList = Convert.toList(LeaseInfo.class,explist);
|
||||
List<LeaseInfo> leaseInfoList = Convert.toList(LeaseInfo.class, explist);
|
||||
ExcelUtil<LeaseInfo> util = new ExcelUtil<LeaseInfo>(LeaseInfo.class);
|
||||
util.exportExcel(response, leaseInfoList, "维修明细导出");
|
||||
}
|
||||
|
|
@ -100,10 +97,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@Log(title = "报废明细导出", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/exportScrap")
|
||||
public void exportScrap(HttpServletResponse response,@RequestBody List<AgreementInfo> list)
|
||||
{
|
||||
public void exportScrap(HttpServletResponse response, @RequestBody List<AgreementInfo> list) {
|
||||
List<SltAgreementInfo> explist = sltAgreementInfoService.getScrapList(list);
|
||||
List<ScrapInfo> leaseInfoList = Convert.toList(ScrapInfo.class,explist);
|
||||
List<ScrapInfo> leaseInfoList = Convert.toList(ScrapInfo.class, explist);
|
||||
ExcelUtil<ScrapInfo> util = new ExcelUtil<ScrapInfo>(ScrapInfo.class);
|
||||
util.exportExcel(response, leaseInfoList, "维修明细导出");
|
||||
}
|
||||
|
|
@ -113,8 +109,10 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "费用结算提交")
|
||||
@PostMapping("/submitFee")
|
||||
public AjaxResult submitFee(@RequestBody SltAgreementApply apply)
|
||||
{
|
||||
public AjaxResult submitFee(@RequestBody SltAgreementApply apply) {
|
||||
if (apply.getRelations().get(0).getAgreementId() == null) {
|
||||
return AjaxResult.error("该协议还未领取机具");
|
||||
}
|
||||
return sltAgreementInfoService.submitFee(apply);
|
||||
}
|
||||
|
||||
|
|
@ -123,8 +121,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "获取结算审核列表")
|
||||
@GetMapping("/getSltExam")
|
||||
public TableDataInfo getSltExam(AgreementInfo bean)
|
||||
{
|
||||
public TableDataInfo getSltExam(AgreementInfo bean) {
|
||||
startPage();
|
||||
List<SltAgreementApply> list = sltAgreementInfoService.getSltExam(bean);
|
||||
return getDataTable(list);
|
||||
|
|
@ -135,8 +132,7 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "获取结算审核清单")
|
||||
@GetMapping("/getSltExamInfo")
|
||||
public AjaxResult getSltExamInfo(SltAgreementApply apply)
|
||||
{
|
||||
public AjaxResult getSltExamInfo(SltAgreementApply apply) {
|
||||
SltInfoVo bean = sltAgreementInfoService.getSltExamInfo(apply);
|
||||
return AjaxResult.success(bean);
|
||||
}
|
||||
|
|
@ -146,11 +142,9 @@ public class SltAgreementInfoController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "结算审核")
|
||||
@GetMapping("/settlementReview")
|
||||
public AjaxResult settlementReview(SltAgreementApply apply)
|
||||
{
|
||||
public AjaxResult settlementReview(SltAgreementApply apply) {
|
||||
return toAjax(sltAgreementInfoService.settlementReview(apply));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,10 +117,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
List<SltAgreementRelation> relations = new ArrayList<>();
|
||||
for (AgreementInfo info : list){
|
||||
SltAgreementRelation relation = new SltAgreementRelation();
|
||||
/*BigDecimal loseCost = new BigDecimal("0");
|
||||
BigDecimal leaseCost = new BigDecimal("0");
|
||||
BigDecimal scrapCost = new BigDecimal("0");
|
||||
BigDecimal repairCost = new BigDecimal("0");*/
|
||||
BigDecimal loseCost = BigDecimal.ZERO;
|
||||
BigDecimal leaseCost = BigDecimal.ZERO;
|
||||
BigDecimal scrapCost = BigDecimal.ZERO;
|
||||
|
|
@ -344,15 +340,6 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays);
|
||||
bean.setCosts(String.valueOf(costs));
|
||||
/* BigDecimal costs = BigDecimal.ZERO;
|
||||
//当单价,数量,租赁天数都不为空时计算总价
|
||||
if(bean.getLeasePrice() != null && bean.getNum() != null && bean.getLeaseDays() != null){
|
||||
BigDecimal leasePrice = new BigDecimal(bean.getLeasePrice());
|
||||
BigDecimal num = new BigDecimal(bean.getNum());
|
||||
BigDecimal leaseDays = new BigDecimal(bean.getLeaseDays());
|
||||
costs = leasePrice.multiply(num).multiply(leaseDays);
|
||||
}
|
||||
bean.setCosts(String.valueOf(costs));*/
|
||||
}
|
||||
return leaseList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,13 +184,15 @@ 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) as costs,
|
||||
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.status as repairStatus,
|
||||
sd.name as repairStatus,
|
||||
rc.company_id as companyId
|
||||
from repair_cost rc
|
||||
left join tm_task_agreement tta on rc.task_id = tta.task_id
|
||||
LEFT JOIN tm_task_agreement tta on rc.task_id = tta.task_id
|
||||
LEFT JOIN tm_task tt on rc.task_id = tt.task_id
|
||||
LEFT JOIN sys_dic sd on sd.id = tt.task_status
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue