Commit c4baa8d1 by 焦凯

Merge branch 'develop' of gitlab.beecode.cn:kunlun/xyst_dinas/xyst_dinas_backend into develop

parents 77fb4816 e9e38cf8
...@@ -100,6 +100,7 @@ public class TenantInitListener implements ApplicationListener<ApplicationReady ...@@ -100,6 +100,7 @@ public class TenantInitListener implements ApplicationListener<ApplicationReady
this.addLicence("md_sys"); this.addLicence("md_sys");
this.addLicence("md_bill"); this.addLicence("md_bill");
this.addLicence("md_bi"); this.addLicence("md_bi");
this.addLicence("md_fileshared");
} }
private void addLicence(String key){ private void addLicence(String key){
......
...@@ -21,6 +21,7 @@ public final class AuthMgrConstants { ...@@ -21,6 +21,7 @@ public final class AuthMgrConstants {
public final static String STATISTICS = "统计"; public final static String STATISTICS = "统计";
public final static String BILL = "报表"; public final static String BILL = "报表";
public final static String BI = "综合BI"; public final static String BI = "综合BI";
public final static String FILESHARED = "文件共享";
} }
public static final class SystemRoleGroup{ public static final class SystemRoleGroup{
......
...@@ -411,6 +411,9 @@ public class AuthManagerServiceImpl implements AuthManagerService,ApplicationEve ...@@ -411,6 +411,9 @@ public class AuthManagerServiceImpl implements AuthManagerService,ApplicationEve
if(RoleRootGroup.BI.equals(privilegeGroup)) { if(RoleRootGroup.BI.equals(privilegeGroup)) {
return LicenseKeys.BI_PERMIT; return LicenseKeys.BI_PERMIT;
} }
if(RoleRootGroup.FILESHARED.equals(privilegeGroup)) {
return LicenseKeys.FILESHARED_PERMIT;
}
return null; return null;
} }
......
...@@ -1716,7 +1716,7 @@ ...@@ -1716,7 +1716,7 @@
<m:name>fileshared_list</m:name> <m:name>fileshared_list</m:name>
<m:title>文件共享</m:title> <m:title>文件共享</m:title>
<m:index>1000</m:index> <m:index>1000</m:index>
<m:license></m:license> <m:license>md_fileshared</m:license>
<m:privilege>com.xyst.dinas.fileshared.auth.FilesharedList</m:privilege> <m:privilege>com.xyst.dinas.fileshared.auth.FilesharedList</m:privilege>
<m:role></m:role> <m:role></m:role>
<m:function-definition> <m:function-definition>
......
...@@ -69,4 +69,8 @@ public interface LicenseKeys { ...@@ -69,4 +69,8 @@ public interface LicenseKeys {
* 许可访问综合BI模块 * 许可访问综合BI模块
*/ */
public final String BI_PERMIT = "md_bi"; public final String BI_PERMIT = "md_bi";
/**
* 许可访问文件共享模块
*/
public final String FILESHARED_PERMIT = "md_fileshared";
} }
...@@ -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;
}
} }
...@@ -8,7 +8,6 @@ import org.slf4j.LoggerFactory; ...@@ -8,7 +8,6 @@ import org.slf4j.LoggerFactory;
import com.beecode.bcp.type.KObject; import com.beecode.bcp.type.KObject;
import com.beecode.inz.message.MessageInfoConstants; import com.beecode.inz.message.MessageInfoConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
public class MessageInfo { public class MessageInfo {
...@@ -22,7 +21,6 @@ public class MessageInfo { ...@@ -22,7 +21,6 @@ public class MessageInfo {
private ReferenceInfo sender; private ReferenceInfo sender;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime; private Date createTime;
private String type; private String type;
......
...@@ -3,6 +3,7 @@ package com.xyst.dinas.biz.internal.service; ...@@ -3,6 +3,7 @@ package com.xyst.dinas.biz.internal.service;
import com.beecode.bap.attachment.common.Page; import com.beecode.bap.attachment.common.Page;
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.service.WarehouseUserService;
import com.beecode.inz.common.BaseConstants; import com.beecode.inz.common.BaseConstants;
import com.xyst.dinas.biz.constant.RetailInfoConstant; import com.xyst.dinas.biz.constant.RetailInfoConstant;
import com.xyst.dinas.biz.dao.DinasTypeDao; import com.xyst.dinas.biz.dao.DinasTypeDao;
...@@ -10,12 +11,11 @@ import com.xyst.dinas.biz.dao.RetailInfoDao; ...@@ -10,12 +11,11 @@ import com.xyst.dinas.biz.dao.RetailInfoDao;
import com.xyst.dinas.biz.processor.RetailInfoBuyAmountWarningCalculate; import com.xyst.dinas.biz.processor.RetailInfoBuyAmountWarningCalculate;
import com.xyst.dinas.biz.processor.RetailInfoBuyCountWarningCalculate; import com.xyst.dinas.biz.processor.RetailInfoBuyCountWarningCalculate;
import com.xyst.dinas.biz.service.RetailInfoService; import com.xyst.dinas.biz.service.RetailInfoService;
import com.xyst.dinas.biz.warn.BaseBusinessWarn; import com.xyst.dinas.biz.warn.*;
import com.xyst.dinas.biz.warn.WarnSetting;
import com.xyst.dinas.biz.warn.WarnSettingEntity;
import com.xyst.dinas.biz.warn.WarnTargetTypeEnum;
import com.xyst.dinas.biz.warn.service.WarningService; import com.xyst.dinas.biz.warn.service.WarningService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -23,6 +23,7 @@ import java.math.BigDecimal; ...@@ -23,6 +23,7 @@ import java.math.BigDecimal;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class RetailInfoServiceImpl implements RetailInfoService { public class RetailInfoServiceImpl implements RetailInfoService {
...@@ -34,6 +35,9 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -34,6 +35,9 @@ public class RetailInfoServiceImpl implements RetailInfoService {
private DinasTypeDao dinasTypeDao; private DinasTypeDao dinasTypeDao;
@Autowired @Autowired
private WarningService warningService; private WarningService warningService;
@Autowired
private WarehouseUserService warehouseUserService;
@Override @Override
public Page<KObject> queryByPaging(Page<KObject> page, Integer retailInfoStatus) throws Exception { public Page<KObject> queryByPaging(Page<KObject> page, Integer retailInfoStatus) throws Exception {
...@@ -74,10 +78,11 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -74,10 +78,11 @@ public class RetailInfoServiceImpl implements RetailInfoService {
if (warnSetting != null) { if (warnSetting != null) {
BaseBusinessWarn warn = warningService.createWarn(warnSetting.getSettingId()); BaseBusinessWarn warn = warningService.createWarn(warnSetting.getSettingId());
warn.setWarningCalculate(new RetailInfoBuyCountWarningCalculate(retailInfoName, idCard, station, selectBuyCountByIdCard(idCard, station))); warn.setWarningCalculate(new RetailInfoBuyCountWarningCalculate(retailInfoName, idCard, station, selectBuyCountByIdCard(idCard, station)));
warn.warn(false); warn.warn(true);
} else { } else {
setWarningSettingEntity(newKobject, uuid, RetailInfoConstant.RETAIL_INFO_WARN_BUY_COUNT, RetailInfoConstant.RETAIL_INFO_BUY_COUNT_WARNING_CALCULATOR,templateCount.getMax(),false,true); setWarningSettingEntity(newKobject, uuid, RetailInfoConstant.RETAIL_INFO_WARN_BUY_COUNT, RetailInfoConstant.RETAIL_INFO_BUY_COUNT_WARNING_CALCULATOR,templateCount.getMax(),false,true);
} }
//购买重量预警 //购买重量预警
//查询场站是否有对应的预警模板 //查询场站是否有对应的预警模板
templateCount = warningService.queryOneWarnSettingsByMemoAndType(RetailInfoConstant.RETAIL_INFO_WARN_BUY_AMOUNT, station.toString(),"template"); templateCount = warningService.queryOneWarnSettingsByMemoAndType(RetailInfoConstant.RETAIL_INFO_WARN_BUY_AMOUNT, station.toString(),"template");
...@@ -95,6 +100,7 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -95,6 +100,7 @@ public class RetailInfoServiceImpl implements RetailInfoService {
} }
private WarnSettingEntity setWarningSettingEntity(KObject kObject, UUID uuid,String target,String warnCalculator,String max,boolean isTemplate,boolean isOpen) { private WarnSettingEntity setWarningSettingEntity(KObject kObject, UUID uuid,String target,String warnCalculator,String max,boolean isTemplate,boolean isOpen) {
String stationId = kObject.get("station").getString(BaseConstants.ID);
WarnSettingEntity warnSettingEntity = new WarnSettingEntity(); WarnSettingEntity warnSettingEntity = new WarnSettingEntity();
warnSettingEntity.setBillType(RetailInfoConstant.RETAIL_INFO_WARN_BILL_TYPE); warnSettingEntity.setBillType(RetailInfoConstant.RETAIL_INFO_WARN_BILL_TYPE);
warnSettingEntity.setBillId(uuid); warnSettingEntity.setBillId(uuid);
...@@ -103,7 +109,7 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -103,7 +109,7 @@ public class RetailInfoServiceImpl implements RetailInfoService {
warnSettingEntity.setTargetType(WarnTargetTypeEnum.INT_TYPE.name()); warnSettingEntity.setTargetType(WarnTargetTypeEnum.INT_TYPE.name());
warnSettingEntity.setOpen(isOpen); warnSettingEntity.setOpen(isOpen);
HashMap<String, String> stringStringHashMap = new HashMap<>(); HashMap<String, String> stringStringHashMap = new HashMap<>();
stringStringHashMap.put("stationId", kObject.get("station").getString(BaseConstants.ID)); stringStringHashMap.put("stationId",stationId );
if(isTemplate){ if(isTemplate){
stringStringHashMap.put("template", "template"); stringStringHashMap.put("template", "template");
}else{ }else{
...@@ -111,8 +117,10 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -111,8 +117,10 @@ public class RetailInfoServiceImpl implements RetailInfoService {
stringStringHashMap.put("retailInfoName", kObject.getString("retailInfoName")); stringStringHashMap.put("retailInfoName", kObject.getString("retailInfoName"));
} }
warnSettingEntity.setMemo(JSONObjectUtils.toJson(stringStringHashMap).toString()); warnSettingEntity.setMemo(JSONObjectUtils.toJson(stringStringHashMap).toString());
List<KObject> allByStationId = warehouseUserService.getAllByStationId(UUID.fromString(stationId));
warnSettingEntity.setPersonnel(allByStationId.stream().map(a -> a.getString("id")).toArray(String[]::new));
warnSettingEntity.setWarnCalculator(warnCalculator); warnSettingEntity.setWarnCalculator(warnCalculator);
warningService.insertWarnSettingToIsNotice(warnSettingEntity,false); warningService.insertWarnSettingToIsNotice(warnSettingEntity,true);
return warnSettingEntity; return warnSettingEntity;
} }
...@@ -127,6 +135,8 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -127,6 +135,8 @@ public class RetailInfoServiceImpl implements RetailInfoService {
} }
} }
@Override @Override
public KObject getById(UUID id) { public KObject getById(UUID id) {
return retailInfoDao.load(id); return retailInfoDao.load(id);
...@@ -177,7 +187,6 @@ public class RetailInfoServiceImpl implements RetailInfoService { ...@@ -177,7 +187,6 @@ public class RetailInfoServiceImpl implements RetailInfoService {
@Override @Override
public Long selectBuyCountByIdCard(String idCard, UUID uuid) { public Long selectBuyCountByIdCard(String idCard, UUID uuid) {
return retailInfoDao.selectBuyCountByIdCard(idCard,uuid); return retailInfoDao.selectBuyCountByIdCard(idCard,uuid);
} }
......
...@@ -2,8 +2,11 @@ package com.xyst.dinas.biz.warn; ...@@ -2,8 +2,11 @@ package com.xyst.dinas.biz.warn;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import com.beecode.inz.basis.service.WarehouseUserService;
import com.xyst.dinas.biz.constant.RetailInfoConstant; import com.xyst.dinas.biz.constant.RetailInfoConstant;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.lang.Nullable; import org.springframework.lang.Nullable;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -25,6 +28,8 @@ public class WarningServiceImpl implements WarningService { ...@@ -25,6 +28,8 @@ public class WarningServiceImpl implements WarningService {
@Autowired @Autowired
private WarnSettingDao warnSettingDao; private WarnSettingDao warnSettingDao;
@Autowired
private WarehouseUserService warehouseUserService;
/** /**
* 新增预警设置<br/> * 新增预警设置<br/>
...@@ -281,7 +286,8 @@ public class WarningServiceImpl implements WarningService { ...@@ -281,7 +286,8 @@ public class WarningServiceImpl implements WarningService {
} }
@Override @Override
public void updateRetailInfoWarnSettingAllByTypeAndMemo(String target, String toString, Double max) { public void updateRetailInfoWarnSettingAllByTypeAndMemo(String target, String toString, Double max, List<KObject> allWarehouseUserByStationId) {
String stationUserIds = allWarehouseUserByStationId.stream().map(a -> a.getString("id")).collect(Collectors.joining(","));
List<?> objects = warnSettingDao.queryWarnSettingsListByMemoAndType(target, toString); List<?> objects = warnSettingDao.queryWarnSettingsListByMemoAndType(target, toString);
if (objects.size() < 1) { if (objects.size() < 1) {
String warnCalculator; String warnCalculator;
...@@ -298,11 +304,31 @@ public class WarningServiceImpl implements WarningService { ...@@ -298,11 +304,31 @@ public class WarningServiceImpl implements WarningService {
Assert.notNull(uuid, "The warSettingId must not be null"); Assert.notNull(uuid, "The warSettingId must not be null");
KObject warSettingIdObj = warnSettingDao.queryWarnSettingById(uuid); KObject warSettingIdObj = warnSettingDao.queryWarnSettingById(uuid);
warSettingIdObj.set(WarnSettingConstant.max, max); warSettingIdObj.set(WarnSettingConstant.max, max);
warSettingIdObj.set(WarnSettingConstant.personnel,stationUserIds);
warnSettingDao.update(warSettingIdObj); warnSettingDao.update(warSettingIdObj);
//修改后触发预警 //修改后触发预警
BaseBusinessWarn baseBusinessWarn = new BaseBusinessWarn(uuid); BaseBusinessWarn baseBusinessWarn = new BaseBusinessWarn(uuid);
baseBusinessWarn.warn(false); baseBusinessWarn.warn(true);
}
}
@Override
public void updateRetailInfoWarnSettingPersonnelByStationId(UUID stationId){
List<KObject> allWarehouseUserByStationId = warehouseUserService.getAllByStationId(stationId);
String[] stationUserIds = allWarehouseUserByStationId.stream().map(a -> a.getString("id")).toArray(String[]::new);
List<KObject> objects = (List<KObject>) warnSettingDao.queryWarnSettingsListByMemoAndType(RetailInfoConstant.RETAIL_INFO_WARN_BUY_AMOUNT, stationId.toString());
if(!CollectionUtils.isEmpty(objects)){
List<KObject> objects1 = (List<KObject>) warnSettingDao.queryWarnSettingsListByMemoAndType(RetailInfoConstant.RETAIL_INFO_WARN_BUY_COUNT, stationId.toString());
objects.addAll(objects1);
} }
for (KObject o : objects) {
o.set(WarnSettingConstant.personnel,stationUserIds);
warnSettingDao.update(o);
}
} }
...@@ -316,14 +342,14 @@ public class WarningServiceImpl implements WarningService { ...@@ -316,14 +342,14 @@ public class WarningServiceImpl implements WarningService {
}else if(target.equals(RetailInfoConstant.RETAIL_INFO_WARN_BUY_COUNT)){ }else if(target.equals(RetailInfoConstant.RETAIL_INFO_WARN_BUY_COUNT)){
warnSettingEntity.setTargetType(WarnTargetTypeEnum.INT_TYPE.name()); warnSettingEntity.setTargetType(WarnTargetTypeEnum.INT_TYPE.name());
} }
warnSettingEntity.setOpen(false); warnSettingEntity.setOpen(true);
HashMap<String, String> stringStringHashMap = new HashMap<>(); HashMap<String, String> stringStringHashMap = new HashMap<>();
stringStringHashMap.put("stationId", stationId); stringStringHashMap.put("stationId", stationId);
stringStringHashMap.put("template","template"); stringStringHashMap.put("template","template");
warnSettingEntity.setMax(max+""); warnSettingEntity.setMax(max+"");
warnSettingEntity.setMemo(JSONObjectUtils.toJson(stringStringHashMap).toString()); warnSettingEntity.setMemo(JSONObjectUtils.toJson(stringStringHashMap).toString());
warnSettingEntity.setWarnCalculator(warnCalculator); warnSettingEntity.setWarnCalculator(warnCalculator);
insertWarnSettingToIsNotice(warnSettingEntity, false); insertWarnSettingToIsNotice(warnSettingEntity, true);
} }
} }
...@@ -103,5 +103,7 @@ public interface WarningService { ...@@ -103,5 +103,7 @@ public interface WarningService {
WarnSetting queryOneWarnSettingsByMemoAndType(String target, String ... memo); WarnSetting queryOneWarnSettingsByMemoAndType(String target, String ... memo);
void updateRetailInfoWarnSettingAllByTypeAndMemo(String target, String toString, Double max); void updateRetailInfoWarnSettingPersonnelByStationId(UUID stationId);
void updateRetailInfoWarnSettingAllByTypeAndMemo(String target, String toString, Double max,List<KObject> stationUsers);
} }
...@@ -16,6 +16,8 @@ import java.util.zip.CheckedOutputStream; ...@@ -16,6 +16,8 @@ import java.util.zip.CheckedOutputStream;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import javax.servlet.http.HttpServletRequest;
import org.json.JSONObject; import org.json.JSONObject;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -26,6 +28,7 @@ import org.springframework.format.annotation.DateTimeFormat; ...@@ -26,6 +28,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -48,7 +51,13 @@ import com.beecode.bcp.authz.service.PrivilegeService; ...@@ -48,7 +51,13 @@ 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.util.MessageUtils;
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,8 +83,13 @@ public class DinasCommonController { ...@@ -74,8 +83,13 @@ public class DinasCommonController {
PrivilegeService privilegeService; PrivilegeService privilegeService;
@Autowired @Autowired
private MessageInfoService messageInfoService;
@Autowired
private HttpServletRequest request;
@Autowired
public AttachmentService attachmentService; public AttachmentService attachmentService;
private final Logger logger = LoggerFactory.getLogger(getClass()); private final Logger logger = LoggerFactory.getLogger(getClass());
private final static String READ = "read";
/** /**
* @Description: 根据部门id查询全公司及其该部门的子部门(包括该部门自身) * @Description: 根据部门id查询全公司及其该部门的子部门(包括该部门自身)
...@@ -352,5 +366,125 @@ public class DinasCommonController { ...@@ -352,5 +366,125 @@ 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;
}
/**
* 根据消息的id更改消息的状态为已读(场站用户)
* @param partId
* @return
*/
@RequestMapping(value ="/warehouse/api/common/message/{msgid}",method = RequestMethod.PUT)
public void updateReadStatusByMsgIdWarehouse(@PathVariable("msgid") String msgid) {
Assert.notNull(msgid, "msgid must not be null");
String operation = request.getHeader("operation");
switch(operation){
case READ: messageInfoService.updateReadStatusByMsgId(msgid);
break;
default:
throw new UnsupportedOperationException("operation: " + operation);
}
}
/**
* 根据消息的id更改消息的状态为已读(购砂单位用户)
* @param partId
* @return
*/
@RequestMapping(value ="/sand/user/common/message/{msgid}",method = RequestMethod.PUT)
public void updateReadStatusByMsgIdSand(@PathVariable("msgid") String msgid) {
Assert.notNull(msgid, "msgid must not be null");
String operation = request.getHeader("operation");
switch(operation){
case READ: messageInfoService.updateReadStatusByMsgId(msgid);
break;
default:
throw new UnsupportedOperationException("operation: " + operation);
}
}
/**
* 根据当前用户的id和消息类型获取未读消息数量(场站用户)
* @param partId
* @return
* @throws Exception
*/
@RequestMapping(value ="/warehouse/api/common/message/noread/count",method = RequestMethod.GET)
public Object countNoReadByUserIdAndType(@RequestParam String type,@RequestParam UUID userId) throws Exception {
String count = messageInfoService.countNoReadByUserIdAndType(userId.toString(), type);
return count;
}
/**
* 根据当前用户的id和消息类型获取未读消息数量(购砂单位用户)
* @param partId
* @return
* @throws Exception
*/
@RequestMapping(value ="/sand/user/common/message/noread/count",method = RequestMethod.GET)
public Object countNoReadByUserIdAndTypeSand(@RequestParam String type,@RequestParam UUID userId) throws Exception {
//String userId = MessageUtils.gerCurrentUserId(isCustomer);
String count = messageInfoService.countNoReadByUserIdAndType(userId.toString(), type);
return count;
}
} }
...@@ -5,6 +5,7 @@ import com.beecode.bap.attachment.common.Page; ...@@ -5,6 +5,7 @@ import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KClass; import com.beecode.bcp.type.KClass;
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.service.WarehouseUserService;
import com.beecode.inz.basis.team.pojo.ResponseObj; import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.nlib.utils.StringUtils; import com.beecode.nlib.utils.StringUtils;
import com.xyst.dinas.biz.constant.RetailInfoConstant; import com.xyst.dinas.biz.constant.RetailInfoConstant;
...@@ -16,6 +17,7 @@ import org.slf4j.LoggerFactory; ...@@ -16,6 +17,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.UUID; import java.util.UUID;
/** /**
...@@ -32,6 +34,8 @@ public class RetailInfoController { ...@@ -32,6 +34,8 @@ public class RetailInfoController {
private RetailInfoService retailInfoService; private RetailInfoService retailInfoService;
@Autowired @Autowired
private WarningService warningService; private WarningService warningService;
@Autowired
private WarehouseUserService warehouseUserService;
@RequestMapping(value = "list/page", method = RequestMethod.GET) @RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getListPage( public ResponseObj getListPage(
...@@ -137,7 +141,8 @@ public class RetailInfoController { ...@@ -137,7 +141,8 @@ public class RetailInfoController {
if(StringUtils.isEmpty(target)){ if(StringUtils.isEmpty(target)){
return ResponseObj.error(400,"指标错误"); return ResponseObj.error(400,"指标错误");
} }
warningService.updateRetailInfoWarnSettingAllByTypeAndMemo(target,stationId.toString(),Double.parseDouble(max)); List<KObject> allWarehouseUserByStationId = warehouseUserService.getAllByStationId(stationId);
warningService.updateRetailInfoWarnSettingAllByTypeAndMemo(target,stationId.toString(),Double.parseDouble(max),allWarehouseUserByStationId);
return ResponseObj.success(); return ResponseObj.success();
} }
......
...@@ -5,10 +5,12 @@ import com.beecode.bap.attachment.common.Page; ...@@ -5,10 +5,12 @@ import com.beecode.bap.attachment.common.Page;
import com.beecode.bcp.type.KClass; import com.beecode.bcp.type.KClass;
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.service.WarehouseUserService;
import com.beecode.inz.basis.team.pojo.ResponseObj; import com.beecode.inz.basis.team.pojo.ResponseObj;
import com.beecode.nlib.utils.StringUtils; import com.beecode.nlib.utils.StringUtils;
import com.xyst.dinas.biz.constant.StationConstant; import com.xyst.dinas.biz.constant.StationConstant;
import com.xyst.dinas.biz.service.StationService; import com.xyst.dinas.biz.service.StationService;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -29,6 +31,9 @@ public class StationController { ...@@ -29,6 +31,9 @@ public class StationController {
@Autowired @Autowired
private StationService stationService; private StationService stationService;
@Autowired
private WarehouseUserService warehouseUserService;
@RequestMapping(value = "list/page", method = RequestMethod.GET) @RequestMapping(value = "list/page", method = RequestMethod.GET)
public ResponseObj getListPage( public ResponseObj getListPage(
...@@ -131,6 +136,12 @@ public class StationController { ...@@ -131,6 +136,12 @@ public class StationController {
if(id == null){ if(id == null){
return ResponseObj.error(400,"'id' must be not null!"); return ResponseObj.error(400,"'id' must be not null!");
} }
//查询是否有未删除的场站人员
List<KObject> allByStationId = warehouseUserService.getAllByStationId(id);
if(CollectionUtils.isNotEmpty(allByStationId)){
return ResponseObj.error(500,"有关联的场站人员,不许删除");
}
//查询是否有根据合同关联的场站
stationService.deleteById(id); stationService.deleteById(id);
return ResponseObj.success("删除成功"); return ResponseObj.success("删除成功");
} }
......
...@@ -92,4 +92,21 @@ public class WarnSettingController { ...@@ -92,4 +92,21 @@ public class WarnSettingController {
return ResponseObj.success("查询成功",personnel); return ResponseObj.success("查询成功",personnel);
} }
/**
* 修改散户预警设置的人员
* @param stationId 场站id
* @return
*/
@PostMapping("/warnsetting/updateRetailInfoWarnSettingPersonnelByStationId/{stationId}")
public ResponseObj updateWaringSettingPersonnel(@PathVariable("stationId") UUID stationId){
if(stationId == null){
return ResponseObj.error(400,"'id' must be not null!");
}
warningService.updateRetailInfoWarnSettingPersonnelByStationId(stationId);
return ResponseObj.success("修改成功");
}
} }
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</column> </column>
</property> </property>
<property name="sortOrder" type="int" not-null="true" unique="true" update="false" insert="false" index="dinas_sort_index" > <property name="sortOrder" type="int" not-null="false" unique="false" >
<column name="sort_order" length="10"> <column name="sort_order" length="10">
<comment >排序</comment> <comment >排序</comment>
</column> </column>
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<comment>不通过原因</comment> <comment>不通过原因</comment>
</column> </column>
</property> </property>
<property name="sortOrder" type="int" not-null="true" unique="true" index="sand_mining_area_sort_index" > <property name="sortOrder" type="int" not-null="false">
<column name="sort_order" length="10"> <column name="sort_order" length="10">
<comment >排序</comment> <comment >排序</comment>
</column> </column>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
<comment>备注</comment> <comment>备注</comment>
</column> </column>
</property> </property>
<property name="sortOrder" type="int" not-null="true" unique="true" index="station_sort_index" > <property name="sortOrder" type="int" not-null="false" unique="false" >
<column name="sort_order" length="10"> <column name="sort_order" length="10">
<comment >排序</comment> <comment >排序</comment>
</column> </column>
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<comment>备注</comment> <comment>备注</comment>
</column> </column>
</property> </property>
<property name="sortOrder" type="int" not-null="true" unique="true" index="station_sort_index" > <property name="sortOrder" type="int" not-null="false" >
<column name="sort_order" length="10"> <column name="sort_order" length="10">
<comment >排序</comment> <comment >排序</comment>
</column> </column>
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
</column> </column>
</property> </property>
<property name="sortOrder" type="int" not-null="true" unique="true" update="false" insert="false" index="camera_sort_index" > <property name="sortOrder" type="int" not-null="true" unique="true" >
<column name="sort_order" length="10"> <column name="sort_order" length="10">
<comment >排序</comment> <comment >排序</comment>
</column> </column>
......
...@@ -37,7 +37,7 @@ public class ArtificialRechargeServiceImpl implements ArtificialRechargeService ...@@ -37,7 +37,7 @@ public class ArtificialRechargeServiceImpl implements ArtificialRechargeService
contract.set("depositBalance", contract.getBigDecimal("depositBalance") == null ? new BigDecimal("0").add(jsonObject.getBigDecimal("rechargeAmount")) : contract.getBigDecimal("depositBalance").add(jsonObject.getBigDecimal("rechargeAmount"))); contract.set("depositBalance", contract.getBigDecimal("depositBalance") == null ? new BigDecimal("0").add(jsonObject.getBigDecimal("rechargeAmount")) : contract.getBigDecimal("depositBalance").add(jsonObject.getBigDecimal("rechargeAmount")));
} }
contractDao.update(contract); contractDao.update(contract);
BaseBusinessWarn warn = warningService.createWarn("合同", contractId, "预付款余额"); BaseBusinessWarn warn = warningService.createWarn("合同", contract.getUuid("contractId"), "预付款余额");
warn.setWarningCalculate(new StockAmountWarnCalculate(contract.getDouble("advanceBalance"))); warn.setWarningCalculate(new StockAmountWarnCalculate(contract.getDouble("advanceBalance")));
warn.warn(); warn.warn();
return ResponseObj.success(); return ResponseObj.success();
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
<attribute id='2e29930f-7250-4714-b41c-5bd3ffee2c4e' name='account' columnName='account' title='账号' type='string' default='' precision='' isArray='false'> <attribute id='2e29930f-7250-4714-b41c-5bd3ffee2c4e' name='account' columnName='account' title='账号' type='string' default='' precision='' isArray='false'>
<annotation id='14f073bb-ea3a-4ab3-971c-223040cbe678' attributeId='59d25e8c-9537-4c27-8846-8c58eedc098f' name='length' value='100'></annotation> <annotation id='14f073bb-ea3a-4ab3-971c-223040cbe678' attributeId='59d25e8c-9537-4c27-8846-8c58eedc098f' name='length' value='100'></annotation>
</attribute> </attribute>
<attribute id='2e29930f-7250-4714-b41c-5bd3ffee2c4e' name='applicantId' columnName='applicant_id' title='申请人id' type='string' default='' precision='' isArray='false'>
<annotation id='14f073bb-ea3a-4ab3-971c-223040cbe678' attributeId='59d25e8c-9537-4c27-8846-8c58eedc098f' name='length' value='100'></annotation>
</attribute>
<attribute id='2e29930f-7250-4714-b41c-5bd3ffee2c4e' name='applicant' columnName='applicant' title='申请人' type='string' default='' precision='' isArray='false'> <attribute id='2e29930f-7250-4714-b41c-5bd3ffee2c4e' name='applicant' columnName='applicant' title='申请人' type='string' default='' precision='' isArray='false'>
<annotation id='14f073bb-ea3a-4ab3-971c-223040cbe678' attributeId='59d25e8c-9537-4c27-8846-8c58eedc098f' name='length' value='100'></annotation> <annotation id='14f073bb-ea3a-4ab3-971c-223040cbe678' attributeId='59d25e8c-9537-4c27-8846-8c58eedc098f' name='length' value='100'></annotation>
</attribute> </attribute>
......
...@@ -75,7 +75,15 @@ ...@@ -75,7 +75,15 @@
</ref> </ref>
<description></description> <description></description>
</field> </field>
<field title='申请人id'>
<name>applicantId</name>
<type>string</type>
<ref>
<type></type>
<name></name>
</ref>
<description></description>
</field>
<field title='申请人'> <field title='申请人'>
<name>applicant</name> <name>applicant</name>
<type>string</type> <type>string</type>
......
...@@ -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>
......
...@@ -300,6 +300,29 @@ ...@@ -300,6 +300,29 @@
<m:properties> <m:properties>
<m:property> <m:property>
<m:key>name</m:key> <m:key>name</m:key>
<m:value>applicant_id</m:value>
</m:property>
</m:properties>
</m:annotation>
</m:annotations>
<m:id>2e29930f-7250-4714-b41c-5bd3ffee2c4e</m:id>
<m:name>applicantId</m:name>
<m:title>申请人id</m:title>
<m:type>string</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>bcp.type.constraint.StringLength</m:type>
<m:value>100</m:value>
</m:annotation>
<m:annotation>
<m:type>javax.persistence.Column</m:type>
<m:properties>
<m:property>
<m:key>name</m:key>
<m:value>applicant</m:value> <m:value>applicant</m:value>
</m:property> </m:property>
</m:properties> </m:properties>
......
...@@ -87,6 +87,16 @@ ...@@ -87,6 +87,16 @@
<m:desc></m:desc> <m:desc></m:desc>
</m:field> </m:field>
<m:field> <m:field>
<m:name>applicantId</m:name>
<m:title>申请人id</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>applicant</m:name> <m:name>applicant</m:name>
<m:title>申请人</m:title> <m:title>申请人</m:title>
<m:type>string</m:type> <m:type>string</m:type>
......
...@@ -70,6 +70,16 @@ ...@@ -70,6 +70,16 @@
<m:desc></m:desc> <m:desc></m:desc>
</m:field> </m:field>
<m:field> <m:field>
<m:name>applicantId</m:name>
<m:title>申请人id</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>applicant</m:name> <m:name>applicant</m:name>
<m:title>申请人</m:title> <m:title>申请人</m:title>
<m:type>string</m:type> <m:type>string</m:type>
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
<property name="refundReason" type="nstring" not-null="false"> <property name="refundReason" type="nstring" not-null="false">
<column name="refund_reason" length="300"></column> <column name="refund_reason" length="300"></column>
</property> </property>
<property name="applicantId" type="nstring" not-null="false">
<column name="applicant_id" length="100"></column>
</property>
<property name="applicant" type="nstring" not-null="false"> <property name="applicant" type="nstring" not-null="false">
<column name="applicant" length="100"></column> <column name="applicant" length="100"></column>
</property> </property>
......
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='88345a57-267b-4644-9de6-ba195d0af9f5' category='价格/调价申请' seq='0'></privilege> <privilege type='TOKEN' target-type='' id='88345a57-267b-4644-9de6-ba195d0af9f5' category='价格/调价申请(区域公司)' seq='0'></privilege>
</content> </content>
</model> </model>
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='00fd2bfd-585d-4805-9a74-5e88b27119f1' category='价格/调价申请' seq='0'></privilege> <privilege type='TOKEN' target-type='' id='00fd2bfd-585d-4805-9a74-5e88b27119f1' category='价格/调价申请(区域公司)' seq='0'></privilege>
</content> </content>
</model> </model>
...@@ -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>0</m:seq> <m:seq>0</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>0</m:seq> <m:seq>0</m:seq>
</m:privilege> </m:privilege>
</content> </content>
......
...@@ -49,7 +49,7 @@ public class SandWarningExeProcessor implements DataProcessor { ...@@ -49,7 +49,7 @@ public class SandWarningExeProcessor implements DataProcessor {
sandAreaName = byId.getString("sandMiningAreaName"); sandAreaName = byId.getString("sandMiningAreaName");
shipName="-"; shipName="-";
regionalCompanyName=byId.get("regionalCompany").getString("name"); regionalCompanyName=byId.get("regionalCompany").getString("name");
row.put("detail", warnSetting.getMax()); row.put("detail", row.get("actualValue"));
}else if(SandMiningAreaConstant.SAND_SHIP_WARN_BILL_TYPE.equals(billType)){ }else if(SandMiningAreaConstant.SAND_SHIP_WARN_BILL_TYPE.equals(billType)){
KObject sandMining = sandMiningService.getById(billId); KObject sandMining = sandMiningService.getById(billId);
...@@ -57,7 +57,7 @@ public class SandWarningExeProcessor implements DataProcessor { ...@@ -57,7 +57,7 @@ public class SandWarningExeProcessor implements DataProcessor {
shipName=sandMining.get("ship").getString("shipName"); shipName=sandMining.get("ship").getString("shipName");
regionalCompanyName=sandMining.get("regionalCompany").getString("name"); regionalCompanyName=sandMining.get("regionalCompany").getString("name");
row.put("detail", row.get("target").toString()); row.put("detail", row.get("-").toString());
} }
row.put("sandAreaName", sandAreaName); row.put("sandAreaName", sandAreaName);
row.put("shipName", shipName); row.put("shipName", shipName);
......
...@@ -111,6 +111,17 @@ ...@@ -111,6 +111,17 @@
</m:field> </m:field>
<m:field> <m:field>
<m:name>min</m:name> <m:name>min</m:name>
<m:title>最少值</m:title>
<m:type>string</m:type>
<m:ref>
<m:name></m:name>
<m:type></m:type>
</m:ref>
<m:desc></m:desc>
</m:field>
<m:field>
<m:name>actualValue</m:name>
<m:title>实际值</m:title> <m:title>实际值</m:title>
<m:type>string</m:type> <m:type>string</m:type>
<m:ref> <m:ref>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<description></description> <description></description>
</field> </field>
<field title='违规类型名称'> <field title='违规类型名称'>
<name>violationType.typeName</name> <name>violationType.name</name>
<type>string</type> <type>string</type>
<ref> <ref>
<type></type> <type></type>
......
...@@ -48,13 +48,13 @@ ...@@ -48,13 +48,13 @@
<name>violationType.id</name> <name>violationType.id</name>
<type>uuid</type> <type>uuid</type>
<ref> <ref>
<type>一般引用</type> <type></type>
<name>com.xyst.dinas.safe.datamodel.ViolationType</name> <name>com.xyst.dinas.safe.datamodel.ViolationType</name>
</ref> </ref>
<description></description> <description></description>
</field> </field>
<field title='违规类型名称'> <field title='违规类型名称'>
<name>violationType.typeName</name> <name>violationType.name</name>
<type>string</type> <type>string</type>
<ref> <ref>
<type></type> <type></type>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<description></description> <description></description>
</field> </field>
<field title='违规类型名称'> <field title='违规类型名称'>
<name>violationType.typeName</name> <name>violationType.name</name>
<type>string</type> <type>string</type>
<ref> <ref>
<type></type> <type></type>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<m:desc></m:desc> <m:desc></m:desc>
</m:field> </m:field>
<m:field> <m:field>
<m:name>violationType.typeName</m:name> <m:name>violationType.name</m:name>
<m:title>违规类型名称</m:title> <m:title>违规类型名称</m:title>
<m:type>string</m:type> <m:type>string</m:type>
<m:ref> <m:ref>
......
...@@ -56,12 +56,12 @@ ...@@ -56,12 +56,12 @@
<m:type>uuid</m:type> <m:type>uuid</m:type>
<m:ref> <m:ref>
<m:name>com.xyst.dinas.safe.datamodel.ViolationType</m:name> <m:name>com.xyst.dinas.safe.datamodel.ViolationType</m:name>
<m:type>一般引用</m:type> <m:type></m:type>
</m:ref> </m:ref>
<m:desc></m:desc> <m:desc></m:desc>
</m:field> </m:field>
<m:field> <m:field>
<m:name>violationType.typeName</m:name> <m:name>violationType.name</m:name>
<m:title>违规类型名称</m:title> <m:title>违规类型名称</m:title>
<m:type>string</m:type> <m:type>string</m:type>
<m:ref> <m:ref>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<m:desc></m:desc> <m:desc></m:desc>
</m:field> </m:field>
<m:field> <m:field>
<m:name>violationType.typeName</m:name> <m:name>violationType.name</m:name>
<m:title>违规类型名称</m:title> <m:title>违规类型名称</m:title>
<m:type>string</m:type> <m:type>string</m:type>
<m:ref> <m:ref>
......
...@@ -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": {
......
...@@ -287,7 +287,9 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum ...@@ -287,7 +287,9 @@ public class AdvancePaymentBalanceSumDaoImpl implements AdvancePaymentBalanceSum
+ " where 1=1 "); + " where 1=1 ");
if (dealYear != null && !(dealYear.isEmpty())) if (dealYear != null && !(dealYear.isEmpty()))
hql.append(" and advancePayment1.deal_year = :dealYear "); hql.append(" and advancePayment1.deal_year = :dealYear ");
hql.append( " GROUP BY advancePayment1.purchase_sand_unit_id, advancePayment1.project_id ) \r\n" hql.append( " GROUP BY advancePayment1.purchase_sand_unit_id, advancePayment1.project_id )"
+ " GROUP BY advancePayment.project_id \r\n"
+ " ,advancePayment.purchase_sand_unit_id \r\n"
+ " ) AS advancePaymentAdvance ON advancePaymentAdvance.purchase_sand_unit_id = advancePaymentAndBalanceSummary.purchase_sand_unit_id \r\n" + " ) AS advancePaymentAdvance ON advancePaymentAdvance.purchase_sand_unit_id = advancePaymentAndBalanceSummary.purchase_sand_unit_id \r\n"
+ " AND advancePaymentAdvance.project_id = advancePaymentAndBalanceSummary.project_id " + " AND advancePaymentAdvance.project_id = advancePaymentAndBalanceSummary.project_id "
......
...@@ -12,19 +12,16 @@ ...@@ -12,19 +12,16 @@
<sql-type>SQL</sql-type> <sql-type>SQL</sql-type>
<sql> <sql>
SELECT SELECT
sum( contractDetail.purchaseAmount ) AS weight, sum( projectFiledAssociatedProjectFiledDinasDetail.weight ) AS weight,
CASE CASE
WHEN dinasType.type = 0 THEN WHEN dinasType.type = 0 THEN
'砂' ELSE '石' '砂' ELSE '石'
END AS dinasTypeName END AS dinasTypeName
FROM FROM
ProjectFiled AS projectFiled ProjectFiled AS projectFiled
LEFT JOIN Contract AS contract ON contract.project = projectFiled.id LEFT JOIN ProjectFiledAssociatedProjectFiledDinasDetail AS projectFiledAssociatedProjectFiledDinasDetail
AND contract.approveState = 2 ON projectFiledAssociatedProjectFiledDinasDetail.master = projectFiled.id
AND contract.discard &lt;&gt; 1 LEFT JOIN DinasType AS dinasType ON projectFiledAssociatedProjectFiledDinasDetail.dinasType = dinasType.id
AND contract.contractState &lt;&gt; 'MODIFIED'
LEFT JOIN ContractAssociatedcontractDetail AS contractDetail ON contractDetail.master = contract.id
LEFT JOIN DinasType AS dinasType ON contractDetail.dinasType = dinasType.id
WHERE 1=1 AND dinasType.type IS NOT NULL WHERE 1=1 AND dinasType.type IS NOT NULL
AND projectFiled.regionalCompany = :?regionalCompany AND projectFiled.regionalCompany = :?regionalCompany
AND projectFiled.discard &lt;&gt; 1 AND projectFiled.discard &lt;&gt; 1
......
...@@ -86,7 +86,7 @@ public class VehicleDispatchServiceImpl implements VehicleDispatchService { ...@@ -86,7 +86,7 @@ public class VehicleDispatchServiceImpl implements VehicleDispatchService {
kobject.set(VehicleDispatchConstant.CONTRACT, load.get(BaseConstants.MASTER).get(VehicleDispatchConstant.CONTRACT)); kobject.set(VehicleDispatchConstant.CONTRACT, load.get(BaseConstants.MASTER).get(VehicleDispatchConstant.CONTRACT));
kobject.set(VehicleDispatchConstant.DINAS_TYPE, load.get(VehicleDispatchConstant.DINAS_TYPE)); kobject.set(VehicleDispatchConstant.DINAS_TYPE, load.get(VehicleDispatchConstant.DINAS_TYPE));
kobject.set(VehicleDispatchConstant.STATION, load.get(BaseConstants.MASTER).get(VehicleDispatchConstant.STATION)); kobject.set(VehicleDispatchConstant.STATION, load.get(BaseConstants.MASTER).get(VehicleDispatchConstant.STATION));
kobject.set(VehicleDispatchConstant.PLAN_AMOUNT, load.getBigDecimal("actualSaleAmount")); kobject.set(VehicleDispatchConstant.PLAN_AMOUNT, load.getBigDecimal("salesPlanAmount"));
} }
kobject.set("dispatchStatus",PriceAdjustmentAdjustmentStatusEnum.NOT_STARTED.getValue()); kobject.set("dispatchStatus",PriceAdjustmentAdjustmentStatusEnum.NOT_STARTED.getValue());
if(planningCycle.getDate(VehicleDispatchConstant.PLANNING_CYCLE_START_TIME).before(new Date())){ if(planningCycle.getDate(VehicleDispatchConstant.PLANNING_CYCLE_START_TIME).before(new Date())){
......
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='5a029370-971b-4c90-a4db-14caa4514eca' category='运输/运输分析(区域公司)' seq='0'></privilege> <privilege type='TOKEN' target-type='' id='5a029370-971b-4c90-a4db-14caa4514eca' category='运输/运输分析' seq='0'></privilege>
</content> </content>
</model> </model>
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
<description></description> <description></description>
</header> </header>
<content> <content>
<privilege type='TOKEN' target-type='' id='d3e187b7-a156-4982-aa4c-e4e709165a50' category='运输/车辆违规(区域公司)' seq='0'></privilege> <privilege type='TOKEN' target-type='' id='d3e187b7-a156-4982-aa4c-e4e709165a50' category='运输/车辆违规' seq='0'></privilege>
</content> </content>
</model> </model>
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