浏览代码

解决合同服务删除报错的问题

zhangyao 3 月之前
父节点
当前提交
79f417c0d9

+ 2 - 2
com.awspaas.user.apps.donenow_ctt/src/com/awspaas/user/apps/donenow_ctt/controller/contractCreateController.java

@@ -252,7 +252,7 @@ public class contractCreateController {
     public ResponseObject deleteContractService(UserContext uc, String serviceIds) {
         String[] costIdArr = serviceIds.split(",");
 
-        String selSql = "DELETE FROM BO_EU_DNCTT_CONTRACT_SERVICE WHERE ID IN(";
+        String selSql = "SELECT * FROM BO_EU_DNCTT_CONTRACT_SERVICE WHERE ID IN(";
         for (int i = 0; costIdArr.length > i; i++) {
             selSql += "?,";
         }
@@ -276,7 +276,7 @@ public class contractCreateController {
             DBSql.update("delete from BO_EU_DNCTT_CONTRACT_SERVICE_PERIOD where CONTRACT_ID=? and OBJECT_ID=? and CONTRACT_SERVICE_ID=?", new Object[]{service.get("CONTRACT_ID"), service.get("OBJECT_ID"), service.get("ID")});
 
 
-            DBSql.update("delete from BO_EU_DNCTT_CONTRACT_SERVICE where CONTRACT_ID=? and OBJECT_ID=? and ID=?", new Object[]{service.get("CONTRACT_ID"), service.get("OBJECT_ID"), service.get("ID")});
+            DBSql.update("delete from BO_EU_DNCTT_CONTRACT_SERVICE where  ID=?", new Object[]{ service.get("ID")});
         }