Commit 1235c928 by 宋祥

1.同步德诚产品信息接口

parent 431e0c62
...@@ -168,6 +168,9 @@ public class DaoUtils { ...@@ -168,6 +168,9 @@ public class DaoUtils {
} catch (Exception e) { } catch (Exception e) {
userName = "System"; userName = "System";
} }
if (StringUtils.isBlank(userName)) {
userName = "System";
}
BeanUtils.setProperty(bean, "createdName", userName); BeanUtils.setProperty(bean, "createdName", userName);
BeanUtils.setProperty(bean, "updatedName", userName); BeanUtils.setProperty(bean, "updatedName", userName);
} catch (Exception e) { } catch (Exception e) {
...@@ -290,6 +293,9 @@ public class DaoUtils { ...@@ -290,6 +293,9 @@ public class DaoUtils {
// 修改人名称 // 修改人名称
try { try {
String userName = UserSession.getLoginCName(); String userName = UserSession.getLoginCName();
if (StringUtils.isBlank(userName)) {
userName = "System";
}
BeanUtils.setProperty(bean, "updatedName", userName); BeanUtils.setProperty(bean, "updatedName", userName);
} catch (Exception e) { } catch (Exception e) {
log.warn("写入修改人名称失败", e); log.warn("写入修改人名称失败", e);
......
...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.wd.service; ...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.extapp.decheng.api.DcOpenApi; import com.baosight.hggp.core.extapp.decheng.api.DcOpenApi;
import com.baosight.hggp.core.extapp.decheng.model.DcContractList; import com.baosight.hggp.core.extapp.decheng.model.DcContractList;
import com.baosight.hggp.core.extapp.decheng.model.DcProductList; import com.baosight.hggp.core.extapp.decheng.model.DcProductList;
...@@ -141,6 +142,7 @@ public class ServiceHGWD005 extends ServiceEPBase { ...@@ -141,6 +142,7 @@ public class ServiceHGWD005 extends ServiceEPBase {
dbWd005.setProductModel(dcProductList.getCpxh()); dbWd005.setProductModel(dcProductList.getCpxh());
dbWd005.setUnit(dcProductList.getUnit()); dbWd005.setUnit(dcProductList.getUnit());
dbWd005.setClassify(dcProductList.getFenlei()); dbWd005.setClassify(dcProductList.getFenlei());
dbWd005.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGWD005.INSERT, dbWd005); DaoUtils.insert(HGWD005.INSERT, dbWd005);
} else { } else {
Map updateMap = new HashMap(); Map updateMap = new HashMap();
......
...@@ -26,12 +26,6 @@ ...@@ -26,12 +26,6 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
</isNotEmpty> </isNotEmpty>
...@@ -69,7 +63,7 @@ ...@@ -69,7 +63,7 @@
</dynamic> </dynamic>
</sql> </sql>
<select id="query" resultClass="com.baosight.ctdy.Hgwd005"> <select id="query" resultClass="com.baosight.hggp.hg.wd.domain.HGWD005">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
FROM ${hggpSchema}.HGWD005 FROM ${hggpSchema}.HGWD005
......
...@@ -231,7 +231,7 @@ public class HGWDTools { ...@@ -231,7 +231,7 @@ public class HGWDTools {
* @return * @return
*/ */
public static HGWD005 get(String extId) { public static HGWD005 get(String extId) {
AssertUtils.isNull(extId, "项目Code不能为空!"); AssertUtils.isNull(extId, "实体ID不能为空!");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put(HGWD005.FIELD_EXT_ID, extId); queryMap.put(HGWD005.FIELD_EXT_ID, extId);
List<HGWD005> results = DaoBase.getInstance().query(HGWD005.QUERY, queryMap); List<HGWD005> results = DaoBase.getInstance().query(HGWD005.QUERY, queryMap);
......
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