Commit a62dc2cd by wuwenlong

报工单删除

parent 93264b58
...@@ -808,6 +808,7 @@ public class HGSCTools { ...@@ -808,6 +808,7 @@ public class HGSCTools {
public static void delete(List<Long> ids) { public static void delete(List<Long> ids) {
checkDeleteDate(ids); checkDeleteDate(ids);
DaoUtils.update(HGSC008.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}}); DaoUtils.update(HGSC008.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
HGZLTools.THGZL002.deleteByWorkIds(ids);
} }
private static void checkDeleteDate(List<Long> ids){ private static void checkDeleteDate(List<Long> ids){
......
...@@ -21,7 +21,7 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -21,7 +21,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
*/ */
public class HGZL002 extends DaoEPBase { public class HGZL002 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_id = "id"; public static final String FIELD_id = "id";
public static final String FIELD_mat_id = "matId"; /* 物料清单ID*/ public static final String FIELD_mat_id = "matId"; /* 物料清单ID*/
...@@ -118,6 +118,8 @@ public class HGZL002 extends DaoEPBase { ...@@ -118,6 +118,8 @@ public class HGZL002 extends DaoEPBase {
public static final String INSERT = "HGZL002.insert"; public static final String INSERT = "HGZL002.insert";
public static final String UPDATE = "HGZL002.update"; public static final String UPDATE = "HGZL002.update";
public static final String DELETE = "HGZL002.delete"; public static final String DELETE = "HGZL002.delete";
public static final String DELETE_BY_WORKS = "HGZL002.delete_by_works";
private Long id = new Long(0); private Long id = new Long(0);
private Long matId = new Long(0); /* 物料清单ID*/ private Long matId = new Long(0); /* 物料清单ID*/
......
...@@ -443,6 +443,12 @@ ...@@ -443,6 +443,12 @@
id = #id# id = #id#
</delete> </delete>
<delete id="delete_by_works">
DELETE FROM ${hggpSchema}.HGZL002 WHERE
work_id IN <iterate close=")" open="(" conjunction="," property="workIds">#workIds[]#</iterate>
</delete>
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGZL002 UPDATE ${hggpSchema}.HGZL002
SET SET
......
...@@ -117,5 +117,9 @@ public class HGZLTools { ...@@ -117,5 +117,9 @@ public class HGZLTools {
queryMap.put("workIds", workIds); queryMap.put("workIds", workIds);
return DaoBase.getInstance().query(HGZL002.QUERY, queryMap); return DaoBase.getInstance().query(HGZL002.QUERY, queryMap);
} }
public static void deleteByWorkIds(List<Long> workIds) {
DaoUtils.update(HGZL002.DELETE_BY_WORKS, new HashMap<String,Object>(){{put("workIds",workIds);}});
}
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment