@@ -19,4 +19,6 @@ import java.util.List;
@MyBatisMapper
public interface MaterialReportDetailsMapper extends BaseMapper<MaterialReportDetails> {
void insertList(List<MaterialReportDetails> list);
+
+ void delAll();
}
@@ -42,6 +42,9 @@
LEFT JOIN sys_office office ON office.id = a.office_id
LEFT JOIN sys_user tuser ON tuser.id = a.user_id
</sql>
+ <delete id="delAll">
+ truncate table bla_material_report
+ </delete>
<select id="get" resultType="MaterialReportDetails" >
@@ -54,6 +54,10 @@ public class MaterialReportDetailsService extends CrudService<MaterialReportDeta
@Transactional(readOnly = false)
public void insertList(List<MaterialReportDetails> list) {
mapper.insertList(list);
+ }
+ @Transactional(readOnly = false)
+ public void delAll() {
+ mapper.delAll();
@@ -3461,6 +3461,7 @@ public class MaterialReportDetailsController extends BaseController {
if (exportList.size() > 0) {
+ service.delAll();
service.insertList(exportList);
j.setSuccess(true);