-----合并,解决冲突

web_backend_develope
wu ming 8 years ago
commit 4138b8bf6b

@ -116,6 +116,12 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
ORDER BY data_details.id
</select>
<select id="countByDataPath" resultType="java.lang.Integer" parameterType="com.platform.entities.DataInfoEntity">
SELECT count(id)
FROM data_info
where data_path=#{dataPath} and remove='0'
</select>
<!-- 获取数据符合筛选条件的全部记录信息 -->
<select id="findById" resultMap="getEntityByText" parameterType="java.lang.Integer">
SELECT
@ -215,6 +221,9 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
<if test="endMonth != null and endMonth != ''">
end_month,
</if>
<if test="dataBaseType != null and dataBaseType != ''">
data_base_type,
</if>
</trim>
)
VALUES(
@ -279,6 +288,9 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
<if test="endMonth != null and endMonth != ''">
#{endMonth},
</if>
<if test="dataBaseType != null and dataBaseType != ''">
#{dataBaseType},
</if>
</trim>
)
</insert>

@ -113,7 +113,7 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
a.is_budget_exec budgetExecManage,a.is_budget_quota budgetQuotaManage,a.is_collection collection,a.is_department_budget departmentBudgetManage,a.total_budget_account totalBudgetAccount,
a.final_account_manage finalAccountManage,a.report_form_manage reportFormManage,a.non_tax_revenue_manage nonTaxManage,a.wage_system wageSystem,
a.analysis_of_financial_economic_prosperity analysisOfFinancialEconomicProsperity,a.government_debt governmentDebtManage,d.data_version dataVersion,d.collection_time collectingTime,l.is_update collUpdate,
d.checkout_indicate execResult,d.checkout_pay payResult,d.checkout_flag checkoutFlag,d.checkout_indicate_last execResultLast,d.checkout_pay_last payResultLast
d.checkout_indicate execResult,d.checkout_pay payResult,d.checkout_flag checkoutFlag,d.checkout_indicate_last execResultLast,d.checkout_pay_last payResultLast,d.mark mark
</sql>
<!-- 获取数据符合筛选条件的全部记录信息 -->
@ -196,7 +196,7 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
SELECT
<include refid="find_city_Column_List" />
FROM standard_data_details a left join collection_data_description l on a.area_code=l.regionalism_code AND a.sys_code=l.sys_code
left join data_info d on a.area_code=d.regionalism_code AND a.sys_code=d.system_code AND d.remove='0'
left join data_details d on a.area_code=d.regionalism_code AND a.sys_code=d.system_code
<where>
a.is_collection='是' AND a.city_name=#{cityName}
</where>

@ -28,6 +28,8 @@ public interface DataInfoDao {
List<DataInfoEntity> findByParam(DataInfoEntity data)throws Exception;
int countByDataPath(DataInfoEntity data)throws Exception;
int removes(List<Integer> list)throws Exception;
int save(DataInfoEntity data) throws Exception;

@ -136,11 +136,16 @@ public class SetVolume {
*/
public int deleteVolume(String volumeName) throws Exception{
int reslut = 0;
this.stopVolume(volumeName);
try {
Thread.sleep(500);
} catch (Exception e) {
log.info(e);
}
log.info("delete volume " + volumeName);
Map<String, Object> map = new HashMap<String, Object>();
map.put("volumeName", volumeName);
//请求web
this.stopVolume(volumeName);
String rest = ht.sendPost("gfs/deleteVolume", map);
if (null == rest || "".equals(rest)) {
log.error(" --- gluster is disconnect ! \n");

@ -159,7 +159,7 @@ public class MoveDataServiceImpl implements IMoveDataService {
}
if (path.length() == 0) {
dataMove.setDstVolumePath("nopath");
dataMove.setDstVolumePath("noIP");
dataMove.setDstVolumeIp("noIP");
}else {
dataMove.setDstVolumePath(path);
dataMove.setDstVolumeIp(ip);

@ -11,7 +11,6 @@ import org.springframework.stereotype.Service;
import com.base.Custom4exception;
import com.base.CustomException;
import com.platform.controller.OracleController;
import com.platform.dao.DataInfoDao;
import com.platform.entities.DataInfoEntity;
import com.platform.entities.GatherOracleInfo;

@ -38,6 +38,13 @@ public class VolumeServiceImpl implements IVolumeService {
public int save(VolumeDataEntity entity) throws Exception {
int rest = 1;
//createVolume("lili_test1", 0, "distributed", bricksToCreate, "/home/lili_test1_point")
List<VolumeInitEntity> vols = volumeDao.findAll();
Map<String, Object> volMap = new HashMap<String, Object>();
if (null!= vols) {
for (VolumeInitEntity volumeInitEntity : vols) {
volMap.put(volumeInitEntity.getPath(), null);
}
}
List<VolumeDataEntity> result = gfsService.getAllVolumes();
List<VolumeDataEntity> addVolumes = new ArrayList<VolumeDataEntity>();
VolumeDataEntity volumeTmp = null;
@ -81,7 +88,7 @@ public class VolumeServiceImpl implements IVolumeService {
//创建volume
if (bristr.size() > 0) {
//TODO 换成 web 请求
int createreslt = setVolume.createVolume(add.getName(), 0, "distributed", bristr, add.getPath());
int createreslt = setVolume.createVolume(add.getName(), 0, "Distribute", bristr, add.getPath());
if (createreslt != 1) {
rest = createreslt;
}
@ -90,7 +97,9 @@ public class VolumeServiceImpl implements IVolumeService {
VolumeInitEntity volInSql = new VolumeInitEntity();
volInSql.setName(add.getName());
volInSql.setPath(add.getPath());
if (!volMap.keySet().contains(volInSql.getPath())) {
volumeDao.save(volInSql);
}
isContinue = false;
}
// 修改 brick

@ -127,6 +127,7 @@ public class ThreadMoveData{
long timelong = nowTime - DateForm.string2DateBysecond(moveE.getLastTime()).getTime();
if (timelong > 1000*60*20) {
try {
moveE.setCompleteStatus("3");
dataInfoMoveTmpDao.update(moveE);
} catch (Exception e) {
log.error(e);
@ -137,19 +138,18 @@ public class ThreadMoveData{
moveE.setRate(taskOne.getProgress());
moveE.setLastTime(DateForm.date2StringBysecond(new Date()));
if (3 == taskOne.getStatus()) {
//成功
//成功---创建数据
makeDataInfo(moveE);
}else if(taskOne.getStatus() < 0){
//失败
moveE.setCompleteStatus("3");
}
try {
dataInfoMoveTmpDao.update(moveE);
} catch (Exception e) {
log.error(e);
}
}
}
}
//待迁移 status = 0准备迁移则开始迁移
@ -384,7 +384,9 @@ public class ThreadMoveData{
data.setExecResult(dataMove.getExecResult());
data.setId(0);
try {
if (dataInfoDao.countByDataPath(data) == 0) {
dataInfoDao.save(data);
}
} catch (Exception e) {
log.error(e);
dataMove.setCompleteStatus("1");
@ -411,7 +413,8 @@ public class ThreadMoveData{
//去掉 最后 的 数字 +/ 符合
if (matcher2.find()) {
String removeStr = matcher2.group();
dstPath = dstPath.replace(removeStr, "");
removeStr.length();
dstPath = dstPath.substring(0, dstPath.length()-removeStr.length());
}
return dstPath;
}

Loading…
Cancel
Save