Commit 3f2d3b28 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 51ab84a3 c2028ad4
...@@ -12,7 +12,6 @@ import org.apache.commons.collections.CollectionUtils; ...@@ -12,7 +12,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import java.lang.reflect.InvocationTargetException;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -320,7 +319,7 @@ public class DaoUtils { ...@@ -320,7 +319,7 @@ public class DaoUtils {
userId = MapUtils.getString(map, "updatedBy"); userId = MapUtils.getString(map, "updatedBy");
if (StringUtils.isBlank(userId)) { if (StringUtils.isBlank(userId)) {
userId = UserSession.getLoginName(); userId = UserSession.getLoginName();
userId = userId == null || userId.length() > 32 ? "System" : userId; userId = userId == null ? "System" : userId;
} }
} catch (Exception e) { } catch (Exception e) {
userId = "System"; userId = "System";
...@@ -335,7 +334,7 @@ public class DaoUtils { ...@@ -335,7 +334,7 @@ public class DaoUtils {
} catch (Exception e) { } catch (Exception e) {
userName = "System"; userName = "System";
} }
map.put("updatedName", userName); map.put("updatedName", StringUtils.isBlank(userName) ? "System" : userName);
// 修改时间 // 修改时间
map.put("updatedTime", DateUtils.shortDateTime()); map.put("updatedTime", DateUtils.shortDateTime());
} }
......
...@@ -149,6 +149,8 @@ public class DcOpenApi { ...@@ -149,6 +149,8 @@ public class DcOpenApi {
JSONArray dataJsons = new JSONArray(); JSONArray dataJsons = new JSONArray();
dataJsons.add(DcApiUtils.buildValueJson("pageindex", pageIndex)); dataJsons.add(DcApiUtils.buildValueJson("pageindex", pageIndex));
dataJsons.add(DcApiUtils.buildValueJson("pagesize", 100)); dataJsons.add(DcApiUtils.buildValueJson("pagesize", 100));
// 仅同步设备数据,566:成品-设备的分类ID
dataJsons.add(DcApiUtils.buildValueJson("idProductClass", 566));
String param = JSON.toJSONString(DcApiUtils.buildParamJson(dataJsons)); String param = JSON.toJSONString(DcApiUtils.buildParamJson(dataJsons));
String result = HttpUtils.post(DeChengConst.PRODUCT_BILLLIST, param, HttpUtils.JSON_MEDIA_TYPE); String result = HttpUtils.post(DeChengConst.PRODUCT_BILLLIST, param, HttpUtils.JSON_MEDIA_TYPE);
if (StringUtils.isBlank(result)) { if (StringUtils.isBlank(result)) {
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
......
...@@ -6,11 +6,11 @@ import com.baosight.hggp.core.security.UserSessionUtils; ...@@ -6,11 +6,11 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD002; import com.baosight.hggp.hg.wd.domain.HGWD002;
import com.baosight.hggp.hg.wd.utils.HgWdUtils;
import com.baosight.hggp.hg.xs.domain.User; import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
...@@ -55,7 +55,10 @@ public class ServiceHGWD002 extends ServiceBase { ...@@ -55,7 +55,10 @@ public class ServiceHGWD002 extends ServiceBase {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
// 仅查询已发布的文件 // 仅查询已发布的文件
queryRow.put(HGWD001.FIELD_STATUS, HgWdConstant.FileStatus.S_1); queryRow.put(HGWD001.FIELD_STATUS, HgWdConstant.FileStatus.S_1);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, User.FIELD_USER_ID, UserSessionUtils.getUserId()); // 管理员不做权限验证
if (!HgWdUtils.HgWd009.isManager()) {
queryRow.put(User.FIELD_USER_ID, UserSessionUtils.getUserId());
}
builder(inInfo); builder(inInfo);
inInfo = super.query(inInfo, HGWD002.QUERY, new HGWD002()); inInfo = super.query(inInfo, HGWD002.QUERY, new HGWD002());
} catch (Exception e) { } catch (Exception e) {
......
...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.security.UserSessionUtils; ...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD002; import com.baosight.hggp.hg.wd.domain.HGWD002;
import com.baosight.hggp.hg.wd.utils.HgWdUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
...@@ -93,9 +94,13 @@ public class ServiceHGWD002A extends ServiceEPBase { ...@@ -93,9 +94,13 @@ public class ServiceHGWD002A extends ServiceEPBase {
public List queryChildNode(String parentId) { public List queryChildNode(String parentId) {
List<Map> results = new ArrayList(); List<Map> results = new ArrayList();
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("fileId", parentId);
queryMap.put("parentId", parentId); queryMap.put("parentId", parentId);
queryMap.put("userId", UserSessionUtils.getLoginName()); if (!HgWdUtils.HgWd009.isManager()) {
queryMap.put("userId", UserSessionUtils.getLoginName());
}
queryMap.put(HGWD001.FIELD_STATUS, HgWdConstant.FileStatus.S_1); queryMap.put(HGWD001.FIELD_STATUS, HgWdConstant.FileStatus.S_1);
queryMap.put("orderBy", "B.DOC_TYPE ASC, B.DOC_NAME ASC");
List<HGWD002> dbWd002s = dao.query(HGWD002.QUERY, queryMap); List<HGWD002> dbWd002s = dao.query(HGWD002.QUERY, queryMap);
if (CollectionUtils.isEmpty(dbWd002s)) { if (CollectionUtils.isEmpty(dbWd002s)) {
return results; return results;
......
...@@ -61,7 +61,10 @@ ...@@ -61,7 +61,10 @@
B.DOC_NAME LIKE CONCAT('%', #docName#, '%') B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId"> <isNotEmpty prepend=" AND " property="parentId">
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #parentId# ) <isNotEmpty prepend=" AND " property="userId">
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId#
AND FILE_ID = #parentId#)
</isNotEmpty>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="createdTime">
LEFT(B.CREATED_TIME,8) = replace(#createdTime#,'-','') LEFT(B.CREATED_TIME,8) = replace(#createdTime#,'-','')
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
PRODUCT_NAME = #productName#, <!-- 产品名称 --> PRODUCT_NAME = #productName#, <!-- 产品名称 -->
PRODUCT_MODEL = #productModel#, <!-- 产品型号 --> PRODUCT_MODEL = #productModel#, <!-- 产品型号 -->
UNIT = #unit#, <!-- 产品单位 --> UNIT = #unit#, <!-- 产品单位 -->
CLASSIFY = #classify#, <!-- 产品分类 --> CLASSIFY = #classify# <!-- 产品分类 -->
WHERE ID = #id# WHERE ID = #id#
</update> </update>
......
...@@ -370,7 +370,8 @@ function otherDownload(isRoot, docId) { ...@@ -370,7 +370,8 @@ function otherDownload(isRoot, docId) {
if (isRoot) { if (isRoot) {
$("#descSpan").html("文件预览区域..."); $("#descSpan").html("文件预览区域...");
} else { } else {
$("#descSpan").html("该文件暂不支持预览,点击<a href='" + downloadHref(docId, false) $("#descSpan").html("该文件暂不支持预览");
+ "' target='_blank'>下载</a>"); // $("#descSpan").html("该文件暂不支持预览,点击<a href='" + downloadHref(docId, false)
// + "' target='_blank'>下载</a>");
} }
} }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
/*align-items: flex-start;*/ /*align-items: flex-start;*/
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow: scroll; overflow: auto;
} }
.center-flex { .center-flex {
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
<span id="descSpan" style="font-weight: bold;font-size: 18px">文件预览区域...</span> <span id="descSpan" style="font-weight: bold;font-size: 18px">文件预览区域...</span>
</div> </div>
<%-- 文本预览 --%> <%-- 文本预览 --%>
<div id="textContainer" class="center-flex"> <div id="textContainer" class="left-flex">
<pre id="textSpan" class="textSpan"></pre> <pre id="textSpan" class="textSpan"></pre>
</div> </div>
<%-- docx文件预览--%> <%-- docx文件预览--%>
......
...@@ -13,7 +13,7 @@ $(function () { ...@@ -13,7 +13,7 @@ $(function () {
let template = ''; let template = '';
if (status && status == 0) { if (status && status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+ 'onclick="modify(\'' + item.noticeNo + '\')" >详情</a>&nbsp;&nbsp;'; + 'onclick="modify(\'' + item.noticeNo + '\')" >修改</a>&nbsp;&nbsp;';
} }
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(\'' + item.noticeNo + '\')" >附件清单</a>'; + 'onclick="showUploadFile(\'' + item.noticeNo + '\')" >附件清单</a>';
......
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