Commit 3adfcb7c authored by 徐俊's avatar 徐俊

xujun

parent 5e99ff4f
......@@ -12,6 +12,7 @@ import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service
......@@ -33,21 +34,17 @@ public class ComProjectKpitDetailServiceImpl extends BaseServiceImpl<ComProjectK
}
public void insertList(List<ComProjectKpitDetailDTO> list, String objectId) {
// ComProjectKpitDetail model =new ComProjectKpitDetail();
// model.setObjectId(objectId);
// this.delete(model);
ComProjectKpitDetail model =new ComProjectKpitDetail();
model.setObjectId(objectId);
this.delete(model);
if (null != list) {
//List<ComProjectKpitDetail> iList = new ArrayList<>();
List<ComProjectKpitDetail> iList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
ComProjectKpitDetail item = convert2Entity(list.get(i));
item.setObjectId(objectId);
if (item.getId().equals(item.getKpitId()))
this.insert(item);
else
this.update(item);
//iList.add(item);
iList.add(item);
}
//this.insertBatch(iList);
this.insertBatch(iList);
}
}
public void deleteByObjectId(String objectId){
......
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