|
@@ -25,6 +25,7 @@ import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* BmstruckStatement服务实现:
|
|
* BmstruckStatement服务实现:
|
|
|
|
+ *
|
|
* @author generator
|
|
* @author generator
|
|
* @version 1.0-SNAPSHORT 2021-10-15 06:20
|
|
* @version 1.0-SNAPSHORT 2021-10-15 06:20
|
|
* 类描述
|
|
* 类描述
|
|
@@ -33,8 +34,8 @@ import java.util.Map;
|
|
* 作者:generator
|
|
* 作者:generator
|
|
* 参考:
|
|
* 参考:
|
|
* 描述:BmstruckStatement服务实现
|
|
* 描述:BmstruckStatement服务实现
|
|
- * @see null
|
|
|
|
* @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
|
|
* @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
|
|
|
|
+ * @see null
|
|
*/
|
|
*/
|
|
@Service(value = "bmstruckStatementService")
|
|
@Service(value = "bmstruckStatementService")
|
|
public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
@@ -52,6 +53,7 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 展示计费账单
|
|
* 展示计费账单
|
|
|
|
+ *
|
|
* @param mapValue
|
|
* @param mapValue
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -59,33 +61,34 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
public List<Map<String, Object>> getTruckStatementList(Map<String, Object> mapValue) {
|
|
public List<Map<String, Object>> getTruckStatementList(Map<String, Object> mapValue) {
|
|
List<Map<String, Object>> mapList = bmstruckStatementMapper.getTruckStatementList(mapValue);
|
|
List<Map<String, Object>> mapList = bmstruckStatementMapper.getTruckStatementList(mapValue);
|
|
String checkStatus = "";
|
|
String checkStatus = "";
|
|
- for (Map<String,Object> map: mapList ) {
|
|
|
|
|
|
+ for (Map<String, Object> map : mapList) {
|
|
BigDecimal checkCarrierStatus = (BigDecimal) map.get("checkCarrierStatus");
|
|
BigDecimal checkCarrierStatus = (BigDecimal) map.get("checkCarrierStatus");
|
|
BigDecimal checkReceiveCustomerStatus = (BigDecimal) map.get("checkReceiveCustomerStatus");
|
|
BigDecimal checkReceiveCustomerStatus = (BigDecimal) map.get("checkReceiveCustomerStatus");
|
|
BigDecimal checkShipperStatus = (BigDecimal) map.get("checkShipperStatus");
|
|
BigDecimal checkShipperStatus = (BigDecimal) map.get("checkShipperStatus");
|
|
// 有人拒绝:未通过审核
|
|
// 有人拒绝:未通过审核
|
|
- if (checkCarrierStatus.intValue() == 0 || checkReceiveCustomerStatus.intValue() == 0 || checkShipperStatus.intValue() == 0){
|
|
|
|
|
|
+ if (checkCarrierStatus.intValue() == 1 || checkReceiveCustomerStatus.intValue() == 1 || checkShipperStatus.intValue() == 1) {
|
|
checkStatus = "未通过审核";
|
|
checkStatus = "未通过审核";
|
|
}
|
|
}
|
|
// 全部通过:已通过审核
|
|
// 全部通过:已通过审核
|
|
- if (checkCarrierStatus.intValue() == 1 && checkReceiveCustomerStatus.intValue() == 1 && checkShipperStatus.intValue() == 1) {
|
|
|
|
|
|
+ if (checkCarrierStatus.intValue() == 2 && checkReceiveCustomerStatus.intValue() == 2 && checkShipperStatus.intValue() == 2) {
|
|
checkStatus = "已通过审核";
|
|
checkStatus = "已通过审核";
|
|
}
|
|
}
|
|
// 有人未审核,且没人拒绝:审核中
|
|
// 有人未审核,且没人拒绝:审核中
|
|
- if (checkCarrierStatus == null || checkReceiveCustomerStatus == null || checkShipperStatus == null && checkStatus != "未通过审批"){
|
|
|
|
|
|
+ if (checkStatus != "未审核通过" && checkCarrierStatus.intValue() == 0 || checkReceiveCustomerStatus.intValue() == 0 || checkShipperStatus.intValue() == 0) {
|
|
checkStatus = "审核中";
|
|
checkStatus = "审核中";
|
|
}
|
|
}
|
|
// 全部都没审核:待审核
|
|
// 全部都没审核:待审核
|
|
- if (checkCarrierStatus == null && checkReceiveCustomerStatus == null && checkShipperStatus == null) {
|
|
|
|
|
|
+ if (checkCarrierStatus.intValue() == 0 && checkReceiveCustomerStatus.intValue() == 0 && checkShipperStatus.intValue() == 0) {
|
|
checkStatus = "待审核";
|
|
checkStatus = "待审核";
|
|
}
|
|
}
|
|
- map.put("checkStatus",checkStatus);
|
|
|
|
|
|
+ map.put("checkStatus", checkStatus);
|
|
}
|
|
}
|
|
return mapList;
|
|
return mapList;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成汽运账单
|
|
* 生成汽运账单
|
|
|
|
+ *
|
|
* @param mapList
|
|
* @param mapList
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@@ -100,9 +103,12 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
BigDecimal checkId = bmstruckCheckMapper.selectCheckId();
|
|
BigDecimal checkId = bmstruckCheckMapper.selectCheckId();
|
|
bmstruckCheck.setCheckId(checkId);
|
|
bmstruckCheck.setCheckId(checkId);
|
|
bmstruckCheck.setStatementId(statementId);
|
|
bmstruckCheck.setStatementId(statementId);
|
|
|
|
+ bmstruckCheck.setCheckCarrierStatus(new BigDecimal(0));
|
|
|
|
+ bmstruckCheck.setCheckShipperStatus(new BigDecimal(0));
|
|
|
|
+ bmstruckCheck.setCheckReceiveCustomerStatus(new BigDecimal(0));
|
|
bmstruckCheckMapper.insertSelective(bmstruckCheck);
|
|
bmstruckCheckMapper.insertSelective(bmstruckCheck);
|
|
// 汽运账单编号
|
|
// 汽运账单编号
|
|
- String statementNumber = noUtil.setResultNo("QYZD",statementId);
|
|
|
|
|
|
+ String statementNumber = noUtil.setResultNo("QYZD", statementId);
|
|
bmstruckStatement.setStatementNumber(statementNumber);
|
|
bmstruckStatement.setStatementNumber(statementNumber);
|
|
// 支付单位
|
|
// 支付单位
|
|
bmstruckStatement.setStatementPaymentUnit("四川达州钢铁集团有限责任公司");
|
|
bmstruckStatement.setStatementPaymentUnit("四川达州钢铁集团有限责任公司");
|
|
@@ -115,7 +121,7 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
bmstruckStatement.setUpdateUsername("admin");
|
|
bmstruckStatement.setUpdateUsername("admin");
|
|
bmstruckStatement.setInsertUpdateRemark("无");
|
|
bmstruckStatement.setInsertUpdateRemark("无");
|
|
Double doubleTotalAmount = new Double(0);
|
|
Double doubleTotalAmount = new Double(0);
|
|
- for (Map<String,Object> map: mapList ) {
|
|
|
|
|
|
+ for (Map<String, Object> map : mapList) {
|
|
// 中间表主键
|
|
// 中间表主键
|
|
BigDecimal detailsStatementId = bmstruckDetailsStatementMapper.selectDetailsStatementId();
|
|
BigDecimal detailsStatementId = bmstruckDetailsStatementMapper.selectDetailsStatementId();
|
|
// 详单id
|
|
// 详单id
|
|
@@ -133,7 +139,7 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
bmstruckDetailsStatement.setUpdateTime(new Date());
|
|
bmstruckDetailsStatement.setUpdateTime(new Date());
|
|
bmstruckDetailsStatement.setUpdateUsername("admin");
|
|
bmstruckDetailsStatement.setUpdateUsername("admin");
|
|
bmstruckDetailsStatement.setInsertUpdateRemark("无");
|
|
bmstruckDetailsStatement.setInsertUpdateRemark("无");
|
|
- BigDecimal detailsAmount = new BigDecimal((Integer)map.get("detailsAmount"));
|
|
|
|
|
|
+ BigDecimal detailsAmount = new BigDecimal((Double) map.get("detailsAmount"));
|
|
Double detailsAmountDouble = Double.valueOf(detailsAmount.toString());
|
|
Double detailsAmountDouble = Double.valueOf(detailsAmount.toString());
|
|
doubleTotalAmount += detailsAmountDouble;
|
|
doubleTotalAmount += detailsAmountDouble;
|
|
bmstruckDetailsStatementMapper.insertSelective(bmstruckDetailsStatement);
|
|
bmstruckDetailsStatementMapper.insertSelective(bmstruckDetailsStatement);
|
|
@@ -146,6 +152,7 @@ public class BmstruckStatementServiceImpl implements IBmstruckStatementService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 展示账单下的详单
|
|
* 展示账单下的详单
|
|
|
|
+ *
|
|
* @param mapVal
|
|
* @param mapVal
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|