|
|
|
@ -2,6 +2,7 @@ package com.gszc.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
|
import com.gszc.entity.*;
|
|
|
|
|
import com.gszc.mapper.*;
|
|
|
|
@ -82,8 +83,18 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
return customs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Custom> customList(String userId){
|
|
|
|
|
List<Custom> customs = customMapper.selectList(new EntityWrapper<Custom>().eq("mini_user_id", userId));
|
|
|
|
|
public List<Custom> customList(String userId,String type){
|
|
|
|
|
Wrapper<Custom> miniUserId = new EntityWrapper<Custom>().eq("mini_user_id", userId);
|
|
|
|
|
if(null==type){
|
|
|
|
|
|
|
|
|
|
}else if(type.equals("todo")){
|
|
|
|
|
miniUserId.eq("status_code","todo");
|
|
|
|
|
}else if(type.equals("disable")){
|
|
|
|
|
miniUserId.eq("status_code","disable");
|
|
|
|
|
}else if(type.equals("enable")){
|
|
|
|
|
miniUserId.eq("status_code","enable");
|
|
|
|
|
}
|
|
|
|
|
List<Custom> customs = customMapper.selectList(miniUserId);
|
|
|
|
|
return customs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -102,10 +113,15 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
* @param pageSize
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Custom> pcTodoCustomList(Integer pageNum,Integer pageSize){
|
|
|
|
|
public JSONObject pcTodoCustomList(Integer pageNum,Integer pageSize){
|
|
|
|
|
|
|
|
|
|
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "todo"));
|
|
|
|
|
List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "todo"));
|
|
|
|
|
return customs;
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("count",count);
|
|
|
|
|
jsonObject.put("customs",customs);
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -114,10 +130,14 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
* @param pageSize
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Custom> pcDisableCustomList(Integer pageNum,Integer pageSize){
|
|
|
|
|
public JSONObject pcDisableCustomList(Integer pageNum,Integer pageSize){
|
|
|
|
|
|
|
|
|
|
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "disable"));
|
|
|
|
|
List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "disable"));
|
|
|
|
|
return customs;
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("count",count);
|
|
|
|
|
jsonObject.put("customs",customs);
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -126,10 +146,14 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
* @param pageSize
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Custom> pcEnableCustomList(Integer pageNum,Integer pageSize){
|
|
|
|
|
public JSONObject pcEnableCustomList(Integer pageNum,Integer pageSize){
|
|
|
|
|
|
|
|
|
|
Integer count = customMapper.selectCount(new EntityWrapper<Custom>().eq("status_code", "enable"));
|
|
|
|
|
List<Custom> customs = customMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Custom>().eq("status_code", "enable"));
|
|
|
|
|
return customs;
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("count",count);
|
|
|
|
|
jsonObject.put("customs",customs);
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -235,9 +259,17 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Invoice> enableCustomDetailInvoiceList(String customId,Integer pageNum,Integer pageSize){
|
|
|
|
|
public JSONObject enableCustomDetailInvoiceList(String customId,Integer pageNum,Integer pageSize){
|
|
|
|
|
|
|
|
|
|
Integer count = invoiceMapper.selectCount(new EntityWrapper<Invoice>().eq("custom_id", customId));
|
|
|
|
|
List<Invoice> invoiceList = invoiceMapper.selectPage(new RowBounds((pageNum-1)*pageSize,pageSize),new EntityWrapper<Invoice>().eq("custom_id", customId));
|
|
|
|
|
return invoiceList;
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("count",count);
|
|
|
|
|
jsonObject.put("invoiceList",invoiceList);
|
|
|
|
|
return jsonObject;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteCustom(String customId){
|
|
|
|
|
customMapper.deleteById(customId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|