Commit a62dc2cd by wuwenlong

报工单删除

parent 93264b58
......@@ -808,6 +808,7 @@ public class HGSCTools {
public static void delete(List<Long> ids) {
checkDeleteDate(ids);
DaoUtils.update(HGSC008.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
HGZLTools.THGZL002.deleteByWorkIds(ids);
}
private static void checkDeleteDate(List<Long> ids){
......
......@@ -21,7 +21,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
*/
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_mat_id = "matId"; /* 物料清单ID*/
......@@ -118,6 +118,8 @@ public class HGZL002 extends DaoEPBase {
public static final String INSERT = "HGZL002.insert";
public static final String UPDATE = "HGZL002.update";
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 matId = new Long(0); /* 物料清单ID*/
......
......@@ -443,6 +443,12 @@
id = #id#
</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 ${hggpSchema}.HGZL002
SET
......
......@@ -117,5 +117,9 @@ public class HGZLTools {
queryMap.put("workIds", workIds);
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