From a8c5ab7f20c29589d06bfcda09929d3294d4e4cf Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期日, 07 六月 2020 14:45:45 +0800
Subject: [PATCH] 查询定案类型错误
---
service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java | 149 ++++++++++++++++++++++++++++---------------------
1 files changed, 86 insertions(+), 63 deletions(-)
diff --git a/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java b/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java
index 3e9a717..b1eaf74 100644
--- a/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java
+++ b/service-order/src/main/java/com/java110/order/dao/impl/CenterServiceDAOImpl.java
@@ -1,11 +1,11 @@
package com.java110.order.dao.impl;
import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.entity.mapping.Mapping;
import com.java110.order.dao.ICenterServiceDAO;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.DAOException;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.entity.mapping.Mapping;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@@ -27,23 +27,25 @@
/**
* 淇濆瓨璁㈠崟淇℃伅
+ *
* @param order 璁㈠崟淇℃伅
* @return
*/
@Override
- public void saveOrder(Map order) throws DAOException{
+ public void saveOrder(Map order) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.saveOrder銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(order));
- int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveOrder",order);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"淇濆瓨璁㈠崟淇℃伅澶辫触锛�"+ JSONObject.toJSONString(order));
+ int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveOrder", order);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟淇℃伅澶辫触锛�" + JSONObject.toJSONString(order));
}
}
/**
* 淇濆瓨灞炴�т俊鎭�
+ *
* @param orderAttrs
* @return
*/
@@ -52,37 +54,39 @@
logger.debug("----銆怌enterServiceDAOImpl.saveOrderAttrs銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(orderAttrs));
- for(Map orderAttr:orderAttrs){
- int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveOrderAttrs",orderAttr);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"淇濆瓨璁㈠崟灞炴�т俊鎭け璐ワ細"+ JSONObject.toJSONString(orderAttr));
+ for (Map orderAttr : orderAttrs) {
+ int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveOrderAttrs", orderAttr);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟灞炴�т俊鎭け璐ワ細" + JSONObject.toJSONString(orderAttr));
}
}
}
/**
* 淇濆瓨璁㈠崟椤逛俊鎭�
+ *
* @param business 璁㈠崟椤逛俊鎭�
*/
@Override
public void saveBusiness(Map business) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.saveBusiness銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(business));
- int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveBusiness", business);
- if (saveFlag < 1) {
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟椤逛俊鎭け璐ワ細" + JSONObject.toJSONString(business));
- }
+ int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveBusiness", business);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟椤逛俊鎭け璐ワ細" + JSONObject.toJSONString(business));
+ }
}
/**
* 淇濆瓨璁㈠崟椤逛俊鎭�
+ *
* @param businesses 璁㈠崟椤逛俊鎭�
*/
@Override
public void saveBusiness(List<Map> businesses) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.saveBusiness銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(businesses));
- for(Map business:businesses) {
+ for (Map business : businesses) {
int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveBusiness", business);
if (saveFlag < 1) {
throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟椤逛俊鎭け璐ワ細" + JSONObject.toJSONString(business));
@@ -92,6 +96,7 @@
/**
* 淇濆瓨灞炴�т俊鎭�
+ *
* @param businessAttrs
*/
@Override
@@ -99,16 +104,17 @@
logger.debug("----銆怌enterServiceDAOImpl.saveBusinessAttrs銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(businessAttrs));
- for(Map businessAttr:businessAttrs){
- int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveBusinessAttrs",businessAttr);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"淇濆瓨璁㈠崟椤瑰睘鎬т俊鎭け璐ワ細"+ JSONObject.toJSONString(businessAttr));
+ for (Map businessAttr : businessAttrs) {
+ int saveFlag = sqlSessionTemplate.insert("centerServiceDAOImpl.saveBusinessAttrs", businessAttr);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "淇濆瓨璁㈠崟椤瑰睘鎬т俊鎭け璐ワ細" + JSONObject.toJSONString(businessAttr));
}
}
}
/**
* 鏇存柊璁㈠崟淇℃伅锛堜竴鑸氨鏇存柊璁㈠崟鐘舵�侊級
+ *
* @param order
* @throws DAOException
*/
@@ -116,14 +122,15 @@
public void updateOrder(Map order) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.updateOrder銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(order));
- int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateOrder",order);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"鏇存柊璁㈠崟淇℃伅澶辫触锛�"+ JSONObject.toJSONString(order));
+ int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateOrder", order);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "鏇存柊璁㈠崟淇℃伅澶辫触锛�" + JSONObject.toJSONString(order));
}
}
/**
* 鏇存柊璁㈠崟椤逛俊鎭紙涓�鑸氨鏇存柊璁㈠崟椤圭姸鎬侊級
+ *
* @param order
* @throws DAOException
*/
@@ -131,74 +138,78 @@
public void updateBusiness(Map order) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.updateBusiness銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(order));
- int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateBusiness",order);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"鏇存柊璁㈠崟椤逛俊鎭け璐ワ細"+ JSONObject.toJSONString(order));
+ int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateBusiness", order);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "鏇存柊璁㈠崟椤逛俊鎭け璐ワ細" + JSONObject.toJSONString(order));
}
}
/**
* 鏍规嵁bId 淇敼涓氬姟椤逛俊鎭�
+ *
* @param business
* @throws DAOException
*/
- public void updateBusinessByBId(Map business) throws DAOException{
+ public void updateBusinessByBId(Map business) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.updateBusinessByBId銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(business));
- int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateBusinessByBId",business);
- if(saveFlag < 1){
- throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"鏇存柊璁㈠崟椤逛俊鎭け璐ワ細"+ JSONObject.toJSONString(business));
+ int saveFlag = sqlSessionTemplate.update("centerServiceDAOImpl.updateBusinessByBId", business);
+ if (saveFlag < 1) {
+ throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR, "鏇存柊璁㈠崟椤逛俊鎭け璐ワ細" + JSONObject.toJSONString(business));
}
}
/**
* 褰撴墍鏈変笟鍔″姩浣滄槸鍚﹂兘鏄疌锛屽皢璁㈠崟淇℃伅鏀逛负 C
+ *
* @param bId
* @return
* @throws DAOException
*/
- public void completeOrderByBId(String bId) throws DAOException{
+ public void completeOrderByBId(String bId) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.completeOrderByBId銆戞暟鎹叆鍙� : " + bId);
- int updateFlag = sqlSessionTemplate.update("centerServiceDAOImpl.completeOrderByBId",bId);
+ int updateFlag = sqlSessionTemplate.update("centerServiceDAOImpl.completeOrderByBId", bId);
- if(updateFlag < 1){
+ if (updateFlag < 1) {
//throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"褰撳墠涓氬姟杩樻病鏈夊叏瀹屾垚锛圕锛夛細"+ bId);
- logger.debug("褰撳墠涓氬姟杩樻病鏈夊叏瀹屾垚锛圕锛�:"+bId);
+ logger.debug("褰撳墠涓氬姟杩樻病鏈夊叏瀹屾垚锛圕锛�:" + bId);
}
}
/**
* 褰撴墍鏈変笟鍔″姩浣滄槸鍚﹂兘鏄疌锛屽皢璁㈠崟淇℃伅鏀逛负 C
+ *
* @param oId
* @return
* @throws DAOException
*/
- public void completeOrderByOId(String oId) throws DAOException{
+ public void completeOrderByOId(String oId) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.completeOrderByOId銆戞暟鎹叆鍙� : " + oId);
- int updateFlag = sqlSessionTemplate.update("centerServiceDAOImpl.completeOrderByOId",oId);
+ int updateFlag = sqlSessionTemplate.update("centerServiceDAOImpl.completeOrderByOId", oId);
- if(updateFlag < 1){
+ if (updateFlag < 1) {
//throw new DAOException(ResponseConstant.RESULT_CODE_INNER_ERROR,"褰撳墠涓氬姟杩樻病鏈夊叏瀹屾垚锛圕锛夛細"+ bId);
- logger.debug("褰撳墠涓氬姟杩樻病鏈夊叏瀹屾垚锛圕锛�:"+oId);
+ logger.debug("褰撳墠涓氬姟杩樻病鏈夊叏瀹屾垚锛圕锛�:" + oId);
}
}
/**
* 鍒ゆ柇 business 杩囩▼鏄惁瀹屾垚 1 琛ㄧず瀹屾垚 0琛ㄧず鏈畬鎴�
+ *
* @param oId
* @return
* @throws DAOException
*/
- public int judgeAllBusinessCompleted(String oId,String statusCd) throws DAOException{
+ public int judgeAllBusinessCompleted(String oId, String statusCd) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.judgeAllBusinessCompleted銆戞暟鎹叆鍙� :oId= " + oId + ",statusCd = " + statusCd);
Map paramIn = new HashMap();
- paramIn.put("oId",oId);
- paramIn.put("statusCd",statusCd);
+ paramIn.put("oId", oId);
+ paramIn.put("statusCd", statusCd);
- List<Map> paramOuts = sqlSessionTemplate.selectList("centerServiceDAOImpl.judgeAllBusinessCompleted",paramIn);
- if(paramOuts == null || paramOuts.size() == 0){
+ List<Map> paramOuts = sqlSessionTemplate.selectList("centerServiceDAOImpl.judgeAllBusinessCompleted", paramIn);
+ if (paramOuts == null || paramOuts.size() == 0) {
return 0;
}
return 1;
@@ -206,18 +217,19 @@
/**
* 鍒ゆ柇 business 杩囩▼鏄惁 婊¤冻鎾ゅ崟鏉′欢
+ *
* @param oId
* @return
* @throws DAOException
*/
- public int judgeAllBusinessDeleteOrder(String oId,String statusCd) throws DAOException{
+ public int judgeAllBusinessDeleteOrder(String oId, String statusCd) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.judgeAllBusinessDeleteOrder銆戞暟鎹叆鍙� :oId= " + oId + ",statusCd = " + statusCd);
Map paramIn = new HashMap();
- paramIn.put("oId",oId);
- paramIn.put("statusCd",statusCd);
+ paramIn.put("oId", oId);
+ paramIn.put("statusCd", statusCd);
- List<Map> paramOuts = sqlSessionTemplate.selectList("centerServiceDAOImpl.judgeAllBusinessDeleteOrder",paramIn);
- if(paramOuts == null || paramOuts.size() == 0){
+ List<Map> paramOuts = sqlSessionTemplate.selectList("centerServiceDAOImpl.judgeAllBusinessDeleteOrder", paramIn);
+ if (paramOuts == null || paramOuts.size() == 0) {
return 0;
}
return 1;
@@ -225,26 +237,29 @@
/**
* 鏍规嵁bId鏌ヨ璁㈠崟淇℃伅
+ *
* @param bId
* @return
* @throws DAOException
*/
- public Map getOrderInfoByBId(String bId)throws DAOException{
- List<Map> orders = sqlSessionTemplate.selectList("centerServiceDAOImpl.getOrderInfoByBId",bId);
- if(orders !=null && orders.size() >0){
+ public Map getOrderInfoByBId(String bId) throws DAOException {
+ List<Map> orders = sqlSessionTemplate.selectList("centerServiceDAOImpl.getOrderInfoByBId", bId);
+ if (orders != null && orders.size() > 0) {
return orders.get(0);
}
return null;
}
+
/**
* 鏍规嵁oId鏌ヨ璁㈠崟淇℃伅
+ *
* @param oId
* @return
* @throws DAOException
*/
- public Map getDeleteOrderBusinessByOId(String oId)throws DAOException{
- List<Map> orders = sqlSessionTemplate.selectList("centerServiceDAOImpl.getDeleteOrderBusinessByOId",oId);
- if(orders !=null && orders.size() >0){
+ public Map getDeleteOrderBusinessByOId(String oId) throws DAOException {
+ List<Map> orders = sqlSessionTemplate.selectList("centerServiceDAOImpl.getDeleteOrderBusinessByOId", oId);
+ if (orders != null && orders.size() > 0) {
return orders.get(0);
}
return null;
@@ -253,13 +268,14 @@
/**
* 鑾峰彇鍚屼釜璁㈠崟涓凡缁忓畬鎴愮殑璁㈠崟椤�
+ *
* @param bId
* @return
* @throws DAOException
*/
- public List<Map> getCommonOrderCompledBusinessByBId(String bId) throws DAOException{
+ public List<Map> getCommonOrderCompledBusinessByBId(String bId) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.getCommonOrderCompledBusinessByBId銆戞暟鎹叆鍙� : " + bId);
- return sqlSessionTemplate.selectList("centerServiceDAOImpl.getCommonOrderCompledBusinessByBId",bId);
+ return sqlSessionTemplate.selectList("centerServiceDAOImpl.getCommonOrderCompledBusinessByBId", bId);
}
@Override
@@ -270,6 +286,7 @@
/**
* 鏌ヨ鏄犲皠琛�
+ *
* @return
*/
@Override
@@ -279,6 +296,7 @@
/**
* 鏌ヨ涓氫富璁㈠崟
+ *
* @param info
* @return
*/
@@ -288,23 +306,24 @@
}
-
/**
* 鏌ヨ涓氫富璁㈠崟
+ *
* @param info
* @return
*/
@Override
public List<Map> queryOrderByBusinessType(Map info) {
- return sqlSessionTemplate.selectList("centerServiceDAOImpl.queryOrderByBusinessType");
+ return sqlSessionTemplate.selectList("centerServiceDAOImpl.queryOrderByBusinessType", info);
}
- public int updateBusinessStatusCd(Map info){
- return sqlSessionTemplate.update("centerServiceDAOImpl.updateBusinessStatusCd",info);
+ public int updateBusinessStatusCd(Map info) {
+ return sqlSessionTemplate.update("centerServiceDAOImpl.updateBusinessStatusCd", info);
}
/**
* 鏌ヨ涓氫富璁㈠崟
+ *
* @param info
* @return
*/
@@ -312,8 +331,10 @@
public List<Map> queryManchineOrders(Map info) {
return sqlSessionTemplate.selectList("centerServiceDAOImpl.queryManchineOrders");
}
+
/**
* 鏌ヨ鐢宠閽ュ寵璁㈠崟
+ *
* @param info
* @return
*/
@@ -324,26 +345,28 @@
/**
* 鏍规嵁oId 鏌ヨBusiness
+ *
* @param info
* @return
* @throws DAOException
*/
- public List<Map> getBusinessByOId(Map info) throws DAOException{
+ public List<Map> getBusinessByOId(Map info) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.getBusinessByOId銆戜繚瀛樻暟鎹叆鍙� : " + JSONObject.toJSONString(info));
- return sqlSessionTemplate.selectList("centerServiceDAOImpl.getBusinessByOId",info);
+ return sqlSessionTemplate.selectList("centerServiceDAOImpl.getBusinessByOId", info);
}
/**
* 鏌ヨ鍚岃鍗� 璁㈠崟椤�
+ *
* @param info
* @return
* @throws DAOException
*/
- public List<Map> querySameOrderBusiness(Map info) throws DAOException{
+ public List<Map> querySameOrderBusiness(Map info) throws DAOException {
logger.debug("----銆怌enterServiceDAOImpl.querySameOrderBusiness銆戞暟鎹叆鍙� : " + JSONObject.toJSONString(info));
- return sqlSessionTemplate.selectList("centerServiceDAOImpl.querySameOrderBusiness",info);
+ return sqlSessionTemplate.selectList("centerServiceDAOImpl.querySameOrderBusiness", info);
}
}
--
Gitblit v1.8.0