查询工作组成员信息(根据成员id)
This commit is contained in:
+30
@@ -80,6 +80,36 @@ public class PayDraftingGroupResearchProjectController extends JeroController<Pa
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询(用于企业端,不带权限)
|
||||
*
|
||||
* @param payResearchProject
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "起草组-企业端-在研项目-分页列表查询")
|
||||
@ApiOperation(value="起草组-企业端-在研项目-分页列表查询", notes="起草组-企业端-在研项目-分页列表查询")
|
||||
@GetMapping(value = "/enterpriseQueryPageList")
|
||||
public Result<?> enterpriseQueryPageList(PayDraftingGroupResearchProject payResearchProject,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize
|
||||
) {
|
||||
QueryWrapper<PayDraftingGroupResearchProject> queryWrapper = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(payResearchProject.getDraftingGroupId())){
|
||||
queryWrapper.eq("drafting_group_id",payResearchProject.getDraftingGroupId());
|
||||
}else {
|
||||
return Result.error("起草组id为空!");
|
||||
}
|
||||
if(StringUtils.isNotBlank(payResearchProject.getProjectName())){
|
||||
queryWrapper.like("project_name",payResearchProject.getProjectName());
|
||||
}
|
||||
Page<PayDraftingGroupResearchProject> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayDraftingGroupResearchProject> pageList = payDraftingGroupResearchProjectService.pageList(page,queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
|
||||
+27
-2
@@ -16,6 +16,7 @@ import com.jero.contract.entity.PayIncomeContract;
|
||||
import com.jero.contract.entity.PayIncomeContractAssociated;
|
||||
import com.jero.contract.service.IPayIncomeContractAssociatedService;
|
||||
import com.jero.contract.service.IPayIncomeContractService;
|
||||
import com.jero.drafting.common.DraftingConstant;
|
||||
import com.jero.drafting.entity.PayDraftingGroup;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItem;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
|
||||
@@ -167,6 +168,9 @@ public class PayDraftingGroupSubItemController extends JeroController<PayDraftin
|
||||
|
||||
if(!CollectionUtils.isEmpty(pageList.getRecords())){
|
||||
List<PayDraftingGroupSubItem> list = pageList.getRecords();
|
||||
// 过滤数据,只要审核通过的数据
|
||||
list = list.stream().filter(item -> Objects.equals(item.getCheckResult(), DraftingConstant.CHECK_PASS)).collect(Collectors.toList());
|
||||
|
||||
List<String> listIds = list.stream().map(PayDraftingGroupSubItem::getDraftingGroupId).collect(Collectors.toList());
|
||||
LambdaQueryWrapper<PayDraftingGroup> queryPayDraftingGroup = new LambdaQueryWrapper<>();
|
||||
queryPayDraftingGroup.in(PayDraftingGroup::getId,listIds);
|
||||
@@ -497,7 +501,7 @@ public class PayDraftingGroupSubItemController extends JeroController<PayDraftin
|
||||
* @param payDraftingGroupSubItem 起草组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "企业端-查询起草组成员", notes = "起草组成员-分页列表查询")
|
||||
@ApiOperation(value = "企业端-查询起草组成员", notes = "企业端-查询起草组成员")
|
||||
@GetMapping(value = "/getItemById")
|
||||
public Result<?> query(PayDraftingGroupSubItem payDraftingGroupSubItem,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@@ -518,7 +522,28 @@ public class PayDraftingGroupSubItemController extends JeroController<PayDraftin
|
||||
}
|
||||
Page<PayDraftingGroupSubItem> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayDraftingGroupSubItem> pageList = payDraftingGroupSubItemService.queryPageList(page, payDraftingGroupSubItem, paymentDate);
|
||||
PayDraftingGroupSubItem item = pageList.getRecords().get(0);
|
||||
List<PayDraftingGroupSubItem> records = pageList.getRecords();
|
||||
if (CollectionUtils.isEmpty(records)) {
|
||||
return Result.error("该成员不存在!");
|
||||
}
|
||||
PayDraftingGroupSubItem item = records.get(0);
|
||||
return Result.OK(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业端-起草组成员添加(不带权限)
|
||||
*
|
||||
* @param payDraftingGroupSubItem 起草组成员
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "企业端-起草组成员添加", notes = "企业端-起草组成员添加")
|
||||
@PostMapping(value = "/addByQRCode")
|
||||
public Result<?> addByQRCode(@RequestBody PayDraftingGroupSubItem payDraftingGroupSubItem) {
|
||||
StringBuilder msg = ValidUtil.validateAll(payDraftingGroupSubItem);
|
||||
if (!StringUtils.isBlank(msg)) {
|
||||
return Result.error(msg.toString());
|
||||
}
|
||||
payDraftingGroupSubItemService.addPayDraftingGroupSubItem(payDraftingGroupSubItem);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
}
|
||||
|
||||
+9
-2
@@ -178,10 +178,17 @@ public class PayDraftingGroupSubItemServiceImpl extends ServiceImpl<PayDraftingG
|
||||
throw new JeroBootException("负责人不存在!");
|
||||
}
|
||||
|
||||
// 如果是审核通过的状态就发送消息
|
||||
if (Objects.equals(payDraftingGroupSubItem.getCheckResult(),DraftingConstant.CHECK_PASS)){
|
||||
sendMessage(payDraftingGroupSubItem, payDraftingGroup, listPayDraftingGroupSubItemContactsNew);
|
||||
}
|
||||
}
|
||||
|
||||
private void sendMessage(PayDraftingGroupSubItem payDraftingGroupSubItem, PayDraftingGroup payDraftingGroup, List<PayDraftingGroupSubItemContacts> listPayDraftingGroupSubItemContactsNew) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("type",ProjectCommon.PROJECT_TYPE7);
|
||||
json.put("draftGroupId",payDraftingGroupSubItem.getDraftingGroupId());
|
||||
json.put("projectId",payDraftingGroupSubItem.getId());
|
||||
json.put("draftGroupId", payDraftingGroupSubItem.getDraftingGroupId());
|
||||
json.put("projectId", payDraftingGroupSubItem.getId());
|
||||
json.put("path","/draftTeam/DraftTeamDetail");
|
||||
//新建项目 给企业联系人发消息
|
||||
if(!CollectionUtils.isEmpty(listPayDraftingGroupSubItemContactsNew)) {
|
||||
|
||||
+49
@@ -151,6 +151,55 @@ public class PayWorkingGroupSubItemController extends JeroController<PayWorkingG
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 查询工作组成员信息(不带权限)
|
||||
* @param payWorkingGroupSubItem 工作组成员
|
||||
* @param pageNo 页数
|
||||
* @param pageSize 条数
|
||||
* @param paymentDate 日期
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "企业端-工作组成员-分页列表查询", notes = "企业端-工作组成员-分页列表查询")
|
||||
@GetMapping(value = "/getItemById")
|
||||
public Result<?> getItemById(PayWorkingGroupSubItem payWorkingGroupSubItem,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "paymentDate", required = false) String paymentDate) {
|
||||
if (!StringUtils.isBlank(payWorkingGroupSubItem.getChargeCompanyTemporaryName()) && payWorkingGroupSubItem.getChargeCompanyTemporaryName().length() > 50) {
|
||||
return Result.error("成员单位长度不能大于50个字符");
|
||||
}
|
||||
if (StringUtils.isBlank(payWorkingGroupSubItem.getWorkingGroupId())) {
|
||||
return Result.error("工作组id不能为空!");
|
||||
}
|
||||
if(!StringUtils.isBlank(payWorkingGroupSubItem.getChargeCompanyTemporaryName())){
|
||||
payWorkingGroupSubItem.setChargeCompanyTemporaryName(oConvertUtils.replaceAllPercent(payWorkingGroupSubItem.getChargeCompanyTemporaryName()));
|
||||
}
|
||||
PayWorkingGroup payWorkingGroup = payWorkingGroupService.getById(payWorkingGroupSubItem.getWorkingGroupId());
|
||||
if(Objects.isNull(payWorkingGroup)){
|
||||
return Result.error("工作组不存在!");
|
||||
}
|
||||
Page<PayWorkingGroupSubItem> page = new Page<>(pageNo, pageSize);
|
||||
IPage<PayWorkingGroupSubItem> pageList = payWorkingGroupSubItemService.queryPageList(page, payWorkingGroupSubItem, paymentDate);
|
||||
if(!CollectionUtils.isEmpty(pageList.getRecords())){
|
||||
List<PayWorkingGroupSubItem> list = pageList.getRecords();
|
||||
list.forEach(p->{
|
||||
if(Objects.isNull(p.getReceivableAmount())){
|
||||
p.setReceivableAmount(new BigDecimal("0.00"));
|
||||
}
|
||||
if(Objects.isNull(p.getPaidAmount())){
|
||||
p.setPaidAmount(new BigDecimal("0.00"));
|
||||
}
|
||||
});
|
||||
}
|
||||
List<PayWorkingGroupSubItem> records = pageList.getRecords();
|
||||
if (CollectionUtils.isEmpty(records)){
|
||||
return Result.error("该成员不存在");
|
||||
}
|
||||
PayWorkingGroupSubItem item = records.get(0);
|
||||
return Result.OK(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
||||
+3
@@ -78,6 +78,9 @@
|
||||
<if test="payWorkingGroupSubItem.estimatedArrivalEndDate != null">
|
||||
AND pwgs.estimated_arrival_date <= #{payWorkingGroupSubItem.estimatedArrivalEndDate}
|
||||
</if>
|
||||
<if test="payWorkingGroupSubItem.id != null and payWorkingGroupSubItem.id != ''">
|
||||
and pwgs.id = #{payWorkingGroupSubItem.id}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY pwgs.id
|
||||
ORDER BY pwgs.create_time desc
|
||||
|
||||
Reference in New Issue
Block a user