工单导出调整

This commit is contained in:
lujiang 2024-08-26 09:30:42 +08:00
parent 17920f225c
commit 0b001df4dc

View File

@ -40,7 +40,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.wf.jwtp.annotation.Ignore;
import org.wf.jwtp.annotation.RequiresPermissions; import org.wf.jwtp.annotation.RequiresPermissions;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
@ -51,6 +50,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* 工单导入导出
* created at 2024-8-24 20:48 * created at 2024-8-24 20:48
* *
* @author lujiang * @author lujiang
@ -67,6 +67,9 @@ public class RepairIOController extends BaseController {
@Autowired @Autowired
private IRepairService repairService; private IRepairService repairService;
// @Autowired
// private IIcsCustomerStaffService customerStaffService;
/** /**
* 导出工单模板 * 导出工单模板
*/ */
@ -280,11 +283,17 @@ public class RepairIOController extends BaseController {
return R.ok("成功导入" + count + "条工单数据"); return R.ok("成功导入" + count + "条工单数据");
} }
/**
@Ignore * 工单导出
//@RequiresPermissions(value = {"repair:manage:operator"}) * @param startDate 日期范围
* @param endDate 日期范围
*/
@RequiresPermissions(value = {"repair:manage:operator"})
@RequestMapping("/exportRepair") @RequestMapping("/exportRepair")
public void exportData(String startDate, String endDate) { public void exportData(String startDate, String endDate) {
// Long userId = getLoginStaffId();
// IcsCustomerStaff customerStaff = customerStaffService.selectIcsCustomerStaffById(userId);
// if (!"7".equals(customerStaff.getDataType())) return;//管理员角色验证
Date start, end; Date start, end;
try { try {
start = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, startDate + " 00:00:00"); start = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS, startDate + " 00:00:00");
@ -298,7 +307,5 @@ public class RepairIOController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }