|
@@ -3,6 +3,7 @@ package com.gqy.document.service.impl;
|
|
import com.gqy.common.annotation.Log;
|
|
import com.gqy.common.annotation.Log;
|
|
import com.gqy.common.enums.UserStatus;
|
|
import com.gqy.common.enums.UserStatus;
|
|
|
|
|
|
|
|
+import com.gqy.common.utils.bean.BeanUtils;
|
|
import com.gqy.document.domain.DcPsParam;
|
|
import com.gqy.document.domain.DcPsParam;
|
|
import com.gqy.document.domain.DcSpec;
|
|
import com.gqy.document.domain.DcSpec;
|
|
import com.gqy.document.mapper.DcSpecMapper;
|
|
import com.gqy.document.mapper.DcSpecMapper;
|
|
@@ -98,9 +99,32 @@ public class DcSpecServiceImpl implements IDcSpecService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 更新规格信息
|
|
|
|
+ * @param maps
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
public int updateDcSpecMaps(Map maps){
|
|
public int updateDcSpecMaps(Map maps){
|
|
- String ps_id = maps.get("ps_id").toString();
|
|
|
|
- DcSpec dcSpecQuery = dcSpecMapper.selectDcSpecById(Integer.valueOf(ps_id));
|
|
|
|
|
|
+ try{
|
|
|
|
+ String ps_id = maps.get("ps_id").toString();
|
|
|
|
+ DcSpec dcSpecQuery = dcSpecMapper.selectDcSpecById(Integer.valueOf(ps_id));
|
|
|
|
+ //Object dest, Object src
|
|
|
|
+ BeanUtils.copyBeanProp(dcSpecQuery,maps);
|
|
|
|
+ dcSpecMapper.updateDcSpec(dcSpecQuery);
|
|
|
|
+
|
|
|
|
+ String ps_no = maps.get("ps_no").toString();
|
|
|
|
+ DcPsParam dcPsParamQuery = new DcPsParam();
|
|
|
|
+ dcPsParamQuery.setPsp_mode(ps_no);
|
|
|
|
+ List<DcPsParam> listDcPsParam = dcPsParamMapper.selectDcPsParamList(dcPsParamQuery);
|
|
|
|
+ DcPsParam dcPsParam = listDcPsParam.get(0);
|
|
|
|
+ BeanUtils.copyBeanProp(dcPsParam, maps);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ dcPsParamMapper.updateDcPsParam(dcPsParam);
|
|
|
|
+ return 1;
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|