Commit 41c13420 by liuyang

2024-08-26

1.公司名称下拉选择不应该显示集团的公司
2.变更记录的文件类型要显示中文
3.发布以后状态为已发布,当修改文件类型、文件名称、增加和删除附件时,状态为待发布,再次点发布状态为已发布
parent 1e3904d7
...@@ -274,7 +274,7 @@ public enum DdynamicEnum { ...@@ -274,7 +274,7 @@ public enum DdynamicEnum {
* 用途:工序设计下拉框 * 用途:工序设计下拉框
* 编写:ly * 编写:ly
*/ */
COMPANY_BOX_BLOCK_ID("companyBox_block_id","orgEname","orgCname","HGSJ001.queryCompany", COMPANY_BOX_BLOCK_ID("companyBox_block_id","orgEname","orgCname","parentOrgId","orgType","HGSJ001.queryCompany",
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put("orgType", OrgTypeEnum.COMPANY.getCode()); put("orgType", OrgTypeEnum.COMPANY.getCode());
}}), }}),
......
...@@ -316,12 +316,14 @@ ...@@ -316,12 +316,14 @@
<select id="queryCompany" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryCompany" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select DISTINCT select DISTINCT
a.ORG_ENAME as "orgEname", a.ORG_ENAME as "orgEname",
a.ORG_CNAME as "orgCname" a.ORG_CNAME as "orgCname",
a.PARENT_ORG_ID as "parentOrgId",
a.ORG_TYPE as "orgType"
from ${platSchema}.txsog01 a from ${platSchema}.txsog01 a
<isNotEmpty property="userId"> <isNotEmpty property="userId">
left join ${platSchema}.txsog02 b on a.ORG_ID = b.ORG_ID left join ${platSchema}.txsog02 b on a.ORG_ID = b.ORG_ID
</isNotEmpty> </isNotEmpty>
where a.IS_DELETED = 0 where a.IS_DELETED = 0 AND A.PARENT_ORG_ID NOT IN ('root')
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode# a.ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
......
...@@ -9,6 +9,7 @@ import com.baosight.hggp.core.dao.DaoBase; ...@@ -9,6 +9,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum; import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.core.utils.Iplat4jUtils; import com.baosight.hggp.core.utils.Iplat4jUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW999; import com.baosight.hggp.hg.cw.domain.HGCW999;
...@@ -89,6 +90,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -89,6 +90,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
} }
DaoUtils.update("HGCW999.deleteMatId", map1); //删除附件记录 DaoUtils.update("HGCW999.deleteMatId", map1); //删除附件记录
DaoUtils.update(HGWD001A.DELETE_MAT_ID, map1); //删除变更记录 DaoUtils.update(HGWD001A.DELETE_MAT_ID, map1); //删除变更记录
hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
DaoUtils.update(HGWD001.DELETE, hgwd001); DaoUtils.update(HGWD001.DELETE, hgwd001);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -106,14 +108,16 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -106,14 +108,16 @@ public class ServiceHGWD001 extends ServiceEPBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.list("hggp.hgwd.fileType");
// 写入数据 // 写入数据
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGWD001 hgwd001 = new HGWD001(); HGWD001 hgwd001 = new HGWD001();
hgwd001.fromMap(resultRow); hgwd001.fromMap(resultRow);
hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
if (hgwd001.getId() == null || hgwd001.getId() == 0) { if (hgwd001.getId() == null || hgwd001.getId() == 0) {
this.add(hgwd001); this.add(hgwd001);
} else { } else {
this.modify(hgwd001); this.modify(hgwd001,edcm01List);
} }
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -146,7 +150,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -146,7 +150,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
/** /**
* 修改操作 * 修改操作
*/ */
public void modify(HGWD001 hgwd001) { public void modify(HGWD001 hgwd001,List<Map<String, Object>> edcm01List) {
HGWD001 wd001 =HGWDTools.HgWd001.get(hgwd001.getId()); HGWD001 wd001 =HGWDTools.HgWd001.get(hgwd001.getId());
HGWD001A hgwd001a = new HGWD001A(); HGWD001A hgwd001a = new HGWD001A();
hgwd001a.setCompanyCode(hgwd001.getCompanyCode()); hgwd001a.setCompanyCode(hgwd001.getCompanyCode());
...@@ -161,9 +165,11 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -161,9 +165,11 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001a.setChangeEnd(hgwd001.getFileName()); hgwd001a.setChangeEnd(hgwd001.getFileName());
HGWDTools.HgWd001.add(hgwd001a); HGWDTools.HgWd001.add(hgwd001a);
}else if (wd001 != null && !wd001.getFileType().equals(hgwd001.getFileType())){ }else if (wd001 != null && !wd001.getFileType().equals(hgwd001.getFileType())){
List<Map> fileType1 = edcm01List.stream().filter(map -> map.get("itemCode").equals(wd001.getFileType())).collect(Collectors.toList());
List<Map> fileType2 = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgwd001.getFileType())).collect(Collectors.toList());
hgwd001a.setChangeContent("文件类型"); hgwd001a.setChangeContent("文件类型");
hgwd001a.setChangeStart(wd001.getFileType()); hgwd001a.setChangeStart(fileType1.get(0).get("itemCname").toString());
hgwd001a.setChangeEnd(hgwd001.getFileType()); hgwd001a.setChangeEnd(fileType2.get(0).get("itemCname").toString());
HGWDTools.HgWd001.add(hgwd001a); HGWDTools.HgWd001.add(hgwd001a);
} }
......
...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW999; import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.ds.domain.HGDS002; import com.baosight.hggp.hg.ds.domain.HGDS002;
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.HGWD001A; import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
...@@ -133,6 +134,8 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -133,6 +134,8 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001a.setChangeStart(fSc002A.getDocId()); hgwd001a.setChangeStart(fSc002A.getDocId());
hgwd001a.setMatId(hgwd001.getId()); hgwd001a.setMatId(hgwd001.getId());
HGWDTools.HgWd001.add(hgwd001a); HGWDTools.HgWd001.add(hgwd001a);
hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
HGWDTools.HgWd001.updateStatus(hgwd001);
} }
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -155,12 +158,12 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -155,12 +158,12 @@ public class ServiceHGWD099 extends ServiceEPBase {
try { try {
Long matId = null; Long matId = null;
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (Map resultRow : resultRows) {
HGCW999 fSc002A = new HGCW999(); HGCW999 fSc002A = new HGCW999();
fSc002A.fromMap(resultRows.get(i)); fSc002A.fromMap(resultRow);
matId = fSc002A.getMatId(); matId = fSc002A.getMatId();
this.deleteEntity(fSc002A); this.deleteEntity(fSc002A);
HGWD001 hgwd001 =HGWDTools.HgWd001.get(matId); HGWD001 hgwd001 = HGWDTools.HgWd001.get(matId);
if (hgwd001 != null) { if (hgwd001 != null) {
HGWD001A hgwd001a = new HGWD001A(); HGWD001A hgwd001a = new HGWD001A();
hgwd001a.setCompanyCode(hgwd001.getCompanyCode()); hgwd001a.setCompanyCode(hgwd001.getCompanyCode());
...@@ -173,6 +176,8 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -173,6 +176,8 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001a.setChangeStart(fSc002A.getDocId()); hgwd001a.setChangeStart(fSc002A.getDocId());
hgwd001a.setMatId(hgwd001.getId()); hgwd001a.setMatId(hgwd001.getId());
HGWDTools.HgWd001.add(hgwd001a); HGWDTools.HgWd001.add(hgwd001a);
hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
HGWDTools.HgWd001.updateStatus(hgwd001);
} }
} }
//List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(matId,"HT"); //List<HGCW999> hgcw999List = HGCWTools.HgCw999.queryByBiz(matId,"HT");
......
...@@ -181,6 +181,14 @@ ...@@ -181,6 +181,14 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<update id="updateStatus">
UPDATE ${hggpSchema}.HGWD001
SET
STATUS = #status#, <!-- 状态 -->
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
<update id="updateReleaseDate"> <update id="updateReleaseDate">
UPDATE ${hggpSchema}.HGWD001 UPDATE ${hggpSchema}.HGWD001
SET SET
......
...@@ -53,6 +53,10 @@ public class HGWDTools { ...@@ -53,6 +53,10 @@ public class HGWDTools {
DaoUtils.insert(HGWD001A.INSERT, hgwd001a); DaoUtils.insert(HGWD001A.INSERT, hgwd001a);
} }
public static void updateStatus(HGWD001 hgwd001) {
AssertUtils.isNull(hgwd001, "文档对象不能为空");
DaoUtils.update("HGWD001.updateStatus", hgwd001);
}
} }
} }
...@@ -42,6 +42,11 @@ $(function () { ...@@ -42,6 +42,11 @@ $(function () {
}, { }, {
field: "companyCode", field: "companyCode",
title: "公司名称", title: "公司名称",
filter: function (option) {
return _.filter(option.values, function (item) {
return item["param1Field"]!="root";
})
},
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < companyCodeBox.length; i++) { for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCodeBox[i]['valueField'] === dataItem['companyCode']){ if (companyCodeBox[i]['valueField'] === dataItem['companyCode']){
......
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