|
|
@ -43,6 +43,7 @@ import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
import javax.annotation.Resource; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
import javax.validation.Valid; |
|
|
import java.io.IOException; |
|
|
import java.io.IOException; |
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.time.LocalDateTime; |
|
|
import java.time.LocalDateTime; |
|
|
@ -85,10 +86,18 @@ public class ServiceApplicationsService { |
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
if (!CollectionUtils.isEmpty(list)) { |
|
|
//翻译单位名称和用户名称
|
|
|
//翻译单位名称和用户名称
|
|
|
list.forEach(item -> { |
|
|
list.forEach(item -> { |
|
|
item.setDepartmentName(departmentService.queryByFirmId(item.getFirmId()).getDepartmentName()); // Fixed method call
|
|
|
if (item.getFirmId() != null) { |
|
|
item.setUserName(employeeService.queryById(item.getUserId()).getActualName()); |
|
|
item.setDepartmentName(departmentService.queryByFirmId(item.getFirmId()).getDepartmentName()); |
|
|
item.setActivityCategory(categoryService.queryById(item.getActivityCategoryId()).getCategoryName()); |
|
|
} |
|
|
item.setActivityName(goodsService.queryById(item.getActivityNameId()).getGoodsName()); |
|
|
if (item.getUserId() != null){ |
|
|
|
|
|
item.setUserName(employeeService.queryById(item.getUserId()).getActualName()); |
|
|
|
|
|
} |
|
|
|
|
|
if (item.getActivityCategoryId() != null) { |
|
|
|
|
|
item.setActivityCategory(categoryService.queryById(item.getActivityCategoryId()).getCategoryName()); |
|
|
|
|
|
} |
|
|
|
|
|
if (item.getActivityNameId() != null) { |
|
|
|
|
|
item.setActivityName(goodsService.queryById(item.getActivityNameId()).getGoodsName()); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
return SmartPageUtil.convert2PageResult(page, list); |
|
|
return SmartPageUtil.convert2PageResult(page, list); |
|
|
@ -221,7 +230,18 @@ public class ServiceApplicationsService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ServiceApplicationsEntity entity = SmartBeanUtil.copy(form, ServiceApplicationsEntity.class); |
|
|
ServiceApplicationsEntity entity = SmartBeanUtil.copy(form, ServiceApplicationsEntity.class); |
|
|
|
|
|
if (form.getUserId() != null) { |
|
|
|
|
|
entity.setUserId(Long.valueOf(form.getUserId())); |
|
|
|
|
|
} |
|
|
|
|
|
if (form.getFirmId() != null) { |
|
|
|
|
|
entity.setFirmId(Long.valueOf(form.getFirmId())); |
|
|
|
|
|
} |
|
|
|
|
|
if (form.getActivityCategoryId() != null) { |
|
|
|
|
|
entity.setActivityCategoryId(Long.valueOf(form.getActivityCategoryId())); |
|
|
|
|
|
} |
|
|
|
|
|
if (form.getActivityNameId() != null) { |
|
|
|
|
|
entity.setActivityNameId(Long.valueOf(form.getActivityNameId())); |
|
|
|
|
|
} |
|
|
return entity; |
|
|
return entity; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -247,7 +267,7 @@ public class ServiceApplicationsService { |
|
|
exampleVO.setServiceDuration(8.0); |
|
|
exampleVO.setServiceDuration(8.0); |
|
|
exampleVO.setOrganizerName("北京市司法局"); |
|
|
exampleVO.setOrganizerName("北京市司法局"); |
|
|
exampleVO.setOrganizerContact("李主任"); |
|
|
exampleVO.setOrganizerContact("李主任"); |
|
|
exampleVO.setOrganizerPhone("010-12345678"); |
|
|
exampleVO.setOrganizerPhone("18710238495"); |
|
|
exampleVO.setServiceContent("提供免费法律咨询服务"); |
|
|
exampleVO.setServiceContent("提供免费法律咨询服务"); |
|
|
templateList.add(exampleVO); |
|
|
templateList.add(exampleVO); |
|
|
|
|
|
|
|
|
@ -320,7 +340,26 @@ public class ServiceApplicationsService { |
|
|
serviceApplicationsDao.batchSubmit(idList, ReviewEnum.APPROVAL.getValue()); |
|
|
serviceApplicationsDao.batchSubmit(idList, ReviewEnum.APPROVAL.getValue()); |
|
|
return ResponseDTO.ok(); |
|
|
return ResponseDTO.ok(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ResponseDTO<String> addSubmit(@Valid ServiceApplicationsAddForm addForm) { |
|
|
|
|
|
ServiceApplicationsEntity serviceApplicationsEntity = SmartBeanUtil.copy(addForm, ServiceApplicationsEntity.class); |
|
|
|
|
|
serviceApplicationsEntity.setRecordStatus(ReviewEnum.APPROVAL.getValue()); |
|
|
|
|
|
if (null == addForm.getApplicationId()){ |
|
|
|
|
|
serviceApplicationsDao.insert(serviceApplicationsEntity); |
|
|
|
|
|
}else { |
|
|
|
|
|
serviceApplicationsDao.updateById(serviceApplicationsEntity); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ResponseDTO.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public ResponseDTO<String> review(@Valid ServiceApplicationsUpdateForm updateForm) { |
|
|
|
|
|
ServiceApplicationsEntity serviceApplicationsEntity = serviceApplicationsDao.selectById(updateForm.getApplicationId()); |
|
|
|
|
|
serviceApplicationsEntity.setFirmAuditStatus(updateForm.getFirmAuditStatus()); |
|
|
|
|
|
serviceApplicationsDao.updateById(serviceApplicationsEntity); |
|
|
|
|
|
return ResponseDTO.ok(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Excel下拉列表处理器 |
|
|
* Excel下拉列表处理器 |
|
|
*/ |
|
|
*/ |
|
|
|