Commit 40d1b877 by wukaiqiang

Merge branch 'develop' into feature/form_statistics_05

parents 078fb8bc ee28bb94
...@@ -27,6 +27,11 @@ public class QueryParam { ...@@ -27,6 +27,11 @@ public class QueryParam {
*/ */
private String type; private String type;
/**
* 用户Id
*/
private String userId;
public String getType() { public String getType() {
...@@ -69,4 +74,12 @@ public class QueryParam { ...@@ -69,4 +74,12 @@ public class QueryParam {
this.orderField = orderField; this.orderField = orderField;
} }
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
} }
...@@ -48,7 +48,12 @@ import com.beecode.bcp.authz.service.PrivilegeService; ...@@ -48,7 +48,12 @@ import com.beecode.bcp.authz.service.PrivilegeService;
import com.beecode.bcp.type.KObject; import com.beecode.bcp.type.KObject;
import com.beecode.bcp.type.json.JSONObjectUtils; import com.beecode.bcp.type.json.JSONObjectUtils;
import com.beecode.inz.basis.team.pojo.ResponseObj; import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.inz.message.internal.QueryParam;
import com.beecode.inz.message.service.MessageInfoService;
import com.beecode.inz.message.web.info.MessageInfo;
import com.beecode.nlib.utils.StringUtils; import com.beecode.nlib.utils.StringUtils;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.xyst.dinas.biz.enumeration.PlanningCycleEnum; import com.xyst.dinas.biz.enumeration.PlanningCycleEnum;
import com.xyst.dinas.biz.service.DinasCommonService; import com.xyst.dinas.biz.service.DinasCommonService;
import com.xyst.dinas.biz.service.DinasOrganizationService; import com.xyst.dinas.biz.service.DinasOrganizationService;
...@@ -74,6 +79,9 @@ public class DinasCommonController { ...@@ -74,6 +79,9 @@ public class DinasCommonController {
PrivilegeService privilegeService; PrivilegeService privilegeService;
@Autowired @Autowired
private MessageInfoService messageInfoService;
@Autowired
public AttachmentService attachmentService; public AttachmentService attachmentService;
private final Logger logger = LoggerFactory.getLogger(getClass()); private final Logger logger = LoggerFactory.getLogger(getClass());
/** /**
...@@ -352,5 +360,59 @@ public class DinasCommonController { ...@@ -352,5 +360,59 @@ public class DinasCommonController {
} }
return false; return false;
} }
/**
* 获取指定消息类型指定页的消息-已读未读都包含,未读在前面(场站用户)
* @throws Exception
*/
@RequestMapping(value ="/warehouse/api/common/messages/query",method = RequestMethod.POST)
public Object queryByPagingWarehouse(@RequestBody String body) throws Exception{
Gson gson = new Gson();
QueryParam param = null;
try{
param = gson.fromJson(body, QueryParam.class);
}catch(JsonSyntaxException e){
logger.error("Paging param is no correct");
throw new JsonSyntaxException("Paging param is no correct",e);
}
if(param == null){
logger.error("Paging param is no correct");
throw new Exception("Paging param is no correct");
}
String userId = param.getUserId();
List<KObject> lists = messageInfoService.queryByPaging(userId, param);
List<MessageInfo> messageInfos = new ArrayList<MessageInfo>();
for(KObject kobject :lists){
messageInfos.add(new MessageInfo(kobject));
}
return messageInfos;
}
/**
* 获取指定消息类型指定页的消息-已读未读都包含,未读在前面(购砂单位用户)
* @throws Exception
*/
@RequestMapping(value ="/sand/user/common/messages/query",method = RequestMethod.POST)
public Object queryByPagingSand(@RequestBody String body) throws Exception{
Gson gson = new Gson();
QueryParam param = null;
try{
param = gson.fromJson(body, QueryParam.class);
}catch(JsonSyntaxException e){
logger.error("Paging param is no correct");
throw new JsonSyntaxException("Paging param is no correct",e);
}
if(param == null){
logger.error("Paging param is no correct");
throw new Exception("Paging param is no correct");
}
String userId = param.getUserId();
List<KObject> lists = messageInfoService.queryByPaging(userId, param);
List<MessageInfo> messageInfos = new ArrayList<MessageInfo>();
for(KObject kobject :lists){
messageInfos.add(new MessageInfo(kobject));
}
return messageInfos;
}
} }
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='0ba03c35-0f62-40ac-bc96-94e80dffe2d3' category='资金/人工账户充值(区域公司)' seq='2'></privilege> <privilege type='TOKEN' target-type='' id='0ba03c35-0f62-40ac-bc96-94e80dffe2d3' category='资金/人工账户充值' seq='2'></privilege>
</content> </content>
</model> </model>
\ No newline at end of file
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='c7901c69-fe3b-4f4f-9f8f-edee831af56f' category='资金/费用调整(区域公司)' seq='2'></privilege> <privilege type='TOKEN' target-type='' id='c7901c69-fe3b-4f4f-9f8f-edee831af56f' category='资金/费用调整' seq='2'></privilege>
</content> </content>
</model> </model>
\ No newline at end of file
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='71e8e3ed-b0d0-47f4-b451-752416a5fa7d' category='资金/退费管理(区域公司)' seq='1'></privilege> <privilege type='TOKEN' target-type='' id='71e8e3ed-b0d0-47f4-b451-752416a5fa7d' category='资金/退费管理' seq='1'></privilege>
</content> </content>
</model> </model>
\ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<content> <content>
<m:privilege> <m:privilege>
<m:type>TOKEN</m:type> <m:type>TOKEN</m:type>
<m:category>资金/人工账户充值(区域公司)</m:category> <m:category>资金/人工账户充值</m:category>
<m:seq>2</m:seq> <m:seq>2</m:seq>
</m:privilege> </m:privilege>
</content> </content>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<content> <content>
<m:privilege> <m:privilege>
<m:type>TOKEN</m:type> <m:type>TOKEN</m:type>
<m:category>资金/费用调整(区域公司)</m:category> <m:category>资金/费用调整</m:category>
<m:seq>2</m:seq> <m:seq>2</m:seq>
</m:privilege> </m:privilege>
</content> </content>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<content> <content>
<m:privilege> <m:privilege>
<m:type>TOKEN</m:type> <m:type>TOKEN</m:type>
<m:category>资金/退费管理(区域公司)</m:category> <m:category>资金/退费管理</m:category>
<m:seq>1</m:seq> <m:seq>1</m:seq>
</m:privilege> </m:privilege>
</content> </content>
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
organization.id AS id, organization.id AS id,
contract.id AS contractId, contract.id AS contractId,
contract.contractName AS contractName, contract.contractName AS contractName,
organization.name AS orgName,
company.name AS companyName, company.name AS companyName,
project.projectName AS projectName, project.projectName AS projectName,
project_type.title AS projectTypeTitle, project_type.title AS projectTypeTitle,
......
...@@ -91,17 +91,6 @@ ...@@ -91,17 +91,6 @@
}, },
{ {
"type": "VALUE", "type": "VALUE",
"title": "区域公司",
"key": "orgName",
"columnType": {
"name": "select",
"data": {
"selected": true
}
}
},
{
"type": "VALUE",
"title": "购砂单位", "title": "购砂单位",
"key": "companyName", "key": "companyName",
"columnType": { "columnType": {
......
...@@ -91,17 +91,6 @@ ...@@ -91,17 +91,6 @@
}, },
{ {
"type": "VALUE", "type": "VALUE",
"title": "区域公司",
"key": "orgName",
"columnType": {
"name": "select",
"data": {
"selected": false
}
}
},
{
"type": "VALUE",
"title": "购砂单位", "title": "购砂单位",
"key": "companyName", "key": "companyName",
"columnType": { "columnType": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment