部门单次查询

master
river 4 years ago
parent 1f08ddbf5e
commit 8bf600952f
  1. 2
      dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java
  2. 3
      dq-financial-api/src/main/java/com/daqing/financial/hrms/EmployeeControllerApi.java
  3. BIN
      dq-financial-api/target/classes/com/daqing/financial/crms/CustomerControllerApi.class
  4. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrms/DeptControllerApi.class
  5. BIN
      dq-financial-api/target/classes/com/daqing/financial/hrms/EmployeeControllerApi.class
  6. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  7. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java
  8. 7
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  9. BIN
      dq-financial-crms/target/classes/com/daqing/financial/crms/controller/CustomerController.class
  10. BIN
      dq-financial-crms/target/classes/com/daqing/financial/crms/service/CustomerService.class
  11. BIN
      dq-financial-crms/target/classes/com/daqing/financial/crms/service/impl/CustomerServiceImpl.class
  12. BIN
      dq-financial-crms/target/test-classes/com/daqing/financial/crms/DqFinancialCrmsApplicationTests.class
  13. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/DeptController.class
  14. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/EmployeeController.class
  15. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/PermissionController.class
  16. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/PositionController.class
  17. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/controller/UserController.class
  18. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/dao/DeptDao.class
  19. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/service/DeptService.class
  20. BIN
      dq-financial-hrms/target/classes/com/daqing/financial/hrms/service/impl/DeptServiceImpl.class
  21. 5
      dq-financial-hrms/target/classes/mapper/hrms/DeptDao.xml
  22. BIN
      dq-financial-hrms/target/test-classes/com/daqing/financial/hrms/DqFinancialHrmsApplicationTests.class
  23. 1
      dq-framework-common/src/main/java/com/daqing/framework/model/response/CommonCode.java
  24. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class
  25. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/response/CrmsCode.java
  26. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/CompanyCustomerEntity.class
  27. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/CustomerEntity.class
  28. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/PersonalCustomerEntity.class
  29. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyTO.class
  30. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.class
  31. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerPersonalTO.class
  32. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/ext/CustomerTO.class
  33. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/request/CustomerRequest.class
  34. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/crms/response/CrmsCode.class
  35. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/DepartmentVO.class
  36. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/DeptEntity.class
  37. BIN
      dq-framework-model/target/classes/com/daqing/framework/domain/hrms/response/HrmsCode.class

@ -68,7 +68,7 @@ public interface CustomerControllerApi {
* 导入excel数据
*/
@ApiOperation(value = "导入excel数据", notes = "导入excel数据")
void excelImportCustomer(MultipartFile file);
ResponseResult excelImportCustomer(MultipartFile file);
/**
* 导出数据到excel

@ -26,4 +26,7 @@ public interface EmployeeControllerApi {
@ApiOperation(value = "根据id删除员工信息", notes = "根据id删除员工信息")
ResponseResult delete(Long[] ids);
@ApiOperation(value = "查询所有员工id和姓名",notes = "查询所有员工id和姓名")
ResponseResult listEmployeeName();
}

@ -141,8 +141,9 @@ public class CustomerController implements CustomerControllerApi {
* 导入excel数据
*/
@PostMapping("/excelImport")
public void excelImportCustomer(MultipartFile file){
public ResponseResult excelImportCustomer(MultipartFile file){
customerService.excelImportCustomer(file);
boolean result = customerService.excelImportCustomer(file);
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.IMPORT_ERROR);
}
}

@ -39,7 +39,7 @@ public interface CustomerService extends IService<CustomerEntity> {
void excelExportCustomer(HttpServletResponse response);
void excelImportCustomer(MultipartFile excel);
boolean excelImportCustomer(MultipartFile excel);
void excelTemplate(HttpServletResponse response);
}

@ -276,8 +276,11 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
*/
@Transactional
@Override
public void excelImportCustomer(MultipartFile excel) {
public boolean excelImportCustomer(MultipartFile excel) {
//TODO 导入excel数据到数据库,思路耗时太长,有待优化
if (excel == null){
ExceptionCast.cast(CrmsCode.NOT_NULL);
}
try {
List<Object> personalList = ExcelUtil.readExcel(excel, new CustomerPersonalVO(), 1);
List<Object> companyList = ExcelUtil.readExcel(excel, new CustomerCompanyVO(), 2);
@ -318,8 +321,10 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
}
this.saveCustomerCompany(customer,cc);
}
return true;
}catch (Exception e){
ExceptionCast.cast(CrmsCode.CUSTOMER_IMPORT_EXSIT);
return false;
}
}

@ -36,4 +36,9 @@
FROM hrms_dept
</select>
<select id="getDepartmentByParentId" parameterType="long" resultType="com.daqing.framework.domain.hrms.DepartmentVO">
SELECT id,name,parent_id,sort
FROM hrms_dept WHERE parent_id = #{parentId}
</select>
</mapper>

@ -25,6 +25,7 @@ public enum CommonCode implements ResultCode {
INVALID_PARAM(false, 10003, "非法参数!"),
USER_IS_NOT_EXIST(false, 10004, "用户不存在或用户已禁用!"),
PASSWORD_IS_ERROR(false, 10005, "密码错误!"),
IMPORT_ERROR(false,10008,"导入数据失败!"),
SERVER_ERROR(false, 99999, "抱歉,系统繁忙,请稍后重试!");
/**

@ -17,7 +17,8 @@ public enum CrmsCode implements ResultCode {
CUSTOMER_IMPORT_EXSIT(false,20001,"导入数据失败,请检查文件和数据格式或稍后再试!"),
CUSTOMER_EXPORT_EXSIT(false,20002,"导出数据失败,请稍后再试!"),
CUSTOMER_EXPORTTEMPLATE_EXSIT(false,20003,"导出excel模板失败,请稍后再试!");
CUSTOMER_EXPORTTEMPLATE_EXSIT(false,20003,"导出excel模板失败,请稍后再试!"),
NOT_NULL(false,20004,"上传的文件不能为空");
/**
* 操作是否成功

Loading…
Cancel
Save