Commit 00892908 authored by 李博今's avatar 李博今

Merge branch 'V2.0.3' of http://103.249.252.28:90/lcy/education

parents 7c6657d5 708ab661
package org.rcisoft.business.barrange.dao;
import org.apache.ibatis.annotations.Update;
import org.rcisoft.business.barrange.entity.BSubAgency;
import org.rcisoft.core.base.BaseMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface BSubAgencyRepository extends BaseMapper<BSubAgency> {
@Update("update b_sub_agency set del_flag = 1 where subtask_id = #{0}")
void deletePervious(String businessId);
}
......@@ -178,6 +178,8 @@ public class BArrangeServiceImpl implements BArrangeService {
bSubtaskRepository.updateByPrimaryKeySelective(bSubtask);
}
if (subtask.get("childList") != null){
//先清除原子任务
bSubAgencyRepository.deletePervious(subtask.getString("businessId"));
JSONArray childList2 = subtask.getJSONArray("childList");
for(int j = 0; j < childList2.size() ; j++){
JSONObject agency = childList2.getJSONObject(j);
......@@ -185,10 +187,10 @@ public class BArrangeServiceImpl implements BArrangeService {
if (agency.get("agencyCode") != null){
bSubAgency.setAgencyCode(agency.getString("agencyCode"));
}
if (agency.get("businessId") != null){
bSubAgency.setBusinessId(agency.getString("businessId"));
bSubAgencyRepository.updateByPrimaryKeySelective(bSubAgency);
}
//再插入新记录
UserUtil.setCurrentPersistOperation(bSubAgency);
bSubAgency.setSubtaskId(subtask.getString("businessId"));
bSubAgencyRepository.insertSelective(bSubAgency);
}
}
}
......
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